diff --git a/docs/404.html b/docs/404.html index fc1c050c5..2efe91361 100644 --- a/docs/404.html +++ b/docs/404.html @@ -8,13 +8,13 @@ - + -

404

That's a Four-Oh-Four.
+ - + diff --git a/docs/assets/js/10.4bb9eeac.js b/docs/assets/js/10.c664e5e6.js similarity index 99% rename from docs/assets/js/10.4bb9eeac.js rename to docs/assets/js/10.c664e5e6.js index 503b653b1..f244650f4 100644 --- a/docs/assets/js/10.4bb9eeac.js +++ b/docs/assets/js/10.c664e5e6.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{434:function(e,t,a){"use strict";a.r(t);var i=a(62),s=Object(i.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"specifications-workflow"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#specifications-workflow"}},[e._v("#")]),e._v(" Specifications Workflow")]),e._v(" "),a("p",[e._v("This repository manages the specifications of the Meilisearch API. Specifications are meant to describe the expected behavior on a high level and point out identified corner cases.")]),e._v(" "),a("h2",{attrs:{id:"draft-state-create-a-new-pr"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#draft-state-create-a-new-pr"}},[e._v("#")]),e._v(" Draft State: Create a new PR")]),e._v(" "),a("p",[e._v("To start a new specification, a new branch must start")]),e._v(" "),a("ul",[a("li",[e._v("from "),a("code",[e._v("release-vX.X.X")]),e._v(" if the related changes are already planned for the release "),a("code",[e._v("vX.X.X")])]),e._v(" "),a("li",[e._v("from "),a("code",[e._v("main")]),e._v(" if you don't know in which release the changes will be integrated")])]),e._v(" "),a("p",[e._v("If a new specification file needs to be introduced, you must create a new file in "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/tree/main/text",target:"_blank",rel:"noopener noreferrer"}},[e._v("this folder"),a("OutboundLink")],1),e._v(" following the pattern: "),a("code",[e._v("PR_number-feature-name.md")]),e._v(". e.g. if PR number 12 is about facetting, the newly introduced specification file will be named "),a("code",[e._v("0012-facetting.md")]),e._v(".")]),e._v(" "),a("blockquote",[a("p",[e._v("Note that a pull request not strictly dealing about a specification conception will be tagged as "),a("code",[e._v("Not A Spec")]),e._v(". e.g. A pull-request updating this file will be tagged with the "),a("code",[e._v("Not A Spec")]),e._v(" label.")])]),e._v(" "),a("p",[e._v("The "),a("RouterLink",{attrs:{to:"/specifications/pull_request_template.html"}},[e._v("pull-request template")]),e._v(" must be filled in when the pull-request is created.")],1),e._v(" "),a("h2",{attrs:{id:"review-state"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#review-state"}},[e._v("#")]),e._v(" Review State")]),e._v(" "),a("p",[e._v("It's up to the maintainers of this repository to decide when the PR is ready to be reviewed and which persons should review it.")]),e._v(" "),a("p",[e._v("The PR must be tagged as "),a("code",[e._v("Ready For Review")]),e._v(" to enter this stage.")]),e._v(" "),a("p",[e._v("To be validated, it must be reviewed and approved by peers, ideally:")]),e._v(" "),a("ul",[a("li",[e._v("One person from the Engine team.")]),e._v(" "),a("li",[e._v("One person from the Integration team.")]),e._v(" "),a("li",[e._v("One person from the Documentation team.")])]),e._v(" "),a("h2",{attrs:{id:"merge-state"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#merge-state"}},[e._v("#")]),e._v(" Merge State")]),e._v(" "),a("p",[e._v("To be merged, a specification pull-request should follow the given rules:")]),e._v(" "),a("ul",[a("li",[e._v("It must be approved as described in the "),a("a",{attrs:{href:"#review-state"}},[e._v("Review State")]),e._v(" section.")]),e._v(" "),a("li",[e._v("The PR must point to the right "),a("code",[e._v("release-vX.X.X")]),e._v(" branch.")]),e._v(" "),a("li",[e._v("It must be tagged with:\n"),a("ul",[a("li",[e._v("A "),a("code",[e._v("vX.X.X")]),e._v(" tag indicating in which release the described changes will be introduced.")]),e._v(" "),a("li",[e._v("A "),a("code",[e._v("QX:YYYY")]),e._v(" tag indicating in which quarter and year the described changes will be introduced.")]),e._v(" "),a("li",[e._v("The "),a("code",[e._v("⚠ Breaking")]),e._v(" tag, if breaking changes are introduced.")]),e._v(" "),a("li",[e._v("The "),a("code",[e._v("Telemetry")]),e._v(" tag, if telemetry changes are introduced.")]),e._v(" "),a("li",[e._v("The "),a("code",[e._v("OpenAPI")]),e._v(" tag, if the "),a("a",{attrs:{href:"open-api.yaml"}},[e._v("open-api")]),e._v(" specification will see changes introduced.")])])])]),e._v(" "),a("hr"),e._v(" "),a("h1",{attrs:{id:"release-worfklow"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#release-worfklow"}},[e._v("#")]),e._v(" Release Worfklow")]),e._v(" "),a("p",[e._v("The following steps should happen the day a Meilisearch release is shipped:")]),e._v(" "),a("ul",[a("li",[e._v("Pull-requests describing changes for a release are squashed and merged into the corresponding "),a("code",[e._v("release-vX.X.X")]),e._v(" branch.")]),e._v(" "),a("li",[a("code",[e._v("release-vX.X.X")]),e._v(" is squashed and merged into "),a("code",[e._v("main")]),e._v(".")]),e._v(" "),a("li",[a("code",[e._v("open-api.yml")]),e._v(" version is deployed on bump.sh.")])]),e._v(" "),a("hr"),e._v(" "),a("h2",{attrs:{id:"specification-file-format"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#specification-file-format"}},[e._v("#")]),e._v(" Specification File Format")]),e._v(" "),a("p",[e._v("Meilisearch's feature specifications are made up of five sections, described below.")]),e._v(" "),a("h3",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("Summarize the specification with a short paragraph.")]),e._v(" "),a("h3",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[e._v("Explain which use cases are supported.")]),e._v(" "),a("h3",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("p",[e._v("This section gives a high level overview of the feature. It should avoid technical language so that it can be understood by a general audience (think user-level).")]),e._v(" "),a("ul",[a("li",[e._v("Describe the API resource and endpoints. (Methods, URL, query parameters, body definition, status code).")]),e._v(" "),a("li",[e._v("Explain the feature through examples.")]),e._v(" "),a("li",[e._v("List error cases.")])]),e._v(" "),a("h3",{attrs:{id:"_4-technical-details-optional"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details-optional"}},[e._v("#")]),e._v(" 4. Technical Details (Optional)")]),e._v(" "),a("p",[e._v('When needed, we recommend describing practical aspects of implementation, e.g. specific algorithmic choices. If none, fill the section body with "n/a".')]),e._v(" "),a("h3",{attrs:{id:"_5-future-possibilities-optional"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities-optional"}},[e._v("#")]),e._v(" 5. Future Possibilities (Optional)")]),e._v(" "),a("p",[e._v('This last section includes any related topics or features which are not currently in Meilisearch and will not be added now, but which may be explored in the future. If none, fill the section body with "n/a".')])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{437:function(e,t,a){"use strict";a.r(t);var i=a(62),s=Object(i.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"specifications-workflow"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#specifications-workflow"}},[e._v("#")]),e._v(" Specifications Workflow")]),e._v(" "),a("p",[e._v("This repository manages the specifications of the Meilisearch API. Specifications are meant to describe the expected behavior on a high level and point out identified corner cases.")]),e._v(" "),a("h2",{attrs:{id:"draft-state-create-a-new-pr"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#draft-state-create-a-new-pr"}},[e._v("#")]),e._v(" Draft State: Create a new PR")]),e._v(" "),a("p",[e._v("To start a new specification, a new branch must start")]),e._v(" "),a("ul",[a("li",[e._v("from "),a("code",[e._v("release-vX.X.X")]),e._v(" if the related changes are already planned for the release "),a("code",[e._v("vX.X.X")])]),e._v(" "),a("li",[e._v("from "),a("code",[e._v("main")]),e._v(" if you don't know in which release the changes will be integrated")])]),e._v(" "),a("p",[e._v("If a new specification file needs to be introduced, you must create a new file in "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/tree/main/text",target:"_blank",rel:"noopener noreferrer"}},[e._v("this folder"),a("OutboundLink")],1),e._v(" following the pattern: "),a("code",[e._v("PR_number-feature-name.md")]),e._v(". e.g. if PR number 12 is about facetting, the newly introduced specification file will be named "),a("code",[e._v("0012-facetting.md")]),e._v(".")]),e._v(" "),a("blockquote",[a("p",[e._v("Note that a pull request not strictly dealing about a specification conception will be tagged as "),a("code",[e._v("Not A Spec")]),e._v(". e.g. A pull-request updating this file will be tagged with the "),a("code",[e._v("Not A Spec")]),e._v(" label.")])]),e._v(" "),a("p",[e._v("The "),a("RouterLink",{attrs:{to:"/specifications/pull_request_template.html"}},[e._v("pull-request template")]),e._v(" must be filled in when the pull-request is created.")],1),e._v(" "),a("h2",{attrs:{id:"review-state"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#review-state"}},[e._v("#")]),e._v(" Review State")]),e._v(" "),a("p",[e._v("It's up to the maintainers of this repository to decide when the PR is ready to be reviewed and which persons should review it.")]),e._v(" "),a("p",[e._v("The PR must be tagged as "),a("code",[e._v("Ready For Review")]),e._v(" to enter this stage.")]),e._v(" "),a("p",[e._v("To be validated, it must be reviewed and approved by peers, ideally:")]),e._v(" "),a("ul",[a("li",[e._v("One person from the Engine team.")]),e._v(" "),a("li",[e._v("One person from the Integration team.")]),e._v(" "),a("li",[e._v("One person from the Documentation team.")])]),e._v(" "),a("h2",{attrs:{id:"merge-state"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#merge-state"}},[e._v("#")]),e._v(" Merge State")]),e._v(" "),a("p",[e._v("To be merged, a specification pull-request should follow the given rules:")]),e._v(" "),a("ul",[a("li",[e._v("It must be approved as described in the "),a("a",{attrs:{href:"#review-state"}},[e._v("Review State")]),e._v(" section.")]),e._v(" "),a("li",[e._v("The PR must point to the right "),a("code",[e._v("release-vX.X.X")]),e._v(" branch.")]),e._v(" "),a("li",[e._v("It must be tagged with:\n"),a("ul",[a("li",[e._v("A "),a("code",[e._v("vX.X.X")]),e._v(" tag indicating in which release the described changes will be introduced.")]),e._v(" "),a("li",[e._v("A "),a("code",[e._v("QX:YYYY")]),e._v(" tag indicating in which quarter and year the described changes will be introduced.")]),e._v(" "),a("li",[e._v("The "),a("code",[e._v("⚠ Breaking")]),e._v(" tag, if breaking changes are introduced.")]),e._v(" "),a("li",[e._v("The "),a("code",[e._v("Telemetry")]),e._v(" tag, if telemetry changes are introduced.")]),e._v(" "),a("li",[e._v("The "),a("code",[e._v("OpenAPI")]),e._v(" tag, if the "),a("a",{attrs:{href:"open-api.yaml"}},[e._v("open-api")]),e._v(" specification will see changes introduced.")])])])]),e._v(" "),a("hr"),e._v(" "),a("h1",{attrs:{id:"release-worfklow"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#release-worfklow"}},[e._v("#")]),e._v(" Release Worfklow")]),e._v(" "),a("p",[e._v("The following steps should happen the day a Meilisearch release is shipped:")]),e._v(" "),a("ul",[a("li",[e._v("Pull-requests describing changes for a release are squashed and merged into the corresponding "),a("code",[e._v("release-vX.X.X")]),e._v(" branch.")]),e._v(" "),a("li",[a("code",[e._v("release-vX.X.X")]),e._v(" is squashed and merged into "),a("code",[e._v("main")]),e._v(".")]),e._v(" "),a("li",[a("code",[e._v("open-api.yml")]),e._v(" version is deployed on bump.sh.")])]),e._v(" "),a("hr"),e._v(" "),a("h2",{attrs:{id:"specification-file-format"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#specification-file-format"}},[e._v("#")]),e._v(" Specification File Format")]),e._v(" "),a("p",[e._v("Meilisearch's feature specifications are made up of five sections, described below.")]),e._v(" "),a("h3",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("Summarize the specification with a short paragraph.")]),e._v(" "),a("h3",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[e._v("Explain which use cases are supported.")]),e._v(" "),a("h3",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("p",[e._v("This section gives a high level overview of the feature. It should avoid technical language so that it can be understood by a general audience (think user-level).")]),e._v(" "),a("ul",[a("li",[e._v("Describe the API resource and endpoints. (Methods, URL, query parameters, body definition, status code).")]),e._v(" "),a("li",[e._v("Explain the feature through examples.")]),e._v(" "),a("li",[e._v("List error cases.")])]),e._v(" "),a("h3",{attrs:{id:"_4-technical-details-optional"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details-optional"}},[e._v("#")]),e._v(" 4. Technical Details (Optional)")]),e._v(" "),a("p",[e._v('When needed, we recommend describing practical aspects of implementation, e.g. specific algorithmic choices. If none, fill the section body with "n/a".')]),e._v(" "),a("h3",{attrs:{id:"_5-future-possibilities-optional"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities-optional"}},[e._v("#")]),e._v(" 5. Future Possibilities (Optional)")]),e._v(" "),a("p",[e._v('This last section includes any related topics or features which are not currently in Meilisearch and will not be added now, but which may be explored in the future. If none, fill the section body with "n/a".')])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/11.16951e4b.js b/docs/assets/js/11.b7de9b10.js similarity index 97% rename from docs/assets/js/11.16951e4b.js rename to docs/assets/js/11.b7de9b10.js index 44d3bfae3..59482a936 100644 --- a/docs/assets/js/11.16951e4b.js +++ b/docs/assets/js/11.b7de9b10.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{436:function(e,t,a){"use strict";a.r(t);var s=a(62),i=Object(s.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("p",[e._v("🤖 "),a("a",{attrs:{href:""}},[e._v("API Diff")]),e._v(" "),a("em",[e._v("Put the link of the GitHub comment generated by bump.sh if generated; Apply the "),a("code",[e._v("OpenApi")]),e._v(" label")])]),e._v(" "),a("hr"),e._v(" "),a("h1",{attrs:{id:"summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#summary"}},[e._v("#")]),e._v(" Summary")]),e._v(" "),a("p",[a("em",[e._v("Explain with a few sentences the goal of the specification")])]),e._v(" "),a("hr"),e._v(" "),a("h1",{attrs:{id:"changes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#changes"}},[e._v("#")]),e._v(" Changes")]),e._v(" "),a("p",[a("em",[e._v("Explain in a clear way the changes bring by the specification; Bullet points FTW;")])]),e._v(" "),a("h1",{attrs:{id:"out-of-scope"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#out-of-scope"}},[e._v("#")]),e._v(" Out Of Scope")]),e._v(" "),a("p",[a("em",[e._v("Explain in clear way subjects that are out of scope and shouldn't be discussed by the reviewers")])]),e._v(" "),a("hr"),e._v(" "),a("h1",{attrs:{id:"attention-to-reviewers"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#attention-to-reviewers"}},[e._v("#")]),e._v(" Attention To Reviewers")]),e._v(" "),a("p",[a("em",[e._v("Explain clearly what reviewers should specifically look for to facilitate the review phase. Also, mention the sections that will not necessarily be taken into account if reviewed.")])]),e._v(" "),a("hr"),e._v(" "),a("h2",{attrs:{id:"misc"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#misc"}},[e._v("#")]),e._v(" Misc")]),e._v(" "),a("ul",[a("li",[e._v("[] Update OpenAPI specification file "),a("em",[e._v("(if needed; Apply the "),a("code",[e._v("OpenApi")]),e._v(" label)")])]),e._v(" "),a("li",[e._v("[] Update telemetry datapoints "),a("em",[e._v("(if needed; Apply the "),a("code",[e._v("Telemetry")]),e._v(" label)")])])])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{434:function(e,t,a){"use strict";a.r(t);var s=a(62),i=Object(s.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("p",[e._v("🤖 "),a("a",{attrs:{href:""}},[e._v("API Diff")]),e._v(" "),a("em",[e._v("Put the link of the GitHub comment generated by bump.sh if generated; Apply the "),a("code",[e._v("OpenApi")]),e._v(" label")])]),e._v(" "),a("hr"),e._v(" "),a("h1",{attrs:{id:"summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#summary"}},[e._v("#")]),e._v(" Summary")]),e._v(" "),a("p",[a("em",[e._v("Explain with a few sentences the goal of the specification")])]),e._v(" "),a("hr"),e._v(" "),a("h1",{attrs:{id:"changes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#changes"}},[e._v("#")]),e._v(" Changes")]),e._v(" "),a("p",[a("em",[e._v("Explain in a clear way the changes bring by the specification; Bullet points FTW;")])]),e._v(" "),a("h1",{attrs:{id:"out-of-scope"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#out-of-scope"}},[e._v("#")]),e._v(" Out Of Scope")]),e._v(" "),a("p",[a("em",[e._v("Explain in clear way subjects that are out of scope and shouldn't be discussed by the reviewers")])]),e._v(" "),a("hr"),e._v(" "),a("h1",{attrs:{id:"attention-to-reviewers"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#attention-to-reviewers"}},[e._v("#")]),e._v(" Attention To Reviewers")]),e._v(" "),a("p",[a("em",[e._v("Explain clearly what reviewers should specifically look for to facilitate the review phase. Also, mention the sections that will not necessarily be taken into account if reviewed.")])]),e._v(" "),a("hr"),e._v(" "),a("h2",{attrs:{id:"misc"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#misc"}},[e._v("#")]),e._v(" Misc")]),e._v(" "),a("ul",[a("li",[e._v("[] Update OpenAPI specification file "),a("em",[e._v("(if needed; Apply the "),a("code",[e._v("OpenApi")]),e._v(" label)")])]),e._v(" "),a("li",[e._v("[] Update telemetry datapoints "),a("em",[e._v("(if needed; Apply the "),a("code",[e._v("Telemetry")]),e._v(" label)")])])])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/13.14b033e0.js b/docs/assets/js/13.5ee4202d.js similarity index 98% rename from docs/assets/js/13.14b033e0.js rename to docs/assets/js/13.5ee4202d.js index 63ef689f2..0edf1b5be 100644 --- a/docs/assets/js/13.14b033e0.js +++ b/docs/assets/js/13.5ee4202d.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{438:function(e,t,i){"use strict";i.r(t);var a=i(62),r=Object(a.a)({},(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[i("ul",[i("li",[e._v("Title: Optional Meilisearch Front-end")]),e._v(" "),i("li",[e._v("Start Date: 2020/11/16")]),e._v(" "),i("li",[e._v("specification PR: #8")]),e._v(" "),i("li",[e._v("Meilisearch Issue: #411")])]),e._v(" "),i("h1",{attrs:{id:"optional-meilisearch-front-end"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#optional-meilisearch-front-end"}},[e._v("#")]),e._v(" Optional Meilisearch Front-end")]),e._v(" "),i("h2",{attrs:{id:"first-section-feature-description-and-interaction"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#first-section-feature-description-and-interaction"}},[e._v("#")]),e._v(" First section: Feature Description and Interaction")]),e._v(" "),i("h3",{attrs:{id:"summary"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#summary"}},[e._v("#")]),e._v(" Summary")]),e._v(" "),i("p",[e._v("For testing purposes, MeiliSearch is shipped with a frontend that is served at the server's root. This provides the user with a basic GUI to perform searches on his documents. While this is useful in a development environment, this is not necessarily desirable in a production environment. This specification proposes to remove this frontend in a production environment.")]),e._v(" "),i("h3",{attrs:{id:"motivation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#motivation"}},[e._v("#")]),e._v(" Motivation")]),e._v(" "),i("p",[e._v("This frontend was developed for testing purposes, therefore it should only be present in a development environment.")]),e._v(" "),i("h3",{attrs:{id:"prior-art-and-r-d"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#prior-art-and-r-d"}},[e._v("#")]),e._v(" Prior Art and R&D")]),e._v(" "),i("p",[e._v("N.A")]),e._v(" "),i("h3",{attrs:{id:"explanation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#explanation"}},[e._v("#")]),e._v(" Explanation")]),e._v(" "),i("p",[e._v("When the option "),i("code",[e._v("--env")]),e._v(" or "),i("code",[e._v("MEILI_ENV")]),e._v(" is set to "),i("code",[e._v("production")]),e._v(", the frontend is disabled.")]),e._v(" "),i("h3",{attrs:{id:"impact-on-documentation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#impact-on-documentation"}},[e._v("#")]),e._v(" Impact on documentation")]),e._v(" "),i("p",[e._v("Documentation needs to be updated in:")]),e._v(" "),i("ul",[i("li",[e._v("The "),i("a",{attrs:{href:"https://docs.meilisearch.com/guides/advanced_guides/configuration.html#environment",target:"_blank",rel:"noopener noreferrer"}},[e._v("environment documentation"),i("OutboundLink")],1)]),e._v(" "),i("li",[e._v("The "),i("a",{attrs:{href:"https://docs.meilisearch.com/guides/advanced_guides/web_interface.html#web-interface",target:"_blank",rel:"noopener noreferrer"}},[e._v("web interface documentation"),i("OutboundLink")],1)])]),e._v(" "),i("h2",{attrs:{id:"second-section-technical-specifications"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#second-section-technical-specifications"}},[e._v("#")]),e._v(" Second Section: Technical Specifications")]),e._v(" "),i("h3",{attrs:{id:"architecture"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#architecture"}},[e._v("#")]),e._v(" Architecture")]),e._v(" "),i("p",[e._v("N.A")]),e._v(" "),i("h3",{attrs:{id:"implementation-details"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#implementation-details"}},[e._v("#")]),e._v(" Implementation Details")]),e._v(" "),i("p",[e._v("Pass an argument to "),i("code",[e._v("create_app")]),e._v(" to conditionally enable the frontend service.")]),e._v(" "),i("h3",{attrs:{id:"corner-cases"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#corner-cases"}},[e._v("#")]),e._v(" Corner Cases")]),e._v(" "),i("p",[e._v("TDB")]),e._v(" "),i("h2",{attrs:{id:"third-section-future-possibilities"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#third-section-future-possibilities"}},[e._v("#")]),e._v(" Third Section: Future possibilities")]),e._v(" "),i("ul",[i("li",[e._v("Add an opt-in flag to re-enable the frontend in production environment, as suggested per "),i("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/8#issuecomment-729676988",target:"_blank",rel:"noopener noreferrer"}},[e._v("comment"),i("OutboundLink")],1)])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{436:function(e,t,i){"use strict";i.r(t);var a=i(62),r=Object(a.a)({},(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[i("ul",[i("li",[e._v("Title: Optional Meilisearch Front-end")]),e._v(" "),i("li",[e._v("Start Date: 2020/11/16")]),e._v(" "),i("li",[e._v("specification PR: #8")]),e._v(" "),i("li",[e._v("Meilisearch Issue: #411")])]),e._v(" "),i("h1",{attrs:{id:"optional-meilisearch-front-end"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#optional-meilisearch-front-end"}},[e._v("#")]),e._v(" Optional Meilisearch Front-end")]),e._v(" "),i("h2",{attrs:{id:"first-section-feature-description-and-interaction"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#first-section-feature-description-and-interaction"}},[e._v("#")]),e._v(" First section: Feature Description and Interaction")]),e._v(" "),i("h3",{attrs:{id:"summary"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#summary"}},[e._v("#")]),e._v(" Summary")]),e._v(" "),i("p",[e._v("For testing purposes, MeiliSearch is shipped with a frontend that is served at the server's root. This provides the user with a basic GUI to perform searches on his documents. While this is useful in a development environment, this is not necessarily desirable in a production environment. This specification proposes to remove this frontend in a production environment.")]),e._v(" "),i("h3",{attrs:{id:"motivation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#motivation"}},[e._v("#")]),e._v(" Motivation")]),e._v(" "),i("p",[e._v("This frontend was developed for testing purposes, therefore it should only be present in a development environment.")]),e._v(" "),i("h3",{attrs:{id:"prior-art-and-r-d"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#prior-art-and-r-d"}},[e._v("#")]),e._v(" Prior Art and R&D")]),e._v(" "),i("p",[e._v("N.A")]),e._v(" "),i("h3",{attrs:{id:"explanation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#explanation"}},[e._v("#")]),e._v(" Explanation")]),e._v(" "),i("p",[e._v("When the option "),i("code",[e._v("--env")]),e._v(" or "),i("code",[e._v("MEILI_ENV")]),e._v(" is set to "),i("code",[e._v("production")]),e._v(", the frontend is disabled.")]),e._v(" "),i("h3",{attrs:{id:"impact-on-documentation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#impact-on-documentation"}},[e._v("#")]),e._v(" Impact on documentation")]),e._v(" "),i("p",[e._v("Documentation needs to be updated in:")]),e._v(" "),i("ul",[i("li",[e._v("The "),i("a",{attrs:{href:"https://docs.meilisearch.com/guides/advanced_guides/configuration.html#environment",target:"_blank",rel:"noopener noreferrer"}},[e._v("environment documentation"),i("OutboundLink")],1)]),e._v(" "),i("li",[e._v("The "),i("a",{attrs:{href:"https://docs.meilisearch.com/guides/advanced_guides/web_interface.html#web-interface",target:"_blank",rel:"noopener noreferrer"}},[e._v("web interface documentation"),i("OutboundLink")],1)])]),e._v(" "),i("h2",{attrs:{id:"second-section-technical-specifications"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#second-section-technical-specifications"}},[e._v("#")]),e._v(" Second Section: Technical Specifications")]),e._v(" "),i("h3",{attrs:{id:"architecture"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#architecture"}},[e._v("#")]),e._v(" Architecture")]),e._v(" "),i("p",[e._v("N.A")]),e._v(" "),i("h3",{attrs:{id:"implementation-details"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#implementation-details"}},[e._v("#")]),e._v(" Implementation Details")]),e._v(" "),i("p",[e._v("Pass an argument to "),i("code",[e._v("create_app")]),e._v(" to conditionally enable the frontend service.")]),e._v(" "),i("h3",{attrs:{id:"corner-cases"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#corner-cases"}},[e._v("#")]),e._v(" Corner Cases")]),e._v(" "),i("p",[e._v("TDB")]),e._v(" "),i("h2",{attrs:{id:"third-section-future-possibilities"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#third-section-future-possibilities"}},[e._v("#")]),e._v(" Third Section: Future possibilities")]),e._v(" "),i("ul",[i("li",[e._v("Add an opt-in flag to re-enable the frontend in production environment, as suggested per "),i("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/8#issuecomment-729676988",target:"_blank",rel:"noopener noreferrer"}},[e._v("comment"),i("OutboundLink")],1)])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/14.c09b1487.js b/docs/assets/js/14.9305fa09.js similarity index 99% rename from docs/assets/js/14.c09b1487.js rename to docs/assets/js/14.9305fa09.js index 262c4c8b6..98e1ae9ca 100644 --- a/docs/assets/js/14.c09b1487.js +++ b/docs/assets/js/14.9305fa09.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{437:function(t,s,a){"use strict";a.r(s);var n=a(62),e=Object(n.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("ul",[a("li",[t._v("Title: Script Based Tokenizer")]),t._v(" "),a("li",[t._v("Start Date: 2020-10-27")]),t._v(" "),a("li",[t._v("specification PR: meilisearch/specifications#2")]),t._v(" "),a("li",[t._v("Meilisearch Issue: meilisearch/Meilsearch#624")])]),t._v(" "),a("h2",{attrs:{id:"feature-description-and-interaction"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#feature-description-and-interaction"}},[t._v("#")]),t._v(" Feature Description and Interaction")]),t._v(" "),a("h3",{attrs:{id:"summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#summary"}},[t._v("#")]),t._v(" Summary")]),t._v(" "),a("p",[t._v("The first step of document indexing in the Meilisearch engine is tokenization. Tokenization is the action of taking a sentence and splitting it in units of language called tokens. The tokenization task is highly language dependant and is a critical factor in the quality of the search results.")]),t._v(" "),a("h3",{attrs:{id:"motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#motivation"}},[t._v("#")]),t._v(" Motivation")]),t._v(" "),a("p",[t._v("We want to provide our users with an always improved searching experience. For that matter, it is critical for us to improve the performance of our tokenizer, and to provide better support for multilingual tokenization.")]),t._v(" "),a("h3",{attrs:{id:"prior-art-and-r-d"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#prior-art-and-r-d"}},[t._v("#")]),t._v(" Prior Art and R&D")]),t._v(" "),a("p",[a("strong",[t._v("tokenization:")])]),t._v(" "),a("ul",[a("li",[a("blockquote",[a("p",[a("strong",[a("a",{attrs:{href:"https://github.com/unicode-rs/unicode-segmentation",target:"_blank",rel:"noopener noreferrer"}},[t._v("unicode-segmentation"),a("OutboundLink")],1),t._v(":")]),t._v("\ntokenizer which follow the "),a("a",{attrs:{href:"http://www.unicode.org/reports/tr29/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Standard Annex #29: Unicode Text Segmentation"),a("OutboundLink")],1),t._v(",\nthis tokenizer seems promising for Latin scripts.")])])]),t._v(" "),a("li",[a("blockquote",[a("p",[a("strong",[a("a",{attrs:{href:"https://github.com/messense/jieba-rs",target:"_blank",rel:"noopener noreferrer"}},[t._v("Jieba"),a("OutboundLink")],1),t._v(":")]),t._v("\ntokenizer specialized in Chinese languages")])])]),t._v(" "),a("li",[a("blockquote",[a("p",[a("strong",[a("a",{attrs:{href:"https://github.com/lindera-morphology/lindera",target:"_blank",rel:"noopener noreferrer"}},[t._v("Lindera"),a("OutboundLink")],1),t._v(":")]),t._v("\nJapanese and Korean")])])])]),t._v(" "),a("p",[a("strong",[t._v("lang/script detection:")])]),t._v(" "),a("ul",[a("li",[a("blockquote",[a("p",[a("strong",[a("a",{attrs:{href:"https://github.com/greyblake/whatlang-rs",target:"_blank",rel:"noopener noreferrer"}},[t._v("whatlang"),a("OutboundLink")],1),t._v(":")]),t._v("\nwhatlang is able to detect script or/and language in a text,\nlanguage detection is low but the script is acceptable.\nnote: Sonic also uses whatlang to perform the tokenization, it could be interesting to check out how they do it.")])])]),t._v(" "),a("li",[a("blockquote",[a("p",[a("strong",[t._v("toku (@qdequele):")]),t._v("\nin a R&D project, @qdequele was able to detect language based on stop word distribution in a text.\nIf, in a latin script, there is lot of French stop words then the text language is probably french.")])])])]),t._v(" "),a("p",[a("strong",[t._v("other solution that advertise multilingual support:")])]),t._v(" "),a("ul",[a("li",[t._v("Sonic uses whatlang to perform the tokenization, it could be interesting to checkout how they do it: https://github.com/valeriansaliou/sonic/tree/master/src/lexer\n"),a("ul",[a("li",[t._v("Sonic uses whatlang to detect the languages but doesn't actually seem to use it to segment the text. It simply uses unicode segmentation, I can't really explain what they actually do with the language information.")])])]),t._v(" "),a("li",[t._v("tantivy advertise good multilingual support: https://github.com/tantivy-search/tantivy/tree/main/src/tokenizer\n"),a("ul",[a("li",[t._v("Tantivy is similar to elastic in the sense that you can set up a custom text analyzer. The difference is that it is only made of "),a("code",[t._v("tokenizer")]),t._v(" -> "),a("code",[t._v("token_filter")]),t._v(". Tantivy also provides a collection of tokenizer to choose from. Tokens are rather simple and do not contain any metadata, except for their position.")])])]),t._v(" "),a("li",[t._v("How elastic search handle it: https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-tokenizers.html:\n"),a("ul",[a("li",[t._v("Elastic proposed to create custom text analyzer. A text analyzer is a pipelined text processor with the following components: "),a("code",[t._v("char_filter")]),t._v(" -> "),a("code",[t._v("tokenizer")]),t._v(" -> "),a("code",[t._v("token_filter")]),t._v(". There are multiple different tokenizers that can be chosen, depending on the use-case. This is a bit complicated, but I also think that advanced users should be able to choose the tokenizer they want. (default behavior is us guessing what's the best tokenizer to use.)")])])]),t._v(" "),a("li",[t._v("Algolia:\n"),a("ul",[a("li",[t._v("Algolia uses multiple techniques to handle tokenization. They start by "),a("a",{attrs:{href:"https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/",target:"_blank",rel:"noopener noreferrer"}},[t._v("normalizing"),a("OutboundLink")],1),t._v(" the text (lowercase, unidecode, transform traditional Chinese to modern, etc). Then, they tokenize the normalized data. It seems that the tokenization is based on two techniques. The first one is by "),a("a",{attrs:{href:"https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/",target:"_blank",rel:"noopener noreferrer"}},[t._v("defining separators"),a("OutboundLink")],1),t._v(" (space, comma, carriage return, etc) and the other one is with "),a("a",{attrs:{href:"https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#using-dictionaries",target:"_blank",rel:"noopener noreferrer"}},[t._v("dictionaries"),a("OutboundLink")],1),t._v(". The language is not automatically detected, "),a("a",{attrs:{href:"https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#no-automatic-language-detection",target:"_blank",rel:"noopener noreferrer"}},[t._v("it must be set by the user"),a("OutboundLink")],1),t._v(". They also have dictionaries for plurals.")])])])]),t._v(" "),a("h3",{attrs:{id:"explanation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#explanation"}},[t._v("#")]),t._v(" Explanation")]),t._v(" "),a("p",[t._v("In order to use the tokenizer, all the user has to do is to instantiate a "),a("code",[t._v("Tokenizer")]),t._v(", call "),a("code",[t._v("tokenize(&str)")]),t._v(" on it and iterate over the emitted tokens:")]),t._v(" "),a("div",{staticClass:"language-rust extra-class"},[a("pre",{pre:!0,attrs:{class:"language-rust"}},[a("code",[t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("use")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token namespace"}},[t._v("fst"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")])]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Set")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("use")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token namespace"}},[t._v("charabia"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")])]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenizerBuilder")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// text to tokenize.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" orig "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The quick (\\"brown\\") fox can\'t jump 32.3 feet, right? Brr, it\'s 29.3°F!"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// create the builder.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("mut")]),t._v(" builder "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenizerBuilder")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("new")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// create a set of stop words.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" stop_words "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Set")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("from_iter")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"the"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("iter")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("unwrap")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// configurate stop words.")]),t._v("\n builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("stop_words")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),t._v("stop_words"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// build the tokenizer passing the text to tokenize.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" tokenizer "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("build")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tokenize original string")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("mut")]),t._v(" tokens "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" tokenizer"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("tokenize")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("orig"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Token")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" lemma"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" kind"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" tokens"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("next")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("unwrap")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token macro property"}},[t._v("assert_eq!")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("lemma"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"the"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token macro property"}},[t._v("assert_eq!")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("kind"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenKind")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Word")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Token")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" lemma"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" kind"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" tokens"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("next")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("unwrap")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token macro property"}},[t._v("assert_eq!")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("lemma"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('" "')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token macro property"}},[t._v("assert_eq!")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("kind"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenKind")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Separator")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SeparatorKind")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Soft")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Token")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" lemma"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" kind"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" tokens"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("next")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("unwrap")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token macro property"}},[t._v("assert_eq!")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("lemma"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"quick"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token macro property"}},[t._v("assert_eq!")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("kind"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenKind")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Word")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("p",[t._v("The call to the tokenize method allows the reuse of the same "),a("code",[t._v("Tokenizer")]),t._v(" instance, and keep its configuration state and allocations.")]),t._v(" "),a("p",[t._v("Below are examples of the integration of the new tokenizer in existing code:")]),t._v(" "),a("ul",[a("li",[t._v("Highlight in @kerollmops milli:")])]),t._v(" "),a("div",{staticClass:"language-rust extra-class"},[a("pre",{pre:!0,attrs:{class:"language-rust"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// new tokenizer")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("fn")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function-definition function"}},[t._v("highlight_record")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("record"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("mut")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("IndexMap")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" words"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("HashSet")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// create the builder.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("mut")]),t._v(" builder "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenizerBuilder")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("new")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// create a set of stop words.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" stop_words "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Set")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("from_iter")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"the"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("iter")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("unwrap")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// configurate stop words.")]),t._v("\n builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("stop_words")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),t._v("stop_words"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// build the tokenizer passing the text to tokenize.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" tokenizer "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("build")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("_key"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" record"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("iter_mut")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" old_value "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token namespace"}},[t._v("mem"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")])]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("take")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// reuse tokenizer at each iteration")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" tokens "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" tokenizer"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("reconstruct")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),t._v("old_value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("original"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" tokens "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("is_word")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" to_highlight "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" words"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("contains")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),t._v("token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("text")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" to_highlight "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push_str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push_str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("original"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" to_highlight "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push_str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push_str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("original"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"language-rust extra-class"},[a("pre",{pre:!0,attrs:{class:"language-rust"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// original")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("fn")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function-definition function"}},[t._v("highlight_record")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("record"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("mut")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("IndexMap")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" words"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("HashSet")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("_key"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" record"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("iter_mut")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" old_value "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token namespace"}},[t._v("mem"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")])]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("take")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("token_type"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("simple_tokenizer")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),t._v("old_value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" token_type "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenType")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Word")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" lowercase_token "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("to_lowercase")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" to_highlight "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" words"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("contains")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),t._v("lowercase_token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" to_highlight "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push_str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push_str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" to_highlight "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push_str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push_str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("As we can see, the changes that need to be made are very minimal: this is because efforts have been made to make its API close to the previous one.")]),t._v(" "),a("h3",{attrs:{id:"impact-on-documentation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#impact-on-documentation"}},[t._v("#")]),t._v(" Impact on documentation")]),t._v(" "),a("p",[t._v("This feature should not impact meilisearch users' documentation.\nIn future versions, we will probably provide a way to configure tokenizer and this will be discussed in a new specification.")]),t._v(" "),a("h2",{attrs:{id:"technical-specifications"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#technical-specifications"}},[t._v("#")]),t._v(" Technical Specifications")]),t._v(" "),a("h3",{attrs:{id:"architecture"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#architecture"}},[t._v("#")]),t._v(" Architecture")]),t._v(" "),a("p",[t._v("The new version of the tokenizer will replace the current version as a "),a("a",{attrs:{href:"https://crates.io/crates/charabia",target:"_blank",rel:"noopener noreferrer"}},[t._v("standalone library named charabia"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h3",{attrs:{id:"implementation-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#implementation-details"}},[t._v("#")]),t._v(" Implementation Details")]),t._v(" "),a("p",[t._v("We want to support different tokenizers based on the language of the text that needs to be indexed. For this, we may need to change the tokenizer we are using while indexing, depending on the language and the script, detected by "),a("code",[t._v("whatlang")]),t._v(". The Tokenizer provides an interface that abstracts this need away from the consumer of the tokens.")]),t._v(" "),a("p",[t._v("See "),a("a",{attrs:{href:"https://docs.rs/charabia",target:"_blank",rel:"noopener noreferrer"}},[t._v("the official documentation"),a("OutboundLink")],1),t._v(" to know more about the API of the library.")]),t._v(" "),a("p",[t._v("See the repository "),a("a",{attrs:{href:"https://github.com/meilisearch/charabia/blob/main/CONTRIBUTING.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("Contributing.md"),a("OutboundLink")],1),t._v(" to know more about contribution that can be made by the community.")]),t._v(" "),a("h2",{attrs:{id:"future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#future-possibilities"}},[t._v("#")]),t._v(" Future possibilities")]),t._v(" "),a("ul",[a("li",[t._v("We should add a way to configure the tokenizer to enforce a specific language/script")]),t._v(" "),a("li",[t._v("We should add a way to configure tokenizer whitelisting/blacklisting separators")]),t._v(" "),a("li",[t._v("The tokenizer specified here is based on scripts, we should base it on languages to be able to have default stop-words for each language")]),t._v(" "),a("li",[t._v("We will want in the future to allow user configuration for the tokenizer. This is taken into account in the design of the new Tokenizer.")])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{438:function(t,s,a){"use strict";a.r(s);var n=a(62),e=Object(n.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("ul",[a("li",[t._v("Title: Script Based Tokenizer")]),t._v(" "),a("li",[t._v("Start Date: 2020-10-27")]),t._v(" "),a("li",[t._v("specification PR: meilisearch/specifications#2")]),t._v(" "),a("li",[t._v("Meilisearch Issue: meilisearch/Meilsearch#624")])]),t._v(" "),a("h2",{attrs:{id:"feature-description-and-interaction"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#feature-description-and-interaction"}},[t._v("#")]),t._v(" Feature Description and Interaction")]),t._v(" "),a("h3",{attrs:{id:"summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#summary"}},[t._v("#")]),t._v(" Summary")]),t._v(" "),a("p",[t._v("The first step of document indexing in the Meilisearch engine is tokenization. Tokenization is the action of taking a sentence and splitting it in units of language called tokens. The tokenization task is highly language dependant and is a critical factor in the quality of the search results.")]),t._v(" "),a("h3",{attrs:{id:"motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#motivation"}},[t._v("#")]),t._v(" Motivation")]),t._v(" "),a("p",[t._v("We want to provide our users with an always improved searching experience. For that matter, it is critical for us to improve the performance of our tokenizer, and to provide better support for multilingual tokenization.")]),t._v(" "),a("h3",{attrs:{id:"prior-art-and-r-d"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#prior-art-and-r-d"}},[t._v("#")]),t._v(" Prior Art and R&D")]),t._v(" "),a("p",[a("strong",[t._v("tokenization:")])]),t._v(" "),a("ul",[a("li",[a("blockquote",[a("p",[a("strong",[a("a",{attrs:{href:"https://github.com/unicode-rs/unicode-segmentation",target:"_blank",rel:"noopener noreferrer"}},[t._v("unicode-segmentation"),a("OutboundLink")],1),t._v(":")]),t._v("\ntokenizer which follow the "),a("a",{attrs:{href:"http://www.unicode.org/reports/tr29/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Standard Annex #29: Unicode Text Segmentation"),a("OutboundLink")],1),t._v(",\nthis tokenizer seems promising for Latin scripts.")])])]),t._v(" "),a("li",[a("blockquote",[a("p",[a("strong",[a("a",{attrs:{href:"https://github.com/messense/jieba-rs",target:"_blank",rel:"noopener noreferrer"}},[t._v("Jieba"),a("OutboundLink")],1),t._v(":")]),t._v("\ntokenizer specialized in Chinese languages")])])]),t._v(" "),a("li",[a("blockquote",[a("p",[a("strong",[a("a",{attrs:{href:"https://github.com/lindera-morphology/lindera",target:"_blank",rel:"noopener noreferrer"}},[t._v("Lindera"),a("OutboundLink")],1),t._v(":")]),t._v("\nJapanese and Korean")])])])]),t._v(" "),a("p",[a("strong",[t._v("lang/script detection:")])]),t._v(" "),a("ul",[a("li",[a("blockquote",[a("p",[a("strong",[a("a",{attrs:{href:"https://github.com/greyblake/whatlang-rs",target:"_blank",rel:"noopener noreferrer"}},[t._v("whatlang"),a("OutboundLink")],1),t._v(":")]),t._v("\nwhatlang is able to detect script or/and language in a text,\nlanguage detection is low but the script is acceptable.\nnote: Sonic also uses whatlang to perform the tokenization, it could be interesting to check out how they do it.")])])]),t._v(" "),a("li",[a("blockquote",[a("p",[a("strong",[t._v("toku (@qdequele):")]),t._v("\nin a R&D project, @qdequele was able to detect language based on stop word distribution in a text.\nIf, in a latin script, there is lot of French stop words then the text language is probably french.")])])])]),t._v(" "),a("p",[a("strong",[t._v("other solution that advertise multilingual support:")])]),t._v(" "),a("ul",[a("li",[t._v("Sonic uses whatlang to perform the tokenization, it could be interesting to checkout how they do it: https://github.com/valeriansaliou/sonic/tree/master/src/lexer\n"),a("ul",[a("li",[t._v("Sonic uses whatlang to detect the languages but doesn't actually seem to use it to segment the text. It simply uses unicode segmentation, I can't really explain what they actually do with the language information.")])])]),t._v(" "),a("li",[t._v("tantivy advertise good multilingual support: https://github.com/tantivy-search/tantivy/tree/main/src/tokenizer\n"),a("ul",[a("li",[t._v("Tantivy is similar to elastic in the sense that you can set up a custom text analyzer. The difference is that it is only made of "),a("code",[t._v("tokenizer")]),t._v(" -> "),a("code",[t._v("token_filter")]),t._v(". Tantivy also provides a collection of tokenizer to choose from. Tokens are rather simple and do not contain any metadata, except for their position.")])])]),t._v(" "),a("li",[t._v("How elastic search handle it: https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-tokenizers.html:\n"),a("ul",[a("li",[t._v("Elastic proposed to create custom text analyzer. A text analyzer is a pipelined text processor with the following components: "),a("code",[t._v("char_filter")]),t._v(" -> "),a("code",[t._v("tokenizer")]),t._v(" -> "),a("code",[t._v("token_filter")]),t._v(". There are multiple different tokenizers that can be chosen, depending on the use-case. This is a bit complicated, but I also think that advanced users should be able to choose the tokenizer they want. (default behavior is us guessing what's the best tokenizer to use.)")])])]),t._v(" "),a("li",[t._v("Algolia:\n"),a("ul",[a("li",[t._v("Algolia uses multiple techniques to handle tokenization. They start by "),a("a",{attrs:{href:"https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/",target:"_blank",rel:"noopener noreferrer"}},[t._v("normalizing"),a("OutboundLink")],1),t._v(" the text (lowercase, unidecode, transform traditional Chinese to modern, etc). Then, they tokenize the normalized data. It seems that the tokenization is based on two techniques. The first one is by "),a("a",{attrs:{href:"https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/",target:"_blank",rel:"noopener noreferrer"}},[t._v("defining separators"),a("OutboundLink")],1),t._v(" (space, comma, carriage return, etc) and the other one is with "),a("a",{attrs:{href:"https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#using-dictionaries",target:"_blank",rel:"noopener noreferrer"}},[t._v("dictionaries"),a("OutboundLink")],1),t._v(". The language is not automatically detected, "),a("a",{attrs:{href:"https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#no-automatic-language-detection",target:"_blank",rel:"noopener noreferrer"}},[t._v("it must be set by the user"),a("OutboundLink")],1),t._v(". They also have dictionaries for plurals.")])])])]),t._v(" "),a("h3",{attrs:{id:"explanation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#explanation"}},[t._v("#")]),t._v(" Explanation")]),t._v(" "),a("p",[t._v("In order to use the tokenizer, all the user has to do is to instantiate a "),a("code",[t._v("Tokenizer")]),t._v(", call "),a("code",[t._v("tokenize(&str)")]),t._v(" on it and iterate over the emitted tokens:")]),t._v(" "),a("div",{staticClass:"language-rust extra-class"},[a("pre",{pre:!0,attrs:{class:"language-rust"}},[a("code",[t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("use")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token namespace"}},[t._v("fst"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")])]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Set")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("use")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token namespace"}},[t._v("charabia"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")])]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenizerBuilder")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// text to tokenize.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" orig "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The quick (\\"brown\\") fox can\'t jump 32.3 feet, right? Brr, it\'s 29.3°F!"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// create the builder.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("mut")]),t._v(" builder "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenizerBuilder")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("new")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// create a set of stop words.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" stop_words "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Set")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("from_iter")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"the"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("iter")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("unwrap")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// configurate stop words.")]),t._v("\n builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("stop_words")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),t._v("stop_words"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// build the tokenizer passing the text to tokenize.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" tokenizer "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("build")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tokenize original string")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("mut")]),t._v(" tokens "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" tokenizer"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("tokenize")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("orig"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Token")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" lemma"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" kind"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" tokens"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("next")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("unwrap")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token macro property"}},[t._v("assert_eq!")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("lemma"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"the"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token macro property"}},[t._v("assert_eq!")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("kind"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenKind")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Word")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Token")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" lemma"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" kind"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" tokens"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("next")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("unwrap")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token macro property"}},[t._v("assert_eq!")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("lemma"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('" "')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token macro property"}},[t._v("assert_eq!")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("kind"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenKind")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Separator")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SeparatorKind")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Soft")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Token")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" lemma"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" kind"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" tokens"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("next")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("unwrap")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token macro property"}},[t._v("assert_eq!")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("lemma"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"quick"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token macro property"}},[t._v("assert_eq!")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("kind"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenKind")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Word")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("p",[t._v("The call to the tokenize method allows the reuse of the same "),a("code",[t._v("Tokenizer")]),t._v(" instance, and keep its configuration state and allocations.")]),t._v(" "),a("p",[t._v("Below are examples of the integration of the new tokenizer in existing code:")]),t._v(" "),a("ul",[a("li",[t._v("Highlight in @kerollmops milli:")])]),t._v(" "),a("div",{staticClass:"language-rust extra-class"},[a("pre",{pre:!0,attrs:{class:"language-rust"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// new tokenizer")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("fn")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function-definition function"}},[t._v("highlight_record")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("record"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("mut")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("IndexMap")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" words"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("HashSet")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// create the builder.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("mut")]),t._v(" builder "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenizerBuilder")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("new")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// create a set of stop words.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" stop_words "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Set")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("from_iter")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"the"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("iter")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("unwrap")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// configurate stop words.")]),t._v("\n builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("stop_words")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),t._v("stop_words"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// build the tokenizer passing the text to tokenize.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" tokenizer "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("build")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("_key"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" record"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("iter_mut")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" old_value "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token namespace"}},[t._v("mem"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")])]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("take")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// reuse tokenizer at each iteration")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" tokens "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" tokenizer"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("reconstruct")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),t._v("old_value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("original"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" tokens "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("is_word")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" to_highlight "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" words"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("contains")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),t._v("token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("text")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" to_highlight "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push_str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push_str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("original"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" to_highlight "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push_str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push_str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("original"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"language-rust extra-class"},[a("pre",{pre:!0,attrs:{class:"language-rust"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// original")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("fn")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function-definition function"}},[t._v("highlight_record")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("record"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("mut")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("IndexMap")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" words"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("HashSet")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("_key"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" record"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("iter_mut")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" old_value "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token namespace"}},[t._v("mem"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")])]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("take")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("token_type"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("simple_tokenizer")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),t._v("old_value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" token_type "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenType")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Word")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" lowercase_token "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("to_lowercase")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" to_highlight "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" words"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("contains")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),t._v("lowercase_token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" to_highlight "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push_str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push_str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" to_highlight "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push_str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push_str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("As we can see, the changes that need to be made are very minimal: this is because efforts have been made to make its API close to the previous one.")]),t._v(" "),a("h3",{attrs:{id:"impact-on-documentation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#impact-on-documentation"}},[t._v("#")]),t._v(" Impact on documentation")]),t._v(" "),a("p",[t._v("This feature should not impact meilisearch users' documentation.\nIn future versions, we will probably provide a way to configure tokenizer and this will be discussed in a new specification.")]),t._v(" "),a("h2",{attrs:{id:"technical-specifications"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#technical-specifications"}},[t._v("#")]),t._v(" Technical Specifications")]),t._v(" "),a("h3",{attrs:{id:"architecture"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#architecture"}},[t._v("#")]),t._v(" Architecture")]),t._v(" "),a("p",[t._v("The new version of the tokenizer will replace the current version as a "),a("a",{attrs:{href:"https://crates.io/crates/charabia",target:"_blank",rel:"noopener noreferrer"}},[t._v("standalone library named charabia"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h3",{attrs:{id:"implementation-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#implementation-details"}},[t._v("#")]),t._v(" Implementation Details")]),t._v(" "),a("p",[t._v("We want to support different tokenizers based on the language of the text that needs to be indexed. For this, we may need to change the tokenizer we are using while indexing, depending on the language and the script, detected by "),a("code",[t._v("whatlang")]),t._v(". The Tokenizer provides an interface that abstracts this need away from the consumer of the tokens.")]),t._v(" "),a("p",[t._v("See "),a("a",{attrs:{href:"https://docs.rs/charabia",target:"_blank",rel:"noopener noreferrer"}},[t._v("the official documentation"),a("OutboundLink")],1),t._v(" to know more about the API of the library.")]),t._v(" "),a("p",[t._v("See the repository "),a("a",{attrs:{href:"https://github.com/meilisearch/charabia/blob/main/CONTRIBUTING.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("Contributing.md"),a("OutboundLink")],1),t._v(" to know more about contribution that can be made by the community.")]),t._v(" "),a("h2",{attrs:{id:"future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#future-possibilities"}},[t._v("#")]),t._v(" Future possibilities")]),t._v(" "),a("ul",[a("li",[t._v("We should add a way to configure the tokenizer to enforce a specific language/script")]),t._v(" "),a("li",[t._v("We should add a way to configure tokenizer whitelisting/blacklisting separators")]),t._v(" "),a("li",[t._v("The tokenizer specified here is based on scripts, we should base it on languages to be able to have default stop-words for each language")]),t._v(" "),a("li",[t._v("We will want in the future to allow user configuration for the tokenizer. This is taken into account in the design of the new Tokenizer.")])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/18.133e0660.js b/docs/assets/js/18.145cf324.js similarity index 99% rename from docs/assets/js/18.133e0660.js rename to docs/assets/js/18.145cf324.js index 1d4e66f2d..fbb4ddd5a 100644 --- a/docs/assets/js/18.133e0660.js +++ b/docs/assets/js/18.145cf324.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{443:function(e,t,a){"use strict";a.r(t);var o=a(62),s=Object(o.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("ul",[a("li",[e._v("Title: Logging")]),e._v(" "),a("li",[e._v("Start Date: 2021-04-21")]),e._v(" "),a("li",[e._v("Specification PR: "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/33",target:"_blank",rel:"noopener noreferrer"}},[e._v("#33"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("MeiliSearch Tracking-issues: "),a("a",{attrs:{href:"https://github.com/meilisearch/transplant/issues/193",target:"_blank",rel:"noopener noreferrer"}},[e._v("transplant/#193"),a("OutboundLink")],1)])]),e._v(" "),a("h1",{attrs:{id:"logging"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#logging"}},[e._v("#")]),e._v(" Logging")]),e._v(" "),a("h2",{attrs:{id:"_1-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-functional-specification"}},[e._v("#")]),e._v(" 1. Functional Specification")]),e._v(" "),a("h3",{attrs:{id:"i-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#i-summary"}},[e._v("#")]),e._v(" I. Summary")]),e._v(" "),a("p",[e._v("As a user of the MeiliSearch binary, I want to be able to know what is happening in the engine at different levels of granularity depending on my needs.")]),e._v(" "),a("h3",{attrs:{id:"ii-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ii-motivation"}},[e._v("#")]),e._v(" II. Motivation")]),e._v(" "),a("p",[e._v("Keeping track of the behavior of a system is useful for those who test, develop and use it in production. The purpose of this specification is to indicate the logging behavior of the search engine.")]),e._v(" "),a("h3",{attrs:{id:"iii-additional-materials"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#iii-additional-materials"}},[e._v("#")]),e._v(" III. Additional Materials")]),e._v(" "),a("h4",{attrs:{id:"algolia"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#algolia"}},[e._v("#")]),e._v(" Algolia")]),e._v(" "),a("p",[e._v("Algolia offers an API endpoint dedicated to retrieving the logs of search and indexing operations.")]),e._v(" "),a("blockquote",[a("p",[e._v("A call on the "),a("code",[e._v("getLogs")]),e._v(" endpoint affect the algolia quota but it is not counted as a log.")]),e._v(" "),a("p",[e._v("The logs are kept for a period of 7 days. After this period, they are no longer accessible from the API.")])]),e._v(" "),a("p",[e._v("Algolia gives parameters to modify the request according to the user's needs.")]),e._v(" "),a("blockquote",[a("p",[e._v("A query performed without parameters returns the last 10 records by default.")]),e._v(" "),a("p",[e._v("The maximum number of logs that can be returned per request is 1000.")])]),e._v(" "),a("p",[e._v("It is possible to use the "),a("code",[e._v("offset")]),e._v(" and "),a("code",[e._v("length")]),e._v(" parameters to search the log entries.")]),e._v(" "),a("p",[e._v("A "),a("code",[e._v("type")]),e._v(" parameter is also provided to select the type of log to retrieve.")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Value")]),e._v(" "),a("th",[e._v("Description")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[e._v("all")]),e._v(" "),a("td",[e._v("All the logs")])]),e._v(" "),a("tr",[a("td",[e._v("query")]),e._v(" "),a("td",[e._v("Exclusively the queries")])]),e._v(" "),a("tr",[a("td",[e._v("build")]),e._v(" "),a("td",[e._v("Exclusively the build operations")])]),e._v(" "),a("tr",[a("td",[e._v("error")]),e._v(" "),a("td",[e._v("Exclusively the errors")])])])]),e._v(" "),a("p",[e._v("Here is the information that Algolia chooses to return:")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Key")]),e._v(" "),a("th",[e._v("Description")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[e._v("timestamp")]),e._v(" "),a("td",[e._v("Timestamp in ISO-8601 format")])]),e._v(" "),a("tr",[a("td",[e._v("method")]),e._v(" "),a("td",[e._v("Rest type of the method")])]),e._v(" "),a("tr",[a("td",[e._v("answer_code")]),e._v(" "),a("td",[e._v("HTTP response code")])]),e._v(" "),a("tr",[a("td",[e._v("query_body")]),e._v(" "),a("td",[e._v("Request body. Limited to 1000 characters")])]),e._v(" "),a("tr",[a("td",[e._v("answer")]),e._v(" "),a("td",[e._v("Answer body. Limited to 1000 characters")])]),e._v(" "),a("tr",[a("td",[e._v("url")]),e._v(" "),a("td",[e._v("Request URL")])]),e._v(" "),a("tr",[a("td",[e._v("ip")]),e._v(" "),a("td",[e._v("Client ip of the call")])]),e._v(" "),a("tr",[a("td",[e._v("query_headers")]),e._v(" "),a("td",[e._v("Request Headers (API Key is obfuscated)")])]),e._v(" "),a("tr",[a("td",[e._v("sha1")]),e._v(" "),a("td",[e._v("Id of log entry")])]),e._v(" "),a("tr",[a("td",[e._v("nb_api_calls")]),e._v(" "),a("td",[e._v("Number of API calls")])]),e._v(" "),a("tr",[a("td",[e._v("processing_time_ms")]),e._v(" "),a("td",[e._v("Processing time for the query (Does not include network time)")])]),e._v(" "),a("tr",[a("td",[e._v("query_nb_hits")]),e._v(" "),a("td",[e._v("Number of hits returned for the query")])]),e._v(" "),a("tr",[a("td",[e._v("exhaustive")]),e._v(" "),a("td",[e._v("Exhaustive flags used during the query")])]),e._v(" "),a("tr",[a("td",[e._v("index")]),e._v(" "),a("td",[e._v("Index name of the log")])]),e._v(" "),a("tr",[a("td",[e._v("inner_queries")]),e._v(" "),a("td",[e._v("Contains an object for each performed query with the "),a("code",[e._v("indexName")]),e._v(", "),a("code",[e._v("queryID")]),e._v(", "),a("code",[e._v("offset")]),e._v(", and "),a("code",[e._v("userToken")])])])])]),e._v(" "),a("blockquote",[a("p",[e._v("Source: "),a("em",[a("strong",[a("a",{attrs:{href:"https://www.algolia.com/doc/api-reference/api-methods/get-logs/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Algolia documentation"),a("OutboundLink")],1)])])])]),e._v(" "),a("h4",{attrs:{id:"typesense"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#typesense"}},[e._v("#")]),e._v(" TypeSense")]),e._v(" "),a("p",[e._v("TypeSense makes no mention of logs in its documentation. However, the tracing policy seems to be in verbose mode and gives a lot of more or less relevant information.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("typesense_1 | I20210403 01:06:33.688689 1 typesense_server_utils.cpp:301] Starting Typesense 0.19.0\ntypesense_1 | I20210403 01:06:33.690609 1 typesense_server_utils.cpp:304] Typesense is using jemalloc.\ntypesense_1 | I20210403 01:06:33.730222 1 typesense_server_utils.cpp:405] Starting API service...\ntypesense_1 | I20210403 01:06:33.730813 82 typesense_server_utils.cpp:210] Since no --nodes argument is provided, starting a single node Typesense cluster.\ntypesense_1 | I20210403 01:06:33.734120 1 http_server.cpp:189] Typesense has started listening on port 8108\ntypesense_1 | I20210403 01:06:33.744827 82 server.cpp:1045] Server[braft::RaftStatImpl+braft::FileServiceImpl+braft::RaftServiceImpl+braft::CliServiceImpl] is serving on port=8107.\ntypesense_1 | I20210403 01:06:33.744860 82 server.cpp:1048] Check out http://1c913ea63cb1:8107 in web browser.\ntypesense_1 | I20210403 01:06:33.747742 82 log.cpp:674] Use crc32c as the checksum type of appending entries\ntypesense_1 | I20210403 01:06:33.747857 82 log.cpp:1158] log load_meta /data/state/log/log_meta first_log_index: 1 time: 56\ntypesense_1 | I20210403 01:06:33.748559 82 log.cpp:1098] load open segment, path: /data/state/log first_index: 1\ntypesense_1 | I20210403 01:06:33.748966 82 raft_meta.cpp:521] Loaded single stable meta, path /data/state/meta term 3 votedfor 0.0.0.0:8107:8108 time: 193\n")])])]),a("p",[e._v("It also gives the stack trace in case of exception.")]),e._v(" "),a("h4",{attrs:{id:"elasticsearch"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#elasticsearch"}},[e._v("#")]),e._v(" ElasticSearch")]),e._v(" "),a("p",[e._v("Elasticsearch is probably the most versatile search engine when it comes to logging. "),a("a",{attrs:{href:"https://www.elastic.co/guide/en/elasticsearch/reference/current/logging.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("See the documentation"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("p",[e._v("It is possible to define a precise rolling log strategy.")]),e._v(" "),a("p",[e._v("A rolling log strategy permits to:")]),e._v(" "),a("ul",[a("li",[e._v("Facilitate the administration of systems that generate a large number of logs.")]),e._v(" "),a("li",[e._v("automates swapping, compressing, deleting, and sending logs. It assists in keeping the logging system within the specified file system space limits.")]),e._v(" "),a("li",[e._v("Defines an interval over which log analysis can be performed")]),e._v(" "),a("li",[e._v("Gives an efficient way to identify log files that are no longer used so that an automated process can clean up and compress the log directory and run log analysis programs.")])]),e._v(" "),a("p",[a("a",{attrs:{href:"https://en.wikipedia.org/wiki/Log_rotation",target:"_blank",rel:"noopener noreferrer"}},[e._v("See more information here about log rotation strategy"),a("OutboundLink")],1)]),e._v(" "),a("p",[e._v("This is an important thing to have when systems generate a lot of logs or are under heavy load. It's also a good practice to populate a monitoring dashboard at certain times and, through that, provide an easy way to analyze and understand what happened in the system in a human-readable way.")]),e._v(" "),a("p",[e._v("Internally, Elasticsearch uses "),a("code",[e._v("log4j2")]),e._v(" to track events and configure the logging policy. Logging levels can be configured on a per-package basis, giving the precision needed to monitor a specific feature or time in a search engine's lifecycle.")]),e._v(" "),a("p",[e._v("A log level can be: "),a("code",[e._v("debug")]),e._v(", "),a("code",[e._v("info")]),e._v(", "),a("code",[e._v("warn")]),e._v(", "),a("code",[e._v("error")]),e._v(", "),a("code",[e._v("fatal")]),e._v(", or "),a("code",[e._v("unknown")]),e._v(".")]),e._v(" "),a("h4",{attrs:{id:"elastic-entreprise-search"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#elastic-entreprise-search"}},[e._v("#")]),e._v(" Elastic Entreprise Search")]),e._v(" "),a("p",[e._v("Elasticsearch's SaaS platform, like Algolia, offers a fairly similar endpoint for browsing system-generated logs.")]),e._v(" "),a("p",[e._v("However, it is possible to disable log storage, change the retention period and also filter the logs with more details.")]),e._v(" "),a("p",[a("img",{attrs:{src:"https://www.elastic.co/guide/en/app-search/current/images/guides/log-settings-controls.png",alt:"image"}}),e._v(" "),a("em",[e._v("Elastic App Search's Log Retention settings view.")])]),e._v(" "),a("blockquote",[a("p",[e._v("It is also possible to do that from a Log Settings API endpoint.")])]),e._v(" "),a("blockquote",[a("p",[e._v("API Logs track requests and responses at the engine level, while Analytics Logs track requests, clicks and counts.")])]),e._v(" "),a("h3",{attrs:{id:"iv-explanation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#iv-explanation"}},[e._v("#")]),e._v(" IV. Explanation")]),e._v(" "),a("h4",{attrs:{id:"current-logging-behaviour-of-meilisearch-0-20"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#current-logging-behaviour-of-meilisearch-0-20"}},[e._v("#")]),e._v(" Current Logging behaviour of MeiliSearch (0.20)")]),e._v(" "),a("p",[e._v("MeiliSearch uses the rust lib "),a("code",[e._v("env_logger")]),e._v(" to output logs based on the log level fetched from the "),a("code",[e._v("RUST_LOG")]),e._v(" environment variable. "),a("code",[e._v("env_logger")]),e._v(" allows to define a specific log level per module if necessary. "),a("a",{attrs:{href:"https://docs.rs/env_logger/0.8.3/env_logger/",target:"_blank",rel:"noopener noreferrer"}},[e._v("See more here"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("h4",{attrs:{id:"logging-behaviour-for-milli-0-21"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#logging-behaviour-for-milli-0-21"}},[e._v("#")]),e._v(" Logging behaviour for Milli (0.21)")]),e._v(" "),a("p",[e._v("We have decided to keep using the rust lib "),a("code",[e._v("env_logger")]),e._v(" for Milli/Transplant. However, we will make some changes to make the logging more consistent and versatile.")]),e._v(" "),a("p",[e._v("Instead of using "),a("code",[e._v("RUST_LOG")]),e._v(", we create a "),a("code",[e._v("MEILI_LOG_LEVEL")]),e._v(" environment variable that corresponds to "),a("code",[e._v("RUST_LOG")]),e._v(" in the binary to improve its meaning and clarity to users. A CLI option "),a("code",[e._v("--log-level")]),e._v(" will also be added to follow our configuration convention.")]),e._v(" "),a("h5",{attrs:{id:"log-levels"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#log-levels"}},[e._v("#")]),e._v(" Log Levels")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Level")]),e._v(" "),a("th",[e._v("Description")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[e._v("ERROR")]),e._v(" "),a("td",[e._v("Everything related to an error. A non blocking error has occured.")])]),e._v(" "),a("tr",[a("td",[e._v("WARN")]),e._v(" "),a("td",[e._v("Used to warn about an exceptional non-blocking event occurring.")])]),e._v(" "),a("tr",[a("td",[e._v("INFO")]),e._v(" "),a("td",[e._v("Default Log Level. It displays high level informations of events occuring in the search engine.")])]),e._v(" "),a("tr",[a("td",[e._v("DEBUG")]),e._v(" "),a("td",[e._v("Used for debugging and development purposes. More verbose than INFO.")])]),e._v(" "),a("tr",[a("td",[e._v("TRACE")]),e._v(" "),a("td",[e._v("Display everything happening at engine level. Can be useful for rust developers dealing with complex issues")])]),e._v(" "),a("tr",[a("td",[e._v("OFF")]),e._v(" "),a("td",[e._v("Disable the logs.")])])])]),e._v(" "),a("h5",{attrs:{id:"log-format"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#log-format"}},[e._v("#")]),e._v(" Log Format")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('[2021-03-02T20:33:09Z INFO actix_web::middleware::logger] 172.17.0.1:57220 "POST /indexes/indexUID/documents HTTP/1.1" 202 14 "-" "PostmanRuntime/7.26.10" 0.023529\n')])])]),a("h6",{attrs:{id:"mandatory-log-format-part-e-g-time-format-log-level-module-part"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mandatory-log-format-part-e-g-time-format-log-level-module-part"}},[e._v("#")]),e._v(" Mandatory log format part. E.g [TIME_FORMAT LOG_LEVEL MODULE] part.")]),e._v(" "),a("ul",[a("li",[e._v("Time when the request was started to process (in rfc3339 format)")]),e._v(" "),a("li",[e._v("Log levels are "),a("code",[e._v("ERROR")]),e._v(", "),a("code",[e._v("WARN")]),e._v(", "),a("code",[e._v("INFO")]),e._v(", "),a("code",[e._v("DEBUG")]),e._v(", "),a("code",[e._v("TRACE")]),e._v(", "),a("code",[e._v("OFF")]),e._v(".")]),e._v(" "),a("li",[e._v("The module part gives information about the module that records the log.")])]),e._v(" "),a("h6",{attrs:{id:"http-call"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#http-call"}},[e._v("#")]),e._v(" HTTP Call")]),e._v(" "),a("p",[e._v("Transplant uses "),a("code",[e._v("actix_web::middleware::logger")]),e._v(" to record information about the API endpoints that receive calls.")]),e._v(" "),a("p",[e._v("Given\n"),a("code",[e._v('172.17.0.1:57220 "POST /indexes/indexUID/documents HTTP/1.1" 202 14 "-" "PostmanRuntime/7.26.10" 0.023529')])]),e._v(" "),a("ul",[a("li",[e._v("Peer IP address (or IP address of reverse proxy if used)")]),e._v(" "),a("li",[e._v("First line of request (Example: GET /test HTTP/1.1)")]),e._v(" "),a("li",[e._v("Response status code")]),e._v(" "),a("li",[e._v("Size of response in bytes, including HTTP headers")]),e._v(" "),a("li",[e._v("User-Agent")]),e._v(" "),a("li",[e._v("Time taken to serve the request, in seconds to 6 decimal places")])]),e._v(" "),a("blockquote",[a("p",[e._v("At DEBUG log level, the search endpoint must log the request body and the response body.")])]),e._v(" "),a("h3",{attrs:{id:"v-impact-on-documentation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#v-impact-on-documentation"}},[e._v("#")]),e._v(" V. Impact on Documentation")]),e._v(" "),a("p",[e._v("The documentation only mentions the logging behavior for the "),a("code",[e._v("development")]),e._v(" env on the "),a("code",[e._v("MEILI_ENV")]),e._v(" part.")]),e._v(" "),a("p",[e._v("We should explain how to specify the logging level using the "),a("code",[e._v("MEILI_LOG_LEVEL")]),e._v(" environment variable and display the logging level table as information in a dedicated section. It should also mention the usage of the cli flag "),a("code",[e._v("--log-level")]),e._v(".")]),e._v(" "),a("h3",{attrs:{id:"vi-impact-on-sdks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#vi-impact-on-sdks"}},[e._v("#")]),e._v(" VI. Impact on SDKs")]),e._v(" "),a("p",[e._v("N/A")]),e._v(" "),a("h2",{attrs:{id:"_2-technical-aspects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-aspects"}},[e._v("#")]),e._v(" 2. Technical Aspects")]),e._v(" "),a("p",[e._v("N/A")]),e._v(" "),a("h2",{attrs:{id:"_3-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[e._v("#")]),e._v(" 3. Future Possibilities")]),e._v(" "),a("ul",[a("li",[e._v("Store logs on filesystem (give us future possibilites of rolling strategy). We will keep an eye on https://roadmap.meilisearch.com/c/81-specify-log-path, Github issues and, Slack Community messages. Keep in mind that it is possible to send logs to files using "),a("code",[e._v("syslog")]),e._v(" or "),a("code",[e._v("systemd")]),e._v(" journalctl.")]),e._v(" "),a("li",[e._v("Develop an API endpoint to search for logged events and configure the logging policy for the instance (SaaS feature in mind).")]),e._v(" "),a("li",[e._v("Add syntactic sugar helper flag like "),a("code",[e._v("-v, -vv, -vvv")]),e._v(" that can be translated to a "),a("code",[e._v("MEILI_LOG_LEVEL")]),e._v(" value.")]),e._v(" "),a("li",[e._v("Use the rust clone of "),a("code",[e._v("log4j2")]),e._v(", "),a("a",{attrs:{href:"https://docs.rs/log4rs/1.0.0/log4rs/",target:"_blank",rel:"noopener noreferrer"}},[a("code",[e._v("log4rs")]),a("OutboundLink")],1),e._v(" instead of "),a("code",[e._v("env_logger")]),e._v(" to provide the same kind of options that Elasticsearch propose.")])]),e._v(" "),a("h2",{attrs:{id:"_4-planned-changes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-planned-changes"}},[e._v("#")]),e._v(" 4. Planned Changes")]),e._v(" "),a("h3",{attrs:{id:"_0-21"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_0-21"}},[e._v("#")]),e._v(" 0.21")]),e._v(" "),a("h4",{attrs:{id:"core"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#core"}},[e._v("#")]),e._v(" Core")]),e._v(" "),a("ul",[a("li",[e._v("Use a consistent method to log (relative to internal implementation).")]),e._v(" "),a("li",[e._v("Log output should start with the mandatory log format part.")]),e._v(" "),a("li",[e._v("The HTTP logs should be logged as described in this spec.")]),e._v(" "),a("li",[e._v("The users should be able to choose the log level by filling the "),a("code",[e._v("MEILI_LOG_LEVEL")]),e._v(" environment variable or using the CLI option "),a("code",[e._v("--log-level")]),e._v(".")]),e._v(" "),a("li",[e._v("If log level is set to "),a("code",[e._v("DEBUG")]),e._v(", the "),a("code",[e._v("/search")]),e._v(" endpoint should output request parameters and body response as a log output.")]),e._v(" "),a("li",[e._v("Logs should be displayed in production environment as in development environment, e.g. the default log level is INFO")]),e._v(" "),a("li",[e._v("Milli only display logs from "),a("code",[e._v("DEBUG")]),e._v(" to "),a("code",[e._v("TRACE")]),e._v(" log level.")])]),e._v(" "),a("h4",{attrs:{id:"documentation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#documentation"}},[e._v("#")]),e._v(" Documentation")]),e._v(" "),a("ul",[a("li",[e._v("Add a dedicated logging section in the documentation.")]),e._v(" "),a("li",[e._v("Add a link to this dedicated section on the "),a("code",[e._v("environment")]),e._v(" "),a("a",{attrs:{href:"https://docs.meilisearch.com/reference/features/configuration.html#environment",target:"_blank",rel:"noopener noreferrer"}},[e._v("section"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("li",[e._v("We should add the default level for the production environment on the "),a("code",[e._v("environment")]),e._v(" section, by default its "),a("code",[e._v("INFO")]),e._v(".")])])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{442:function(e,t,a){"use strict";a.r(t);var o=a(62),s=Object(o.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("ul",[a("li",[e._v("Title: Logging")]),e._v(" "),a("li",[e._v("Start Date: 2021-04-21")]),e._v(" "),a("li",[e._v("Specification PR: "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/33",target:"_blank",rel:"noopener noreferrer"}},[e._v("#33"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("MeiliSearch Tracking-issues: "),a("a",{attrs:{href:"https://github.com/meilisearch/transplant/issues/193",target:"_blank",rel:"noopener noreferrer"}},[e._v("transplant/#193"),a("OutboundLink")],1)])]),e._v(" "),a("h1",{attrs:{id:"logging"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#logging"}},[e._v("#")]),e._v(" Logging")]),e._v(" "),a("h2",{attrs:{id:"_1-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-functional-specification"}},[e._v("#")]),e._v(" 1. Functional Specification")]),e._v(" "),a("h3",{attrs:{id:"i-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#i-summary"}},[e._v("#")]),e._v(" I. Summary")]),e._v(" "),a("p",[e._v("As a user of the MeiliSearch binary, I want to be able to know what is happening in the engine at different levels of granularity depending on my needs.")]),e._v(" "),a("h3",{attrs:{id:"ii-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ii-motivation"}},[e._v("#")]),e._v(" II. Motivation")]),e._v(" "),a("p",[e._v("Keeping track of the behavior of a system is useful for those who test, develop and use it in production. The purpose of this specification is to indicate the logging behavior of the search engine.")]),e._v(" "),a("h3",{attrs:{id:"iii-additional-materials"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#iii-additional-materials"}},[e._v("#")]),e._v(" III. Additional Materials")]),e._v(" "),a("h4",{attrs:{id:"algolia"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#algolia"}},[e._v("#")]),e._v(" Algolia")]),e._v(" "),a("p",[e._v("Algolia offers an API endpoint dedicated to retrieving the logs of search and indexing operations.")]),e._v(" "),a("blockquote",[a("p",[e._v("A call on the "),a("code",[e._v("getLogs")]),e._v(" endpoint affect the algolia quota but it is not counted as a log.")]),e._v(" "),a("p",[e._v("The logs are kept for a period of 7 days. After this period, they are no longer accessible from the API.")])]),e._v(" "),a("p",[e._v("Algolia gives parameters to modify the request according to the user's needs.")]),e._v(" "),a("blockquote",[a("p",[e._v("A query performed without parameters returns the last 10 records by default.")]),e._v(" "),a("p",[e._v("The maximum number of logs that can be returned per request is 1000.")])]),e._v(" "),a("p",[e._v("It is possible to use the "),a("code",[e._v("offset")]),e._v(" and "),a("code",[e._v("length")]),e._v(" parameters to search the log entries.")]),e._v(" "),a("p",[e._v("A "),a("code",[e._v("type")]),e._v(" parameter is also provided to select the type of log to retrieve.")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Value")]),e._v(" "),a("th",[e._v("Description")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[e._v("all")]),e._v(" "),a("td",[e._v("All the logs")])]),e._v(" "),a("tr",[a("td",[e._v("query")]),e._v(" "),a("td",[e._v("Exclusively the queries")])]),e._v(" "),a("tr",[a("td",[e._v("build")]),e._v(" "),a("td",[e._v("Exclusively the build operations")])]),e._v(" "),a("tr",[a("td",[e._v("error")]),e._v(" "),a("td",[e._v("Exclusively the errors")])])])]),e._v(" "),a("p",[e._v("Here is the information that Algolia chooses to return:")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Key")]),e._v(" "),a("th",[e._v("Description")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[e._v("timestamp")]),e._v(" "),a("td",[e._v("Timestamp in ISO-8601 format")])]),e._v(" "),a("tr",[a("td",[e._v("method")]),e._v(" "),a("td",[e._v("Rest type of the method")])]),e._v(" "),a("tr",[a("td",[e._v("answer_code")]),e._v(" "),a("td",[e._v("HTTP response code")])]),e._v(" "),a("tr",[a("td",[e._v("query_body")]),e._v(" "),a("td",[e._v("Request body. Limited to 1000 characters")])]),e._v(" "),a("tr",[a("td",[e._v("answer")]),e._v(" "),a("td",[e._v("Answer body. Limited to 1000 characters")])]),e._v(" "),a("tr",[a("td",[e._v("url")]),e._v(" "),a("td",[e._v("Request URL")])]),e._v(" "),a("tr",[a("td",[e._v("ip")]),e._v(" "),a("td",[e._v("Client ip of the call")])]),e._v(" "),a("tr",[a("td",[e._v("query_headers")]),e._v(" "),a("td",[e._v("Request Headers (API Key is obfuscated)")])]),e._v(" "),a("tr",[a("td",[e._v("sha1")]),e._v(" "),a("td",[e._v("Id of log entry")])]),e._v(" "),a("tr",[a("td",[e._v("nb_api_calls")]),e._v(" "),a("td",[e._v("Number of API calls")])]),e._v(" "),a("tr",[a("td",[e._v("processing_time_ms")]),e._v(" "),a("td",[e._v("Processing time for the query (Does not include network time)")])]),e._v(" "),a("tr",[a("td",[e._v("query_nb_hits")]),e._v(" "),a("td",[e._v("Number of hits returned for the query")])]),e._v(" "),a("tr",[a("td",[e._v("exhaustive")]),e._v(" "),a("td",[e._v("Exhaustive flags used during the query")])]),e._v(" "),a("tr",[a("td",[e._v("index")]),e._v(" "),a("td",[e._v("Index name of the log")])]),e._v(" "),a("tr",[a("td",[e._v("inner_queries")]),e._v(" "),a("td",[e._v("Contains an object for each performed query with the "),a("code",[e._v("indexName")]),e._v(", "),a("code",[e._v("queryID")]),e._v(", "),a("code",[e._v("offset")]),e._v(", and "),a("code",[e._v("userToken")])])])])]),e._v(" "),a("blockquote",[a("p",[e._v("Source: "),a("em",[a("strong",[a("a",{attrs:{href:"https://www.algolia.com/doc/api-reference/api-methods/get-logs/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Algolia documentation"),a("OutboundLink")],1)])])])]),e._v(" "),a("h4",{attrs:{id:"typesense"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#typesense"}},[e._v("#")]),e._v(" TypeSense")]),e._v(" "),a("p",[e._v("TypeSense makes no mention of logs in its documentation. However, the tracing policy seems to be in verbose mode and gives a lot of more or less relevant information.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("typesense_1 | I20210403 01:06:33.688689 1 typesense_server_utils.cpp:301] Starting Typesense 0.19.0\ntypesense_1 | I20210403 01:06:33.690609 1 typesense_server_utils.cpp:304] Typesense is using jemalloc.\ntypesense_1 | I20210403 01:06:33.730222 1 typesense_server_utils.cpp:405] Starting API service...\ntypesense_1 | I20210403 01:06:33.730813 82 typesense_server_utils.cpp:210] Since no --nodes argument is provided, starting a single node Typesense cluster.\ntypesense_1 | I20210403 01:06:33.734120 1 http_server.cpp:189] Typesense has started listening on port 8108\ntypesense_1 | I20210403 01:06:33.744827 82 server.cpp:1045] Server[braft::RaftStatImpl+braft::FileServiceImpl+braft::RaftServiceImpl+braft::CliServiceImpl] is serving on port=8107.\ntypesense_1 | I20210403 01:06:33.744860 82 server.cpp:1048] Check out http://1c913ea63cb1:8107 in web browser.\ntypesense_1 | I20210403 01:06:33.747742 82 log.cpp:674] Use crc32c as the checksum type of appending entries\ntypesense_1 | I20210403 01:06:33.747857 82 log.cpp:1158] log load_meta /data/state/log/log_meta first_log_index: 1 time: 56\ntypesense_1 | I20210403 01:06:33.748559 82 log.cpp:1098] load open segment, path: /data/state/log first_index: 1\ntypesense_1 | I20210403 01:06:33.748966 82 raft_meta.cpp:521] Loaded single stable meta, path /data/state/meta term 3 votedfor 0.0.0.0:8107:8108 time: 193\n")])])]),a("p",[e._v("It also gives the stack trace in case of exception.")]),e._v(" "),a("h4",{attrs:{id:"elasticsearch"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#elasticsearch"}},[e._v("#")]),e._v(" ElasticSearch")]),e._v(" "),a("p",[e._v("Elasticsearch is probably the most versatile search engine when it comes to logging. "),a("a",{attrs:{href:"https://www.elastic.co/guide/en/elasticsearch/reference/current/logging.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("See the documentation"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("p",[e._v("It is possible to define a precise rolling log strategy.")]),e._v(" "),a("p",[e._v("A rolling log strategy permits to:")]),e._v(" "),a("ul",[a("li",[e._v("Facilitate the administration of systems that generate a large number of logs.")]),e._v(" "),a("li",[e._v("automates swapping, compressing, deleting, and sending logs. It assists in keeping the logging system within the specified file system space limits.")]),e._v(" "),a("li",[e._v("Defines an interval over which log analysis can be performed")]),e._v(" "),a("li",[e._v("Gives an efficient way to identify log files that are no longer used so that an automated process can clean up and compress the log directory and run log analysis programs.")])]),e._v(" "),a("p",[a("a",{attrs:{href:"https://en.wikipedia.org/wiki/Log_rotation",target:"_blank",rel:"noopener noreferrer"}},[e._v("See more information here about log rotation strategy"),a("OutboundLink")],1)]),e._v(" "),a("p",[e._v("This is an important thing to have when systems generate a lot of logs or are under heavy load. It's also a good practice to populate a monitoring dashboard at certain times and, through that, provide an easy way to analyze and understand what happened in the system in a human-readable way.")]),e._v(" "),a("p",[e._v("Internally, Elasticsearch uses "),a("code",[e._v("log4j2")]),e._v(" to track events and configure the logging policy. Logging levels can be configured on a per-package basis, giving the precision needed to monitor a specific feature or time in a search engine's lifecycle.")]),e._v(" "),a("p",[e._v("A log level can be: "),a("code",[e._v("debug")]),e._v(", "),a("code",[e._v("info")]),e._v(", "),a("code",[e._v("warn")]),e._v(", "),a("code",[e._v("error")]),e._v(", "),a("code",[e._v("fatal")]),e._v(", or "),a("code",[e._v("unknown")]),e._v(".")]),e._v(" "),a("h4",{attrs:{id:"elastic-entreprise-search"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#elastic-entreprise-search"}},[e._v("#")]),e._v(" Elastic Entreprise Search")]),e._v(" "),a("p",[e._v("Elasticsearch's SaaS platform, like Algolia, offers a fairly similar endpoint for browsing system-generated logs.")]),e._v(" "),a("p",[e._v("However, it is possible to disable log storage, change the retention period and also filter the logs with more details.")]),e._v(" "),a("p",[a("img",{attrs:{src:"https://www.elastic.co/guide/en/app-search/current/images/guides/log-settings-controls.png",alt:"image"}}),e._v(" "),a("em",[e._v("Elastic App Search's Log Retention settings view.")])]),e._v(" "),a("blockquote",[a("p",[e._v("It is also possible to do that from a Log Settings API endpoint.")])]),e._v(" "),a("blockquote",[a("p",[e._v("API Logs track requests and responses at the engine level, while Analytics Logs track requests, clicks and counts.")])]),e._v(" "),a("h3",{attrs:{id:"iv-explanation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#iv-explanation"}},[e._v("#")]),e._v(" IV. Explanation")]),e._v(" "),a("h4",{attrs:{id:"current-logging-behaviour-of-meilisearch-0-20"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#current-logging-behaviour-of-meilisearch-0-20"}},[e._v("#")]),e._v(" Current Logging behaviour of MeiliSearch (0.20)")]),e._v(" "),a("p",[e._v("MeiliSearch uses the rust lib "),a("code",[e._v("env_logger")]),e._v(" to output logs based on the log level fetched from the "),a("code",[e._v("RUST_LOG")]),e._v(" environment variable. "),a("code",[e._v("env_logger")]),e._v(" allows to define a specific log level per module if necessary. "),a("a",{attrs:{href:"https://docs.rs/env_logger/0.8.3/env_logger/",target:"_blank",rel:"noopener noreferrer"}},[e._v("See more here"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("h4",{attrs:{id:"logging-behaviour-for-milli-0-21"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#logging-behaviour-for-milli-0-21"}},[e._v("#")]),e._v(" Logging behaviour for Milli (0.21)")]),e._v(" "),a("p",[e._v("We have decided to keep using the rust lib "),a("code",[e._v("env_logger")]),e._v(" for Milli/Transplant. However, we will make some changes to make the logging more consistent and versatile.")]),e._v(" "),a("p",[e._v("Instead of using "),a("code",[e._v("RUST_LOG")]),e._v(", we create a "),a("code",[e._v("MEILI_LOG_LEVEL")]),e._v(" environment variable that corresponds to "),a("code",[e._v("RUST_LOG")]),e._v(" in the binary to improve its meaning and clarity to users. A CLI option "),a("code",[e._v("--log-level")]),e._v(" will also be added to follow our configuration convention.")]),e._v(" "),a("h5",{attrs:{id:"log-levels"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#log-levels"}},[e._v("#")]),e._v(" Log Levels")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Level")]),e._v(" "),a("th",[e._v("Description")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[e._v("ERROR")]),e._v(" "),a("td",[e._v("Everything related to an error. A non blocking error has occured.")])]),e._v(" "),a("tr",[a("td",[e._v("WARN")]),e._v(" "),a("td",[e._v("Used to warn about an exceptional non-blocking event occurring.")])]),e._v(" "),a("tr",[a("td",[e._v("INFO")]),e._v(" "),a("td",[e._v("Default Log Level. It displays high level informations of events occuring in the search engine.")])]),e._v(" "),a("tr",[a("td",[e._v("DEBUG")]),e._v(" "),a("td",[e._v("Used for debugging and development purposes. More verbose than INFO.")])]),e._v(" "),a("tr",[a("td",[e._v("TRACE")]),e._v(" "),a("td",[e._v("Display everything happening at engine level. Can be useful for rust developers dealing with complex issues")])]),e._v(" "),a("tr",[a("td",[e._v("OFF")]),e._v(" "),a("td",[e._v("Disable the logs.")])])])]),e._v(" "),a("h5",{attrs:{id:"log-format"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#log-format"}},[e._v("#")]),e._v(" Log Format")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('[2021-03-02T20:33:09Z INFO actix_web::middleware::logger] 172.17.0.1:57220 "POST /indexes/indexUID/documents HTTP/1.1" 202 14 "-" "PostmanRuntime/7.26.10" 0.023529\n')])])]),a("h6",{attrs:{id:"mandatory-log-format-part-e-g-time-format-log-level-module-part"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mandatory-log-format-part-e-g-time-format-log-level-module-part"}},[e._v("#")]),e._v(" Mandatory log format part. E.g [TIME_FORMAT LOG_LEVEL MODULE] part.")]),e._v(" "),a("ul",[a("li",[e._v("Time when the request was started to process (in rfc3339 format)")]),e._v(" "),a("li",[e._v("Log levels are "),a("code",[e._v("ERROR")]),e._v(", "),a("code",[e._v("WARN")]),e._v(", "),a("code",[e._v("INFO")]),e._v(", "),a("code",[e._v("DEBUG")]),e._v(", "),a("code",[e._v("TRACE")]),e._v(", "),a("code",[e._v("OFF")]),e._v(".")]),e._v(" "),a("li",[e._v("The module part gives information about the module that records the log.")])]),e._v(" "),a("h6",{attrs:{id:"http-call"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#http-call"}},[e._v("#")]),e._v(" HTTP Call")]),e._v(" "),a("p",[e._v("Transplant uses "),a("code",[e._v("actix_web::middleware::logger")]),e._v(" to record information about the API endpoints that receive calls.")]),e._v(" "),a("p",[e._v("Given\n"),a("code",[e._v('172.17.0.1:57220 "POST /indexes/indexUID/documents HTTP/1.1" 202 14 "-" "PostmanRuntime/7.26.10" 0.023529')])]),e._v(" "),a("ul",[a("li",[e._v("Peer IP address (or IP address of reverse proxy if used)")]),e._v(" "),a("li",[e._v("First line of request (Example: GET /test HTTP/1.1)")]),e._v(" "),a("li",[e._v("Response status code")]),e._v(" "),a("li",[e._v("Size of response in bytes, including HTTP headers")]),e._v(" "),a("li",[e._v("User-Agent")]),e._v(" "),a("li",[e._v("Time taken to serve the request, in seconds to 6 decimal places")])]),e._v(" "),a("blockquote",[a("p",[e._v("At DEBUG log level, the search endpoint must log the request body and the response body.")])]),e._v(" "),a("h3",{attrs:{id:"v-impact-on-documentation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#v-impact-on-documentation"}},[e._v("#")]),e._v(" V. Impact on Documentation")]),e._v(" "),a("p",[e._v("The documentation only mentions the logging behavior for the "),a("code",[e._v("development")]),e._v(" env on the "),a("code",[e._v("MEILI_ENV")]),e._v(" part.")]),e._v(" "),a("p",[e._v("We should explain how to specify the logging level using the "),a("code",[e._v("MEILI_LOG_LEVEL")]),e._v(" environment variable and display the logging level table as information in a dedicated section. It should also mention the usage of the cli flag "),a("code",[e._v("--log-level")]),e._v(".")]),e._v(" "),a("h3",{attrs:{id:"vi-impact-on-sdks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#vi-impact-on-sdks"}},[e._v("#")]),e._v(" VI. Impact on SDKs")]),e._v(" "),a("p",[e._v("N/A")]),e._v(" "),a("h2",{attrs:{id:"_2-technical-aspects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-aspects"}},[e._v("#")]),e._v(" 2. Technical Aspects")]),e._v(" "),a("p",[e._v("N/A")]),e._v(" "),a("h2",{attrs:{id:"_3-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[e._v("#")]),e._v(" 3. Future Possibilities")]),e._v(" "),a("ul",[a("li",[e._v("Store logs on filesystem (give us future possibilites of rolling strategy). We will keep an eye on https://roadmap.meilisearch.com/c/81-specify-log-path, Github issues and, Slack Community messages. Keep in mind that it is possible to send logs to files using "),a("code",[e._v("syslog")]),e._v(" or "),a("code",[e._v("systemd")]),e._v(" journalctl.")]),e._v(" "),a("li",[e._v("Develop an API endpoint to search for logged events and configure the logging policy for the instance (SaaS feature in mind).")]),e._v(" "),a("li",[e._v("Add syntactic sugar helper flag like "),a("code",[e._v("-v, -vv, -vvv")]),e._v(" that can be translated to a "),a("code",[e._v("MEILI_LOG_LEVEL")]),e._v(" value.")]),e._v(" "),a("li",[e._v("Use the rust clone of "),a("code",[e._v("log4j2")]),e._v(", "),a("a",{attrs:{href:"https://docs.rs/log4rs/1.0.0/log4rs/",target:"_blank",rel:"noopener noreferrer"}},[a("code",[e._v("log4rs")]),a("OutboundLink")],1),e._v(" instead of "),a("code",[e._v("env_logger")]),e._v(" to provide the same kind of options that Elasticsearch propose.")])]),e._v(" "),a("h2",{attrs:{id:"_4-planned-changes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-planned-changes"}},[e._v("#")]),e._v(" 4. Planned Changes")]),e._v(" "),a("h3",{attrs:{id:"_0-21"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_0-21"}},[e._v("#")]),e._v(" 0.21")]),e._v(" "),a("h4",{attrs:{id:"core"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#core"}},[e._v("#")]),e._v(" Core")]),e._v(" "),a("ul",[a("li",[e._v("Use a consistent method to log (relative to internal implementation).")]),e._v(" "),a("li",[e._v("Log output should start with the mandatory log format part.")]),e._v(" "),a("li",[e._v("The HTTP logs should be logged as described in this spec.")]),e._v(" "),a("li",[e._v("The users should be able to choose the log level by filling the "),a("code",[e._v("MEILI_LOG_LEVEL")]),e._v(" environment variable or using the CLI option "),a("code",[e._v("--log-level")]),e._v(".")]),e._v(" "),a("li",[e._v("If log level is set to "),a("code",[e._v("DEBUG")]),e._v(", the "),a("code",[e._v("/search")]),e._v(" endpoint should output request parameters and body response as a log output.")]),e._v(" "),a("li",[e._v("Logs should be displayed in production environment as in development environment, e.g. the default log level is INFO")]),e._v(" "),a("li",[e._v("Milli only display logs from "),a("code",[e._v("DEBUG")]),e._v(" to "),a("code",[e._v("TRACE")]),e._v(" log level.")])]),e._v(" "),a("h4",{attrs:{id:"documentation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#documentation"}},[e._v("#")]),e._v(" Documentation")]),e._v(" "),a("ul",[a("li",[e._v("Add a dedicated logging section in the documentation.")]),e._v(" "),a("li",[e._v("Add a link to this dedicated section on the "),a("code",[e._v("environment")]),e._v(" "),a("a",{attrs:{href:"https://docs.meilisearch.com/reference/features/configuration.html#environment",target:"_blank",rel:"noopener noreferrer"}},[e._v("section"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("li",[e._v("We should add the default level for the production environment on the "),a("code",[e._v("environment")]),e._v(" section, by default its "),a("code",[e._v("INFO")]),e._v(".")])])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/19.9e814d58.js b/docs/assets/js/19.54ac2cec.js similarity index 99% rename from docs/assets/js/19.9e814d58.js rename to docs/assets/js/19.54ac2cec.js index 4e6818135..0434b38b1 100644 --- a/docs/assets/js/19.9e814d58.js +++ b/docs/assets/js/19.54ac2cec.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{444:function(e,t,_){"use strict";_.r(t);var v=_(62),d=Object(v.a)({},(function(){var e=this,t=e.$createElement,_=e._self._c||t;return _("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[_("h1",{attrs:{id:"anonymous-analytics-policy"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#anonymous-analytics-policy"}},[e._v("#")]),e._v(" Anonymous Analytics Policy")]),e._v(" "),_("h2",{attrs:{id:"_1-functional-specification"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#_1-functional-specification"}},[e._v("#")]),e._v(" 1. Functional Specification")]),e._v(" "),_("h3",{attrs:{id:"i-summary"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#i-summary"}},[e._v("#")]),e._v(" I. Summary")]),e._v(" "),_("p",[e._v("This specification describes an exhaustive list of anonymous metrics collected by the MeiliSearch binary. It also describes the tools we use for this collection and how we identify a Meilisearch instance.")]),e._v(" "),_("h3",{attrs:{id:"ii-motivation"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#ii-motivation"}},[e._v("#")]),e._v(" II. Motivation")]),e._v(" "),_("p",[e._v("At MeiliSearch, our vision is to provide an easy-to-use search solution that meets the essential needs of our users. At all times, we strive to understand our users better and meet their expectations in the best possible way.")]),e._v(" "),_("p",[e._v("Although we can gather needs and understand our users through several channels such as Github, Slack, surveys, interviews or roadmap votes, we realize that this is not enough to have a complete view of MeiliSearch usage and features adoption. By cross-referencing our product discovery phases with aggregated quantitative data, we want to make the product much better than what it is today. Our decision-making will be taken a step further to make a product that users love.")]),e._v(" "),_("h3",{attrs:{id:"iii-explanation"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#iii-explanation"}},[e._v("#")]),e._v(" III. Explanation")]),e._v(" "),_("h4",{attrs:{id:"general-data-protection-regulation-gdpr"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#general-data-protection-regulation-gdpr"}},[e._v("#")]),e._v(" General Data Protection Regulation (GDPR)")]),e._v(" "),_("p",[e._v("The metrics collected are non-sensitive, non-personal and do not identify an individual or a group of individuals using MeiliSearch. The data collected is secured and anonymized. We do not collect any data from the values stored in the documents.")]),e._v(" "),_("p",[e._v("We, the MeiliSearch team, provide an email address so that users can request the removal of their data: privacy@meilisearch.com."),_("br"),e._v("\nThanks to the unique identifier generated for their MeiliSearch installation ("),_("code",[e._v("Instance UID")]),e._v(" when launching MeiliSearch), we can remove the corresponding data from all the tools we describe below. Any questions regarding the management of the data collected can be sent to the email address as well.")]),e._v(" "),_("h4",{attrs:{id:"tools"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#tools"}},[e._v("#")]),e._v(" Tools")]),e._v(" "),_("h5",{attrs:{id:"segment"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#segment"}},[e._v("#")]),e._v(" Segment")]),e._v(" "),_("p",[e._v("The collected data is sent to "),_("a",{attrs:{href:"https://segment.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Segment"),_("OutboundLink")],1),e._v(". Segment is a platform for data collection and provides data management tools.")]),e._v(" "),_("h5",{attrs:{id:"amplitude"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#amplitude"}},[e._v("#")]),e._v(" Amplitude")]),e._v(" "),_("p",[_("a",{attrs:{href:"https://amplitude.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Amplitude"),_("OutboundLink")],1),e._v(" is a tool for graphing and highlighting collected data. Segment feeds Amplitude so that we can build visualizations according to our needs.")]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"events-table"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#events-table"}},[e._v("#")]),e._v(" Events table")]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Event name")]),e._v(" "),_("th",[e._v("Description")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("Launched")]),e._v(" "),_("td",[e._v("Occurs when MeiliSearch is launched the first time.")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Searched POST")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("indexes/:indexUid/search")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Searched GET")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("GET")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/search")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Facet Searched POST")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/facet-search")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Searched by Multi-Search POST")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("POST")]),e._v("- "),_("code",[e._v("/multi-search")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Added")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Updated")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("PUT")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Fetched GET")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("GET")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents")]),e._v(" or "),_("code",[e._v("GET")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents/:doc_id")]),e._v(" routes during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Fetched POST")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents/fetch")]),e._v(" routes during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Deleted")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("DELETE")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents")]),e._v(", "),_("code",[e._v("DELETE")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents/:documentId")]),e._v(", "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("indexes/:indexUid/documents/delete-batch")]),e._v(", and "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("indexes/:indexUid/documents/delete")]),e._v(" routes during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Index Created")]),e._v(" "),_("td",[e._v("Occurs when an index is created via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Index Updated")]),e._v(" "),_("td",[e._v("Occurs when an index is updated via "),_("code",[e._v("PUT")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Indexes Swapped")]),e._v(" "),_("td",[e._v("Occurs when indexes are swapped via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/swap-indexes")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Settings Updated")]),e._v(" "),_("td",[e._v("Occurs when the settings are updated via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/settings")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("SearchableAttributes Updated")]),e._v(" "),_("td",[e._v("Occurs when searchable attributes are updated via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/settings/searchable-attributes")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("RankingRules Updated")]),e._v(" "),_("td",[e._v("Occurs when ranking rules are updated via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/settings/ranking-rules")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("FilterableAttributes Updated")]),e._v(" "),_("td",[e._v("Occurs when filterable attributes are updated via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/settings/filterable-attributes")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("SortableAttributes Updated")]),e._v(" "),_("td",[e._v("Occurs when sortable attributes are updated via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/settings/sortable-attributes")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("TypoTolerance Updated")]),e._v(" "),_("td",[e._v("Occurs when typo tolerance settings are updated via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/settings/typo-tolerance")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Pagination Updated")]),e._v(" "),_("td",[e._v("Occurs when pagination settings are updated via "),_("code",[e._v("PATCH")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/pagination")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Faceting Updated")]),e._v(" "),_("td",[e._v("Occurs when faceting settings are updated via "),_("code",[e._v("PATCH")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/faceting")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("DistinctAttribute Updated")]),e._v(" "),_("td",[e._v("Occurs when distinct attribute setting is updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/distinct-attribute")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("ProximityPrecision Updated")]),e._v(" "),_("td",[e._v("Occurs when proximity precision setting is updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/proximity-precision")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("DisplayedAttributes Updated")]),e._v(" "),_("td",[e._v("Occurs when displayed attributes are updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/displayed-attributes")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("StopWords Updated")]),e._v(" "),_("td",[e._v("Occurs when stop words are updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/stop-words")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("SeparatorTokens Updated")]),e._v(" "),_("td",[e._v("Occurs when separator tokens are updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/separator-tokens")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("NonSeparatorTokens Updated")]),e._v(" "),_("td",[e._v("Occurs when non separator tokens are updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/non-separator-tokens")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Synonyms Updated")]),e._v(" "),_("td",[e._v("Occurs when synonyms are updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/synonyms")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Dump Created")]),e._v(" "),_("td",[e._v("Occurs when a dump is created via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/dumps")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Snapshot Created")]),e._v(" "),_("td",[e._v("Occurs when a snapshot is created via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/snapshots")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Tasks Canceled")]),e._v(" "),_("td",[e._v("Occurs when tasks are requested to be canceled via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/tasks/cancel")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Tasks Deleted")]),e._v(" "),_("td",[e._v("Occurs when tasks are requested to be deleted via "),_("code",[e._v("DELETE")]),e._v("- "),_("code",[e._v("/tasks")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Tasks Seen")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("GET")]),e._v(" - "),_("code",[e._v("/tasks")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Stats Seen")]),e._v(" "),_("td",[e._v("Occurs when stats are fetched via "),_("code",[e._v("GET")]),e._v(" - "),_("code",[e._v("/stats")]),e._v(" or "),_("code",[e._v("/indexes/:indexUid/stats")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Health Seen")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("GET - /health")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Version Seen")]),e._v(" "),_("td",[e._v("Occurs when "),_("code",[e._v("GET - /version")]),e._v(" is fetched.")])]),e._v(" "),_("tr",[_("td",[e._v("Experimental features Seen")]),e._v(" "),_("td",[e._v("Occurs when "),_("code",[e._v("GET - /experimental-features")]),e._v(" is fetched.")])]),e._v(" "),_("tr",[_("td",[e._v("Experimental features Updated")]),e._v(" "),_("td",[e._v("Occurs when experimental features are updated via "),_("code",[e._v("PATCH - /experimental-features")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"summarized-metrics-events-table"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#summarized-metrics-events-table"}},[e._v("#")]),e._v(" Summarized Metrics/Events table")]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Metric name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")]),e._v(" "),_("th",[e._v("Triggered by")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[_("code",[e._v("context.app.version")])]),e._v(" "),_("td",[e._v("MeiliSearch version number")]),e._v(" "),_("td",[e._v("0.23.0")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.env")])]),e._v(" "),_("td",[e._v("MeiliSearch env")]),e._v(" "),_("td",[e._v("production")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.db_path")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--db-path")]),e._v("/"),_("code",[e._v("MEILI_DB_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.import_dump")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--import-dump")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.dump_dir")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--dump-dir")]),e._v("/"),_("code",[e._v("MEILI_DUMP_DIR")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ignore_missing_dump")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore-missing-dump")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ignore_dump_if_db_exists")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore-dump-if-db-exists")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.import_snapshot")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--import-snapshot")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.schedule_snapshot")])]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--schedule_snapshot")]),e._v("/"),_("code",[e._v("MEILI_SCHEDULE_SNAPSHOT")]),e._v(" if scheduled snapshots are enabled, otherwise "),_("code",[e._v("None")])]),e._v(" "),_("td",[e._v("86400")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.snapshot_dir")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--snapshot-dir")]),e._v("/"),_("code",[e._v("MEILI_SNAPSHOT_DIR")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ignore_missing_snapshot")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore_missing_snapshot")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ignore_snapshot_if_db_exists")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore_snapshot_if_db_exists")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.http_addr")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--http-addr")]),e._v("/"),_("code",[e._v("MEILI_HTTP_ADDR")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.http_payload_size_limit")])]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--http-payload-size-limit")]),e._v("/"),_("code",[e._v("MEILI_HTTP_PAYLOAD_SIZE_LIMIT")]),e._v(" in bytes")]),e._v(" "),_("td",[e._v("336042103")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.log_level")])]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--log-level")]),e._v("/"),_("code",[e._v("MEILI_LOG_LEVEL")])]),e._v(" "),_("td",[e._v("debug")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.max_indexing_memory")])]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--max-indexing-memory")]),e._v("/"),_("code",[e._v("MEILI_MAX_INDEXING_MEMORY")]),e._v(" in bytes")]),e._v(" "),_("td",[e._v("336042103")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.max_indexing_threads")])]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--max-indexing-threads")]),e._v("/"),_("code",[e._v("MEILI_MAX_INDEXING_THREADS")]),e._v(" in integer")]),e._v(" "),_("td",[e._v("4")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_auth_path")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-auth-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_AUTH_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_cert_path")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-cert-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_CERT_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_key_path")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-key-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_KEY_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_ocsp_path")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-ocsp-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_OCSP_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_require_auth")])]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--ssl-require-auth")]),e._v("/"),_("code",[e._v("MEILI_SSL_REQUIRE_AUTH")]),e._v(" as a boolean")]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_resumption")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-resumption")]),e._v("/"),_("code",[e._v("MEILI_SSL_RESUMPTION")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_tickets")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-tickets")]),e._v("/"),_("code",[e._v("MEILI_SSL_TICKETS")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.with_configuration_file")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the instance is launched with a configuration file, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.task_queue_webhook")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the instance is launched with a task queue webhook, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.experimental_enable_metrics")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-enable-metrics")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_ENABLE_METRICS")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.experimental_replication_parameters")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-replication-parameters")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_REPLICATION_PARAMETERS")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.experimental_logs_mode")])]),e._v(" "),_("td",[_("code",[e._v("human")]),e._v(" or "),_("code",[e._v("json")]),e._v(" depending on the value specified.")]),e._v(" "),_("td",[_("code",[e._v("human")])]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.experimental_enable_logs_route")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-enable-logs-route")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_ENABLE_LOGS_ROUTE")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.experimental_reduce_indexing_memory_usage")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-reduce-indexing-memory-usage")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_REDUCE_INDEXING_MEMORY_USAGE")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.gpu_enabled")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if Meilisearch was compiled with CUDA support, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("system.distribution")])]),e._v(" "),_("td",[e._v("Distribution on which MeiliSearch is launched")]),e._v(" "),_("td",[e._v("Arch Linux")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("system.kernel_version")])]),e._v(" "),_("td",[e._v("Kernel version on which MeiliSearch is launched")]),e._v(" "),_("td",[e._v("5.14.10")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("system.cores")])]),e._v(" "),_("td",[e._v("Number of cores")]),e._v(" "),_("td",[e._v("24")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("system.ram_size")])]),e._v(" "),_("td",[e._v("Total RAM capacity. Expressed in "),_("code",[e._v("KB")])]),e._v(" "),_("td",[e._v("16777216")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("system.disk_size")])]),e._v(" "),_("td",[e._v("Total capacity of the largest disk. Expressed in "),_("code",[e._v("Bytes")])]),e._v(" "),_("td",[e._v("1048576000")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("system.server_prodiver")])]),e._v(" "),_("td",[e._v("Users can tell us on which provider MeiliSearch is hosted by filling the "),_("code",[e._v("MEILI_SERVER_PROVIDER")]),e._v(" env var. This is also filled by our cloud deploy scripts, e.g. "),_("a",{attrs:{href:"https://github.com/meilisearch/cloud-scripts/blob/56a7c2630c1a508e5ad0c0ba1d8cfeb8d2fa9ae0/scripts/providers/gcp/cloud-config.yaml#L33",target:"_blank",rel:"noopener noreferrer"}},[e._v("GCP cloud-config.yaml"),_("OutboundLink")],1)]),e._v(" "),_("td",[e._v("gcp")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("stats.database_size")])]),e._v(" "),_("td",[e._v("Database size. Expressed in "),_("code",[e._v("Bytes")])]),e._v(" "),_("td",[e._v("2621440")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("stats.indexes_number")])]),e._v(" "),_("td",[e._v("Number of indexes")]),e._v(" "),_("td",[e._v("2")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("start_since_days")])]),e._v(" "),_("td",[e._v("Number of days since instance was launched")]),e._v(" "),_("td",[e._v("365")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("user_agent")])]),e._v(" "),_("td",[e._v("User-agent header encountered during one or more API calls")]),e._v(" "),_("td",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Index Created")]),e._v(", "),_("code",[e._v("Index Updated")]),e._v(", "),_("code",[e._v("Documents Added")]),e._v(", "),_("code",[e._v("Documents Updated")]),e._v(", "),_("code",[e._v("Documents Deleted")]),e._v(", "),_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")]),e._v(", "),_("code",[e._v("SortableAttributes Updated")]),e._v(", "),_("code",[e._v("FilterableAttributes Updated")]),e._v(", "),_("code",[e._v("SearchableAttributes Updated")]),e._v(", "),_("code",[e._v("TypoTolerance Updated")]),e._v(", "),_("code",[e._v("Pagination Updated")]),e._v(", "),_("code",[e._v("Faceting Updated")]),e._v(", "),_("code",[e._v("DistinctAttribute Updated")]),e._v(", "),_("code",[e._v("DisplayedAttributes Updated")]),e._v(", "),_("code",[e._v("StopWords Updated")]),e._v(", "),_("code",[e._v("Synonyms Updated")]),e._v(", "),_("code",[e._v("Dump Created")]),e._v(", "),_("code",[e._v("Snapshot Created")]),e._v(", "),_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Stats Seen")]),e._v(", "),_("code",[e._v("Health Seen")]),e._v(", "),_("code",[e._v("Version Seen")]),e._v(", "),_("code",[e._v("Documents Searched by Multi-Search POST")]),e._v(", "),_("code",[e._v("Experimental features Seen")]),e._v(", "),_("code",[e._v("Experimental features Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("requests.99th_response_time")])]),e._v(" "),_("td",[e._v("Highest latency from among the fastest 99% of successful search requests")]),e._v(" "),_("td",[e._v("57ms")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("requests.total_succeeded")])]),e._v(" "),_("td",[e._v("Total number of successful requests in this batch")]),e._v(" "),_("td",[e._v("3456")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("requests.total_failed")])]),e._v(" "),_("td",[e._v("Total number of failed requests in this batch")]),e._v(" "),_("td",[e._v("24")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("requests.total_received")])]),e._v(" "),_("td",[e._v("Total number of received requests in this batch")]),e._v(" "),_("td",[e._v("3480")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Deleted")]),e._v(", "),_("code",[e._v("Documents Fetched GET")]),e._v(", "),_("code",[e._v("Documents Fetched POST")]),e._v(", "),_("code",[e._v("Health Seen")]),e._v(", "),_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("sort.with_geoPoint")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the sort rule "),_("code",[e._v("_geoPoint")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("sort.avg_criteria_number")])]),e._v(" "),_("td",[e._v("Average number of sort criteria among all requests containing the "),_("code",[e._v("sort")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("2")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filter.with_geoRadius")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the filter rule "),_("code",[e._v("_geoRadius")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filter.with_geoBoundingBox")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the filter rule "),_("code",[e._v("_geoBoundingBox")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filter.most_used_syntax")])]),e._v(" "),_("td",[e._v("Most used filter syntax among all requests containing the "),_("code",[e._v("filter")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("string")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("attributes_to_search_on.total_number_of_uses")])]),e._v(" "),_("td",[e._v("Total number of queries where "),_("code",[e._v("attributesToSearchOn")]),e._v(" is set")]),e._v(" "),_("td",[e._v("5")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("q.max_terms_number")])]),e._v(" "),_("td",[e._v("Highest number of terms given for the "),_("code",[e._v("q")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("5")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("vector.max_vector_size")])]),e._v(" "),_("td",[e._v("Highest number of dimensions given for the "),_("code",[e._v("vector")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("1536")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_limit")])]),e._v(" "),_("td",[e._v("Highest value given for the "),_("code",[e._v("limit")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("60")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Fetched GET")]),e._v(", "),_("code",[e._v("Documents Fetched POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_offset")])]),e._v(" "),_("td",[e._v("Highest value given for the "),_("code",[e._v("offset")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("1000")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Fetched GET")]),e._v(", "),_("code",[e._v("Documents Fetched POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.most_used_navigation")])]),e._v(" "),_("td",[e._v("Most used search results navigation among all search requests in this batch. "),_("code",[e._v("estimated")]),e._v(" / "),_("code",[e._v("exhaustive")])]),e._v(" "),_("td",[_("code",[e._v("estimated")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.max_attributes_to_retrieve")])]),e._v(" "),_("td",[e._v("The maximum number of attributes to retrieve encountered among all requests in this batch.")]),e._v(" "),_("td",[e._v("100")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.max_attributes_to_highlight")])]),e._v(" "),_("td",[e._v("The maximum number of attributes to highlight encountered among all requests in this batch.")]),e._v(" "),_("td",[e._v("100")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.highlight_pre_tag")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("highlightPreTag")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.highlight_post_tag")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("highlightPostTag")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.max_attributes_to_crop")])]),e._v(" "),_("td",[e._v("The maximum number of attributes to crop encountered among all requests in this batch.")]),e._v(" "),_("td",[e._v("100")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.crop_length")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("cropLength")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.crop_marker")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("cropMarker")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.show_matches_position")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("showMatchesPosition")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("facets.avg_facets_number")])]),e._v(" "),_("td",[e._v("The average number of facets among all the requests containing the "),_("code",[e._v("facets")]),e._v(" parameter in this batch. "),_("code",[e._v('"facets": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("facets")]),e._v(" does not influence the average in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("10")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("primary_key")])]),e._v(" "),_("td",[e._v("Value given for the "),_("code",[e._v("primaryKey")]),e._v(" parameter if used, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[e._v("id")]),e._v(" "),_("td",[_("code",[e._v("Index Created")]),e._v(", "),_("code",[e._v("Index Updated")]),e._v(", "),_("code",[e._v("Documents Added")]),e._v(", "),_("code",[e._v("Documents Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("payload_type")])]),e._v(" "),_("td",[e._v("All "),_("code",[e._v("payload_type")]),e._v(" encountered in this batch")]),e._v(" "),_("td",[e._v('["application/json", "text/plain", "application/x-ndjson"]')]),e._v(" "),_("td",[_("code",[e._v("Documents Added")]),e._v(", "),_("code",[e._v("Documents Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("index_creation")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if a document addition or update request triggered index creation in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[_("code",[e._v("Documents Added")]),e._v(", "),_("code",[e._v("Documents Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.words_position")])]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("words")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("1")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.typo_position")])]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("typo")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("2")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.proximity_position")])]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("proximity")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.attribute_position")])]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("attribute")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("4")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.sort_position")])]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("sort")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("5")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.exactness_position")])]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("exactness")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("6")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.values")])]),e._v(" "),_("td",[e._v("A string representing the ranking rules without the custom asc-desc rules.")]),e._v(" "),_("td",[_("code",[e._v('"words, typo, attribute, sort, exactness"')])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("sortable_attributes.total")])]),e._v(" "),_("td",[e._v("Number of sortable attributes")]),e._v(" "),_("td",[e._v("3")]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("SortableAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("sortable_attributes.has_geo")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("_geo")]),e._v(" is set as a sortable attribute, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("SortableAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filterable_attributes.total")])]),e._v(" "),_("td",[e._v("Number of filterable attributes")]),e._v(" "),_("td",[e._v("3")]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("FilterableAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filterable_attributes.has_geo")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("_geo")]),e._v(" is set as a filterable attribute, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("FilterableAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("searchable_attributes.total")])]),e._v(" "),_("td",[e._v("Number of searchable attributes")]),e._v(" "),_("td",[e._v("4")]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("SearchableAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("searchable_attributes.with_wildcard")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("*")]),e._v(" is specified as a searchable attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("SearchableAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("typo_tolerance.enabled")])]),e._v(" "),_("td",[e._v("Whether the typo tolerance is enabled")]),e._v(" "),_("td",[_("code",[e._v("true")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("TypoTolerance Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("typo_tolerance.disable_on_attributes")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if at least one value is defined")]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("TypoTolerance Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("typo_tolerance.disable_on_words")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if at least one value is defined")]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("TypoTolerance Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("typo_tolerance.min_word_size_for_typos.one_typo")])]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("minWordSizeForTypos.oneTypo")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("5")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("TypoTolerance Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("typo_tolerance.min_word_size_for_typos.two_typos")])]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("minWordSizeForTypos.twoTypos")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("9")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("TypoTolerance Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_total_hits")])]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("pagination.maxTotalHits")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("1000")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Pagination Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("faceting.max_values_per_facet")])]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("faceting.maxValuesPerFacet")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("100")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Faceting Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("faceting.sort_facet_values_by_star_count")])]),e._v(" "),_("td",[e._v("Whether the user set all fields to be sort by count")]),e._v(" "),_("td",[_("code",[e._v("true")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Faceting Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("faceting.sort_facet_values_by_total")])]),e._v(" "),_("td",[e._v("The number of different values that were set")]),e._v(" "),_("td",[_("code",[e._v("10")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Faceting Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("distinct_attribute.set")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if a field name is specified as a distrinct attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("DistinctAttribute Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("proximity_precision.set")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" the setting has been manually set, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("ProximityPrecision Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("proximity_precision.value")])]),e._v(" "),_("td",[_("code",[e._v("byWord")]),e._v(" or "),_("code",[e._v("byAttribute")]),e._v(" if the setting has been set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("ProximityPrecision Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("displayed_attributes.total")])]),e._v(" "),_("td",[e._v("Number of displayed attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("SettingUpdated")]),e._v(", "),_("code",[e._v("DisplayedAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("displayed_attributes.with_wildcard")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("*")]),e._v(" is specified as a displayed attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("SettingUpdated")]),e._v(", "),_("code",[e._v("DisplayedAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("stop_words.total")])]),e._v(" "),_("td",[e._v("Number of stop words.")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("StopWords Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("separator_tokens.total")])]),e._v(" "),_("td",[e._v("Number of separator tokens.")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("SeparatorTokens Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("non_separator_tokens.total")])]),e._v(" "),_("td",[e._v("Number of non separator tokens.")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("NonSeparatorTokens Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("dictionary.total")])]),e._v(" "),_("td",[e._v("Number of words in the dictionary.")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Dictionary Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("synonyms.total")])]),e._v(" "),_("td",[e._v("Number of synonyms.")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Synonyms Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_task_uid")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if an uid is used to fetch a particular task resource, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_uid")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("uids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_index_uid")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("indexUids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_type")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("types")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_status")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("statuses")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_canceled_by")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("canceledBy")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_before_enqueued_at")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_after_enqueued_at")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_before_started_at")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_after_started_at")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_before_finished_at")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_after_finished_at")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_index_uid")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if an uid is used to fetch an index stat resource, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Stats Seen")])])]),e._v(" "),_("tr",[_("td",[e._v("searches.avg_search_count")]),e._v(" "),_("td",[e._v("The average number of search queries received per call for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("4.2")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[e._v("searches.total_search_count")]),e._v(" "),_("td",[e._v("The total number of search queries received for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("16023")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[e._v("indexes.avg_distinct_index_count")]),e._v(" "),_("td",[e._v("The average number of queried indexes received per call for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("1.2")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[e._v("indexes.total_distinct_index_count")]),e._v(" "),_("td",[e._v("The total number of distinct indexes queries for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("6023")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[e._v("indexes.total_single_index")]),e._v(" "),_("td",[e._v("The total number of calls where only one index where queried.")]),e._v(" "),_("td",[_("code",[e._v("2007")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("swap_operation_number")])]),e._v(" "),_("td",[e._v("The number of swap operation given in "),_("code",[e._v("POST /swap-indexes")]),e._v(" API call")]),e._v(" "),_("td",[e._v("2")]),e._v(" "),_("td",[_("code",[e._v("Indexes Swapped")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("matching_strategy.most_used_strategy")])]),e._v(" "),_("td",[e._v("Most used word matching strategy among all search requests in this batch")]),e._v(" "),_("td",[_("code",[e._v("last")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_document_id")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("DELETE /indexes/:indexUid/documents/:documentUid")]),e._v(" endpoint was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_batch")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("POST /indexes/:indexUid/documents/delete-batch")]),e._v(" endpoint was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_filter")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("POST /indexes/:indexUid/documents/delete")]),e._v(" endpoint was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Fetched GET")]),e._v(", "),_("code",[e._v("Documents Fetched POST")]),e._v(", "),_("code",[e._v("Documents Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("clear_all")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("DELETE /indexes/:indexUid/documents")]),e._v(" endpoint was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Deleted")])])]),e._v(" "),_("tr",[_("td",[e._v("vector_store")]),e._v(" "),_("td",[e._v("Whether the "),_("RouterLink",{attrs:{to:"/specifications/text/0193-experimental-features.html#vector-store"}},[e._v("vector store")]),e._v(" feature is enabled.")],1),e._v(" "),_("td",[_("code",[e._v("true")])]),e._v(" "),_("td",[_("code",[e._v("Experimental features Updated")])])]),e._v(" "),_("tr",[_("td",[e._v("scoring.show_ranking_score")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showRankingScore")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(", otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[e._v("scoring.show_ranking_score_details")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showRankingScoreDetails")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(", otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("facets.total_distinct_facet_count")])]),e._v(" "),_("td",[e._v("The total number of distinct facets queried for the aggregated event")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Facet Searched POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("facets.additional_search_parameters_provided")])]),e._v(" "),_("td",[e._v("Were additional search parameters provided for the aggregated event")]),e._v(" "),_("td",[_("code",[e._v("true")])]),e._v(" "),_("td",[_("code",[e._v("Facet Searched POST")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"detailed-list-of-instance-metrics-and-events-with-their-metrics"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#detailed-list-of-instance-metrics-and-events-with-their-metrics"}},[e._v("#")]),e._v(" Detailed list of Instance metrics and, events with their metrics")]),e._v(" "),_("h5",{attrs:{id:"system-configuration-system"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#system-configuration-system"}},[e._v("#")]),e._v(" System Configuration "),_("code",[e._v("system")])]),e._v(" "),_("p",[e._v("This property allows us to gather essential information to better understand on which type of machine MeiliSearch is used. This allows us to better advise users on the machines to choose according to their data volume and their use-cases.")]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("system.distribution")]),e._v(" "),_("td",[e._v("Distribution on which MeiliSearch is launched")]),e._v(" "),_("td",[_("code",[e._v("Arch Linux")])])]),e._v(" "),_("tr",[_("td",[e._v("system.kernel_version")]),e._v(" "),_("td",[e._v("Kernel version on which MeiliSearch is launched")]),e._v(" "),_("td",[_("code",[e._v("5.14.10-arch1-1")])])]),e._v(" "),_("tr",[_("td",[e._v("system.cores")]),e._v(" "),_("td",[e._v("Number of cores")]),e._v(" "),_("td",[_("code",[e._v("24")])])]),e._v(" "),_("tr",[_("td",[e._v("system.ram_size")]),e._v(" "),_("td",[e._v("Total RAM capacity. Expressed in "),_("code",[e._v("KB")])]),e._v(" "),_("td",[_("code",[e._v("33604210")])])]),e._v(" "),_("tr",[_("td",[e._v("system.disk_size")]),e._v(" "),_("td",[e._v("Total capacity of the largest disk. Expressed in "),_("code",[e._v("Bytes")])]),e._v(" "),_("td",[_("code",[e._v("336042103")])])]),e._v(" "),_("tr",[_("td",[e._v("system.server_provider")]),e._v(" "),_("td",[e._v("Users can tell us on which provider MeiliSearch is hosted by filling the "),_("code",[e._v("MEILI_SERVER_PROVIDER")]),e._v(" env var. This is also filled by our providers deploy scripts. e.g. "),_("a",{attrs:{href:"https://github.com/meilisearch/cloud-scripts/blob/56a7c2630c1a508e5ad0c0ba1d8cfeb8d2fa9ae0/scripts/providers/gcp/cloud-config.yaml#L33",target:"_blank",rel:"noopener noreferrer"}},[e._v("GCP cloud-config.yaml"),_("OutboundLink")],1)]),e._v(" "),_("td",[_("code",[e._v("gcp")])])])])]),e._v(" "),_("h5",{attrs:{id:"meilisearch-configuration-context-and-infos"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#meilisearch-configuration-context-and-infos"}},[e._v("#")]),e._v(" MeiliSearch Configuration "),_("code",[e._v("context")]),e._v(" and "),_("code",[e._v("infos")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("context.app.version")]),e._v(" "),_("td",[e._v("MeiliSearch version number. Sent in a "),_("code",[e._v("context")]),e._v(" object instead of "),_("code",[e._v("properties")]),e._v(" to match Amplitude requirement")]),e._v(" "),_("td",[e._v("0.23.0")])]),e._v(" "),_("tr",[_("td",[e._v("infos.env")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--env")]),e._v("/"),_("code",[e._v("MEILI_ENV")])]),e._v(" "),_("td",[_("code",[e._v("production")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.db_path")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--db-path")]),e._v("/"),_("code",[e._v("MEILI_DB_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.import_dump")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--import-dump")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.dump_dir")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--dump-dir")]),e._v("/"),_("code",[e._v("MEILI_DUMP_DIR")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.ignore_missing_dump")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore-missing-dump")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.ignore_dump_if_db_exists")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore-dump-if-db-exists")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.import_snapshot")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--import-snapshot")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.schedule_snapshot")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--schedule_snapshot")]),e._v("/"),_("code",[e._v("MEILI_SCHEDULE_SNAPSHOT")]),e._v(" if scheduled snapshots are enabled, otherwise "),_("code",[e._v("None")])]),e._v(" "),_("td",[_("code",[e._v("86400")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.snapshot_dir")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--snapshot-dir")]),e._v("/"),_("code",[e._v("MEILI_SNAPSHOT_DIR")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.ignore_missing_snapshot")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore-missing-snapshot")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.ignore_snapshot_if_db_exists")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore-snapshot-if-db-exists")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.http_addr")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--http-addr")]),e._v("/"),_("code",[e._v("MEILI_HTTP_ADDR")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.http_payload_size_limit")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--http-payload-size-limit")]),e._v("/"),_("code",[e._v("MEILI_HTTP_PAYLOAD_SIZE_LIMIT")]),e._v(" in bytes")]),e._v(" "),_("td",[_("code",[e._v("336042103")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.log_level")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--log-level")]),e._v("/"),_("code",[e._v("MEILI_LOG_LEVEL")])]),e._v(" "),_("td",[_("code",[e._v("debug")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.max_indexing_memory")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--max-indexing-memory")]),e._v("/"),_("code",[e._v("MEILI_MAX_INDEXING_MEMORY")]),e._v(" in bytes")]),e._v(" "),_("td",[_("code",[e._v("336042103")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.max_indexing_threads")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--max-indexing-threads")]),e._v("/"),_("code",[e._v("MEILI_MAX_INDEXING_THREADS")]),e._v(" in integer")]),e._v(" "),_("td",[_("code",[e._v("4")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_auth_path")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-auth-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_AUTH_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_cert_path")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-cert-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_CERT_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_key_path")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-key-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_KEY_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_ocsp_path")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-ocsp-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_OCSP_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_require_auth")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--ssl-require-auth")]),e._v("/"),_("code",[e._v("MEILI_SSL_REQUIRE_AUTH")]),e._v(" as a boolean")]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_resumption")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-resumption")]),e._v("/"),_("code",[e._v("MEILI_SSL_RESUMPTION")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_tickets")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-tickets")]),e._v("/"),_("code",[e._v("MEILI_SSL_TICKETS")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.with_configuration_file")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the instance is launched with a configuration file, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.task_queue_webhook")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the instance is launched with a task queue webhook, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.experimental_enable_metrics")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-enable-metrics")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_ENABLE_METRICS")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.experimental_replication_parameters")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-replication-parameters")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_REPLICATION_PARAMETERS")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.experimental_logs_mode")]),e._v(" "),_("td",[_("code",[e._v("human")]),e._v(" or "),_("code",[e._v("json")]),e._v(" depending on the value specified.")]),e._v(" "),_("td",[_("code",[e._v("human")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.experimental_enable_logs_route")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-enable-logs-route")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_ENABLE_LOGS_ROUTE")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.experimental_reduce_indexing_memory_usage")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-reduce-indexing-memory-usage")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_REDUCE_INDEXING_MEMORY_USAGE")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.gpu_enabled")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if Meilisearch was compiled with CUDA support, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("h5",{attrs:{id:"meilisearch-statistics-stats"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#meilisearch-statistics-stats"}},[e._v("#")]),e._v(" MeiliSearch Statistics "),_("code",[e._v("stats")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("stats.database_size")]),e._v(" "),_("td",[e._v("Database size. Expressed in "),_("code",[e._v("Bytes")])]),e._v(" "),_("td",[_("code",[e._v("180230")])])]),e._v(" "),_("tr",[_("td",[e._v("stats.indexes_number")]),e._v(" "),_("td",[e._v("Number of indexes")]),e._v(" "),_("td",[_("code",[e._v("2")])])]),e._v(" "),_("tr",[_("td",[e._v("stats.documents_number")]),e._v(" "),_("td",[e._v("Number of indexed documents")]),e._v(" "),_("td",[_("code",[e._v("165847")])])]),e._v(" "),_("tr",[_("td",[e._v("start_since_days")]),e._v(" "),_("td",[e._v("Number of days since instance was launched")]),e._v(" "),_("td",[_("code",[e._v("328")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"launched"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#launched"}},[e._v("#")]),e._v(" "),_("code",[e._v("Launched")])]),e._v(" "),_("blockquote",[_("p",[e._v("This is the first event sent to mark that MeiliSearch is launched a first time.")])]),e._v(" "),_("h4",{attrs:{id:"documents-searched-post"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-searched-post"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Searched POST")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Searched event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(". The event's properties are averaged over all requests on "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/search")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.99th_response_time")]),e._v(" "),_("td",[e._v("The maximum latency, in "),_("code",[e._v("ms")]),e._v(", for the fastest 99% of succeeded requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("57ms")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_succeeded")]),e._v(" "),_("td",[e._v("The total number of succeeded search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3456")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_failed")]),e._v(" "),_("td",[e._v("The total number of failed search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("24")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The total number of received search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])]),e._v(" "),_("tr",[_("td",[e._v("sort.with_geoPoint")]),e._v(" "),_("td",[e._v("Does the built-in sort rule _geoPoint rule has been used in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("sort.avg_criteria_number")]),e._v(" "),_("td",[e._v("The average number of sort criteria among all the requests containing the "),_("code",[e._v("sort")]),e._v(" parameter in the aggregated event. "),_("code",[e._v('"sort": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("sort")]),e._v(" does not influence the average.")]),e._v(" "),_("td",[_("code",[e._v("2")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.with_geoRadius")]),e._v(" "),_("td",[e._v("Does the built-in filter rule _geoRadius has been used in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.with_geoBoundingBox")]),e._v(" "),_("td",[e._v("Does the built-in filter rule _geoBoundingBox has been used in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.avg_criteria_number")]),e._v(" "),_("td",[e._v("The average number of filter criteria among all the requests containing the "),_("code",[e._v("filter")]),e._v(" parameter in the aggregated event. "),_("code",[e._v('"filter": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("filter")]),e._v(" does not influence the average in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("4")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.most_used_syntax")]),e._v(" "),_("td",[e._v("The most used filter syntax among all the requests containing the requests containing the "),_("code",[e._v("filter")]),e._v(" parameter in the aggregated event. "),_("code",[e._v("string")]),e._v(" / "),_("code",[e._v("array")]),e._v(" / "),_("code",[e._v("mixed")])]),e._v(" "),_("td",[_("code",[e._v("mixed")])])]),e._v(" "),_("tr",[_("td",[e._v("attributes_to_search_on.total_number_of_uses")]),e._v(" "),_("td",[e._v("Total number of queries where "),_("code",[e._v("attributesToSearchOn")]),e._v(" is set")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("q.max_terms_number")]),e._v(" "),_("td",[e._v("The maximum number of terms for the "),_("code",[e._v("q")]),e._v(" parameter among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("vector.max_vector_size")]),e._v(" "),_("td",[e._v("The maximum number of dimensions for the "),_("code",[e._v("vector")]),e._v(" parameter among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("1536")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.max_limit")]),e._v(" "),_("td",[e._v("The maximum limit encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("20")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.max_offset")]),e._v(" "),_("td",[e._v("The maximum offset encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("1000")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.most_used_navigation")]),e._v(" "),_("td",[e._v("Most used search results navigation among all requests in the aggregated event. "),_("code",[e._v("estimated")]),e._v(" / "),_("code",[e._v("exhaustive")])]),e._v(" "),_("td",[_("code",[e._v("estimated")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.max_attributes_to_retrieve")]),e._v(" "),_("td",[e._v("The maximum number of attributes to retrieve encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.max_attributes_to_highlight")]),e._v(" "),_("td",[e._v("The maximum number of attributes to highlight encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.highlight_pre_tag")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("highlightPreTag")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.highlight_post_tag")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("highlightPostTag")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.max_attributes_to_crop")]),e._v(" "),_("td",[e._v("The maximum number of attributes to crop encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.crop_length")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("cropLength")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.crop_marker")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("cropMarker")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.show_matches_position")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showMatchesPosition")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("facets.avg_facets_number")]),e._v(" "),_("td",[e._v("The average number of facets among all the requests containing the "),_("code",[e._v("facets")]),e._v(" parameter in the aggregated event. "),_("code",[e._v('"facets": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("facets")]),e._v(" does not influence the average in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("10")])])]),e._v(" "),_("tr",[_("td",[e._v("matching_strategy.most_used_strategy")]),e._v(" "),_("td",[e._v("Most used word matching strategy among all search requests in the aggregated event. "),_("code",[e._v("last")]),e._v(" / "),_("code",[e._v("all")])]),e._v(" "),_("td",[_("code",[e._v("last")])])]),e._v(" "),_("tr",[_("td",[e._v("scoring.show_ranking_score")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showRankingScore")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(", otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("scoring.show_ranking_score_details")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showRankingScoreDetails")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(", otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"documents-searched-get"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-searched-get"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Searched GET")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Searched event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(". The event's properties are averaged over all requests on "),_("code",[e._v("GET")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/search")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.99th_response_time")]),e._v(" "),_("td",[e._v("Highest latency from among the fastest 99% of successful search requests.")]),e._v(" "),_("td",[_("code",[e._v("57ms")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_succeeded")]),e._v(" "),_("td",[e._v("The total number of succeeded search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3456")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_failed")]),e._v(" "),_("td",[e._v("The total number of failed search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("24")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The total number of received search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])]),e._v(" "),_("tr",[_("td",[e._v("sort.with_geoPoint")]),e._v(" "),_("td",[e._v("Does the built-in sort rule _geoPoint rule has been used in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("sort.avg_criteria_number")]),e._v(" "),_("td",[e._v("The average number of sort criteria among all the requests containing the "),_("code",[e._v("sort")]),e._v(" parameter in the aggregated event. "),_("code",[e._v('"sort": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("sort")]),e._v(" does not influence the average.")]),e._v(" "),_("td",[_("code",[e._v("2")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.with_geoRadius")]),e._v(" "),_("td",[e._v("Does the built-in filter rule _geoRadius has been used in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.with_geoBoundingBox")]),e._v(" "),_("td",[e._v("Does the built-in filter rule _geoBoundingBox has been used in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.avg_criteria_number")]),e._v(" "),_("td",[e._v("The average number of filter criteria among all the requests containing the "),_("code",[e._v("filter")]),e._v(" parameter in the aggregated event. "),_("code",[e._v('"filter": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("filter")]),e._v(" does not influence the average in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("4")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.most_used_syntax")]),e._v(" "),_("td",[e._v("The most used filter syntax among all the requests containing the requests containing the "),_("code",[e._v("filter")]),e._v(" parameter in the aggregated event. "),_("code",[e._v("string")]),e._v(" / "),_("code",[e._v("array")]),e._v(" / "),_("code",[e._v("mixed")])]),e._v(" "),_("td",[_("code",[e._v("mixed")])])]),e._v(" "),_("tr",[_("td",[e._v("attributes_to_search_on.total_number_of_uses")]),e._v(" "),_("td",[e._v("Total number of queries where "),_("code",[e._v("attributesToSearchOn")]),e._v(" is set")]),e._v(" "),_("td",[e._v("5")])]),e._v(" "),_("tr",[_("td",[e._v("q.max_terms_number")]),e._v(" "),_("td",[e._v("The maximum number of terms for the "),_("code",[e._v("q")]),e._v(" parameter among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.max_limit")]),e._v(" "),_("td",[e._v("The maximum limit encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("20")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.max_offset")]),e._v(" "),_("td",[e._v("The maximum offset encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("1000")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.most_used_navigation")]),e._v(" "),_("td",[e._v("Most used search results navigation among all requests in the aggregated event. "),_("code",[e._v("estimated")]),e._v(" / "),_("code",[e._v("exhaustive")])]),e._v(" "),_("td",[_("code",[e._v("estimated")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.max_attributes_to_retrieve")]),e._v(" "),_("td",[e._v("The maximum number of attributes to retrieve encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.max_attributes_to_highlight")]),e._v(" "),_("td",[e._v("The maximum number of attributes to highlight encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.highlight_pre_tag")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("highlightPreTag")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.highlight_post_tag")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("highlightPostTag")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.max_attributes_to_crop")]),e._v(" "),_("td",[e._v("The maximum number of attributes to crop encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.crop_length")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("cropLength")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.crop_marker")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("cropMarker")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.show_matches_position")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("showMatchesPosition")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("facets.avg_facets_number")]),e._v(" "),_("td",[e._v("The average number of facets among all the requests containing the "),_("code",[e._v("facets")]),e._v(" parameter in the aggregated event. "),_("code",[e._v('"facets": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("facets")]),e._v(" does not influence the average in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("10")])])]),e._v(" "),_("tr",[_("td",[e._v("matching_strategy.most_used_strategy")]),e._v(" "),_("td",[e._v("Most used word matching strategy among all search requests in the aggregated event. "),_("code",[e._v("last")]),e._v(" / "),_("code",[e._v("all")])]),e._v(" "),_("td",[_("code",[e._v("last")])])]),e._v(" "),_("tr",[_("td",[e._v("scoring.show_ranking_score")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showRankingScore")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(", otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("scoring.show_ranking_score_details")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showRankingScoreDetails")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(", otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"facet-searched-post"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#facet-searched-post"}},[e._v("#")]),e._v(" "),_("code",[e._v("Facet Searched POST")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Facet Searched event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(". The event's properties are averaged over all requests on "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/facet-search")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.99th_response_time")]),e._v(" "),_("td",[e._v("Highest latency from among the fastest 99% of successful search requests.")]),e._v(" "),_("td",[_("code",[e._v("57ms")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_succeeded")]),e._v(" "),_("td",[e._v("The total number of succeeded search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3456")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_failed")]),e._v(" "),_("td",[e._v("The total number of failed search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("24")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The total number of received search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])]),e._v(" "),_("tr",[_("td",[e._v("facets.total_distinct_facet_count")]),e._v(" "),_("td",[e._v("The total number of distinct facets queried for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("facets.additional_search_parameters_provided")]),e._v(" "),_("td",[e._v("Were additional search parameters provided for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("true")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"documents-searched-by-multi-search-post"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-searched-by-multi-search-post"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Searched by Multi-Search POST")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Searched event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(". The event's properties are averaged over all requests on "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/multi-search")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_succeeded")]),e._v(" "),_("td",[e._v("The number of succeeded calls on the endpoint for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3456")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_failed")]),e._v(" "),_("td",[e._v("The number of calls on the endpoint for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("24")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The number of calls on the endpoint for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])]),e._v(" "),_("tr",[_("td",[e._v("searches.avg_search_count")]),e._v(" "),_("td",[e._v("The average number of search queries received per call for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("4.2")])])]),e._v(" "),_("tr",[_("td",[e._v("searches.total_search_count")]),e._v(" "),_("td",[e._v("The total number of search queries received for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("16023")])])]),e._v(" "),_("tr",[_("td",[e._v("indexes.avg_distinct_index_count")]),e._v(" "),_("td",[e._v("The average number of queried indexes received per call for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("1.2")])])]),e._v(" "),_("tr",[_("td",[e._v("indexes.total_distinct_index_count")]),e._v(" "),_("td",[e._v("The total number of distinct indexes queries for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("6023")])])]),e._v(" "),_("tr",[_("td",[e._v("indexes.total_single_index")]),e._v(" "),_("td",[e._v("The total number of calls where only one index where queried.")]),e._v(" "),_("td",[_("code",[e._v("2007")])])])])]),e._v(" "),_("h2",{attrs:{id:"index-created"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#index-created"}},[e._v("#")]),e._v(" "),_("code",[e._v("Index Created")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered for this API call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("primary_key")]),e._v(" "),_("td",[e._v("The field's name used as a primary key if set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("id")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"index-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#index-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Index Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered for this API call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("primary_key")]),e._v(" "),_("td",[e._v("The field's name used as a primary key if set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("id")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"indexes-swapped"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#indexes-swapped"}},[e._v("#")]),e._v(" "),_("code",[e._v("Indexes Swapped")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered for this API call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("swap_operation_number")]),e._v(" "),_("td",[e._v("The number of swap operation given for this API call.")]),e._v(" "),_("td",[_("code",[e._v("2")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"documents-added"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-added"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Added")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Added event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(". The event's properties are averaged over all requests on "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("payload_type")]),e._v(" "),_("td",[e._v("Represents all the payload_type encountered on this endpoint in the aggregated event as a set. "),_("code",[e._v("application/json")]),e._v("/ "),_("code",[e._v("application/x-ndjson")]),e._v("/ "),_("code",[e._v("text/plain")]),e._v(" or any non-supported content-type.")]),e._v(" "),_("td",[e._v("["),_("code",[e._v("text/plain")]),e._v(", "),_("code",[e._v("application/json")]),e._v("]")])]),e._v(" "),_("tr",[_("td",[e._v("primary_key")]),e._v(" "),_("td",[e._v("Represents all the "),_("code",[e._v("primaryKey")]),e._v(" query parameters encountered in the aggregated event as a set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v('["id"]')])])]),e._v(" "),_("tr",[_("td",[e._v("index_creation")]),e._v(" "),_("td",[e._v("Does an index creation happened among all requests in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"documents-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Updated")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Updated event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(". The event's properties are averaged over all requests on "),_("code",[e._v("PUT")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("payload_type")]),e._v(" "),_("td",[e._v("Represents all the payload_type encountered on this endpoint in the aggregated event as a set. "),_("code",[e._v("application/json")]),e._v("/ "),_("code",[e._v("application/x-ndjson")]),e._v("/ "),_("code",[e._v("text/plain")]),e._v(" or any non-supported content-type.")]),e._v(" "),_("td",[e._v("["),_("code",[e._v("text/plain")]),e._v(", "),_("code",[e._v("application/json")]),e._v("]")])]),e._v(" "),_("tr",[_("td",[e._v("primary_key")]),e._v(" "),_("td",[e._v("Represents all the "),_("code",[e._v("primaryKey")]),e._v(" query parameters encountered in the aggregated event as a set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v('["id"]')])])]),e._v(" "),_("tr",[_("td",[e._v("index_creation")]),e._v(" "),_("td",[e._v("Does an index creation happened among all requests in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"documents-deleted"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-deleted"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Deleted")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Deleted event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The total number of received requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])]),e._v(" "),_("tr",[_("td",[e._v("per_document_id")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("DELETE /indexes/:indexUid/documents/:documentUid")]),e._v(" endpoint is called in the aggregated event, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("clear_all")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("DELETE /indexes/:indexUid/documents")]),e._v(" endpoint is called in the aggregated event, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("per_batch")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("POST /indexes/:indexUid/documents/delete-batch")]),e._v(" endpoint is called in the aggregated event, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("per_filter")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("POST /indexes/:indexUid/documents/delete")]),e._v(" endpoint is called in the aggregated event, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("h2",{attrs:{id:"documents-fetched-get"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-fetched-get"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Fetched GET")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Fetched GET event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[_("code",[e._v("requests.total_received")])]),e._v(" "),_("td",[e._v("Total number of request received in this batch")]),e._v(" "),_("td",[e._v("325")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_document_id")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("GET /indexes/:indexUid/documents/:doc_id")]),e._v(" endpoint was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_filter")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("GET /indexes/:indexUid/documents")]),e._v(" endpoint was used with a filter in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_limit")])]),e._v(" "),_("td",[e._v("Highest value given for the "),_("code",[e._v("limit")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("60")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_offset")])]),e._v(" "),_("td",[e._v("Highest value given for the "),_("code",[e._v("offset")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("1000")])])])]),e._v(" "),_("h2",{attrs:{id:"documents-fetched-post"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-fetched-post"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Fetched POST")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Fetched POST event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[_("code",[e._v("requests.total_received")])]),e._v(" "),_("td",[e._v("Total number of request received in this batch")]),e._v(" "),_("td",[e._v("325")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_document_id")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_filter")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("POST /indexes/:indexUid/documents/fetch")]),e._v(" endpoint was used with a filter in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_limit")])]),e._v(" "),_("td",[e._v("Highest value given for the "),_("code",[e._v("limit")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("60")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_offset")])]),e._v(" "),_("td",[e._v("Highest value given for the "),_("code",[e._v("offset")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("1000")])])])]),e._v(" "),_("h2",{attrs:{id:"settings-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#settings-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Settings Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("searchable_attributes.total")]),e._v(" "),_("td",[e._v("Number of searchable attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("searchable_attributes.with_wildcard")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("*")]),e._v(" is specified as a searchable attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.words_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("words")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("1")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.typo_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("typo")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("2")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.proximity_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("proximity")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.attribute_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("attribute")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("4")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.sort_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("sort")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.exactness_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("exactness")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("6")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.values")]),e._v(" "),_("td",[e._v("A string representing the ranking rules without the custom asc-desc rules.")]),e._v(" "),_("td",[_("code",[e._v('"words, typo, attribute, sort, exactness"')])])]),e._v(" "),_("tr",[_("td",[e._v("sortable_attributes.total")]),e._v(" "),_("td",[e._v("Number of sortable attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("sortable_attributes.has_geo")]),e._v(" "),_("td",[e._v("Indicate if "),_("code",[e._v("_geo")]),e._v(" is set as a sortable attribute.")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("filterable_attributes.total")]),e._v(" "),_("td",[e._v("Number of filterable attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("filterable_attributes.has_geo")]),e._v(" "),_("td",[e._v("Indicate if "),_("code",[e._v("_geo")]),e._v(" is set as a filterable attribute.")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.enabled")]),e._v(" "),_("td",[e._v("Whether the typo tolerance is enabled.")]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.disable_on_attributes")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if at least one value is defined for "),_("code",[e._v("disableOnAttributes")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.disable_on_words")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if at least one value is defined for "),_("code",[e._v("disableOnWords")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.min_word_size_for_typos.one_typo")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("minWordSizeForTypos.oneTypo")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.min_word_size_for_typos.two_typos")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("minWordSizeForTypos.twoTypos")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("9")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.max_total_hits")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("pagination.maxTotalHits")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("1000")])])]),e._v(" "),_("tr",[_("td",[e._v("faceting.max_values_per_facet")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("faceting.maxValuesPerFacet")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("faceting.sort_facet_values_by_star_count")]),e._v(" "),_("td",[e._v("Whether the user set all fields to be sort by count")]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("faceting.sort_facet_values_by_total")]),e._v(" "),_("td",[e._v("The number of different values that were set")]),e._v(" "),_("td",[_("code",[e._v("10")])])]),e._v(" "),_("tr",[_("td",[e._v("distinct_attribute.set")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if a field name is specified, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("proximity_precision.set")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" the setting has been manually set, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("proximity_precision.value")]),e._v(" "),_("td",[_("code",[e._v("byWord")]),e._v(" or "),_("code",[e._v("byAttribute")]),e._v(" if the setting has been set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("null")])])]),e._v(" "),_("tr",[_("td",[e._v("displayed_attributes.total")]),e._v(" "),_("td",[e._v("Number of displayed attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("displayed_attributes.with_wildcard")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("*")]),e._v(" is specified as a displayed attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("stop_words.total")]),e._v(" "),_("td",[e._v("Number of stop words.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("separator_tokens.total")]),e._v(" "),_("td",[e._v("Number of separator tokens.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("non_separator_tokens.total")]),e._v(" "),_("td",[e._v("Number of non separator tokens.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("dictionary.total")]),e._v(" "),_("td",[e._v("Number of words in the dictionary.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("synonyms.total")]),e._v(" "),_("td",[e._v("Number of synonyms.")]),e._v(" "),_("td",[_("code",[e._v("3")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"rankingrules-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#rankingrules-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("RankingRules Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.words_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("words")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("1")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.typo_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("typo")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("2")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.proximity_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("proximity")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.attribute_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("attribute")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("4")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.sort_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("sort")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.exactness_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("exactness")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("6")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.values")]),e._v(" "),_("td",[e._v("A string representing the ranking rules without the custom asc-desc rules.")]),e._v(" "),_("td",[_("code",[e._v('"words, typo, attribute, sort, exactness"')])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"sortableattributes-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#sortableattributes-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("SortableAttributes Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("sortable_attributes.total")]),e._v(" "),_("td",[e._v("Number of sortable attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("sortable_attributes.has_geo")]),e._v(" "),_("td",[e._v("Indicate if "),_("code",[e._v("_geo")]),e._v(" is set as a sortable attribute.")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"filterableattributes-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#filterableattributes-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("FilterableAttributes Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("filterable_attributes.total")]),e._v(" "),_("td",[e._v("Number of filterable attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("filterable_attributes.has_geo")]),e._v(" "),_("td",[e._v("Indicate if "),_("code",[e._v("_geo")]),e._v(" is set as a filterable attribute.")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("h2",{attrs:{id:"searchableattributes-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#searchableattributes-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("SearchableAttributes Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("searchable_attributes.total")]),e._v(" "),_("td",[e._v("Number of searchable attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("searchable_attributes.with_wildcard")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("*")]),e._v(" is specified as a searchable attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("h2",{attrs:{id:"typotolerance-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#typotolerance-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("TypoTolerance Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.enabled")]),e._v(" "),_("td",[e._v("Whether the typo tolerance is enabled")]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.disable_on_attributes")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if at least one value is defined for "),_("code",[e._v("disableOnAttributes")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.disable_on_words")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if at least one value is defined for "),_("code",[e._v("disableOnWords")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.min_word_size_for_typos.one_typo")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("minWordSizeForTypos.oneTypo")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.min_word_size_for_typos.two_typos")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("minWordSizeForTypos.twoTypos")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("9")])])])])]),e._v(" "),_("h2",{attrs:{id:"pagination-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#pagination-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Pagination Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.max_total_hits")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("maxTotalHits")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("1000")])])])])]),e._v(" "),_("h2",{attrs:{id:"faceting-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#faceting-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Faceting Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("faceting.max_values_per_facet")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("maxValuesPerFacet")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("faceting.sort_facet_values_by_star_count")]),e._v(" "),_("td",[e._v("Whether the user set all fields to be sort by count")]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("faceting.sort_facet_values_by_total")]),e._v(" "),_("td",[e._v("The number of different values that were set")]),e._v(" "),_("td",[_("code",[e._v("10")])])])])]),e._v(" "),_("h2",{attrs:{id:"distinctattribute-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#distinctattribute-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("DistinctAttribute Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("distinct_attribute.set")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if a field name is specified, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("h2",{attrs:{id:"proximityprecision-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#proximityprecision-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("ProximityPrecision Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("proximity_precision.set")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" the setting has been manually set, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("proximity_precision.value")]),e._v(" "),_("td",[_("code",[e._v("byWord")]),e._v(" or "),_("code",[e._v("byAttribute")]),e._v(" if the setting has been set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("byWord")])])])])]),e._v(" "),_("h2",{attrs:{id:"displayedattributes-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#displayedattributes-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("DisplayedAttributes Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("displayed_attributes.total")]),e._v(" "),_("td",[e._v("Number of displayed attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("displayed_attributes.with_wildcard")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("*")]),e._v(" is specified as a displayed attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("h2",{attrs:{id:"stopwords-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#stopwords-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("StopWords Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("stop_words.total")]),e._v(" "),_("td",[e._v("Number of stop words.")]),e._v(" "),_("td",[_("code",[e._v("3")])])])])]),e._v(" "),_("h2",{attrs:{id:"separatortokens-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#separatortokens-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("SeparatorTokens Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("separator_tokens.total")]),e._v(" "),_("td",[e._v("Number of separator tokens.")]),e._v(" "),_("td",[_("code",[e._v("3")])])])])]),e._v(" "),_("h2",{attrs:{id:"nonseparatortokens-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#nonseparatortokens-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("NonSeparatorTokens Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("non_separator_tokens.total")]),e._v(" "),_("td",[e._v("Number of non separator tokens.")]),e._v(" "),_("td",[_("code",[e._v("3")])])])])]),e._v(" "),_("h2",{attrs:{id:"dictionary-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#dictionary-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Dictionary Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("dictionary.total")]),e._v(" "),_("td",[e._v("Number of words in the dictionary.")]),e._v(" "),_("td",[_("code",[e._v("3")])])])])]),e._v(" "),_("h2",{attrs:{id:"synonyms-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#synonyms-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Synonyms Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("synonyms.total")]),e._v(" "),_("td",[e._v("Number of synonyms.")]),e._v(" "),_("td",[_("code",[e._v("3")])])])])]),e._v(" "),_("h2",{attrs:{id:"dump-created"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#dump-created"}},[e._v("#")]),e._v(" "),_("code",[e._v("Dump Created")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])])])]),e._v(" "),_("h2",{attrs:{id:"snapshot-created"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#snapshot-created"}},[e._v("#")]),e._v(" "),_("code",[e._v("Snapshot Created")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])])])]),e._v(" "),_("h2",{attrs:{id:"tasks-seen"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#tasks-seen"}},[e._v("#")]),e._v(" "),_("code",[e._v("Tasks Seen")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Tasks Seen event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The total number of received requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])]),e._v(" "),_("tr",[_("td",[e._v("per_task_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if an uid is used to fetch a particular task resource, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("uids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_index_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("indexUids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_type")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("types")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_status")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("statuses")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_canceled_by")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("canceledBy")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_enqueued_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_enqueued_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_started_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_started_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_finished_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_finished_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])])])]),e._v(" "),_("h2",{attrs:{id:"tasks-canceled"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#tasks-canceled"}},[e._v("#")]),e._v(" "),_("code",[e._v("Tasks Canceled")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("uids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_index_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("indexUids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_type")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("types")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_status")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("statuses")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_canceled_by")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("canceledBy")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_enqueued_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_enqueued_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_started_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_started_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_finished_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_finished_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])])])]),e._v(" "),_("h2",{attrs:{id:"tasks-deleted"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#tasks-deleted"}},[e._v("#")]),e._v(" "),_("code",[e._v("Tasks Deleted")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("uids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_index_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("indexUids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_type")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("types")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_status")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("statuses")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_canceled_by")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("canceledBy")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_enqueued_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_enqueued_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_started_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_started_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_finished_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_finished_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])])])]),e._v(" "),_("h2",{attrs:{id:"stats-seen"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#stats-seen"}},[e._v("#")]),e._v(" "),_("code",[e._v("Stats Seen")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("per_index_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if an uid is used to fetch an index stat resource, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])])])]),e._v(" "),_("h2",{attrs:{id:"health-seen"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#health-seen"}},[e._v("#")]),e._v(" "),_("code",[e._v("Health Seen")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Health Seen event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The total number of received requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])])])]),e._v(" "),_("h2",{attrs:{id:"version-seen"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#version-seen"}},[e._v("#")]),e._v(" "),_("code",[e._v("Version Seen")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])])])]),e._v(" "),_("h2",{attrs:{id:"experimental-features-seen"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#experimental-features-seen"}},[e._v("#")]),e._v(" "),_("code",[e._v("Experimental features Seen")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])])])]),e._v(" "),_("h2",{attrs:{id:"experimental-features-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#experimental-features-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Experimental features Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("vector_store")]),e._v(" "),_("td",[e._v("Whether the "),_("RouterLink",{attrs:{to:"/specifications/text/0193-experimental-features.html#vector-store"}},[e._v("vector store")]),e._v(" feature is enabled.")],1),e._v(" "),_("td",[_("code",[e._v("true")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"user-interface"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#user-interface"}},[e._v("#")]),e._v(" User-interface")]),e._v(" "),_("p",[e._v("Analytics are enabled by default while leaving the option for users to disable it with the "),_("code",[e._v("--no-analytics")]),e._v(" option.")]),e._v(" "),_("p",[_("strong",[e._v("Message displayed on the CLI at launch if analytics are enabled")])]),e._v(" "),_("blockquote",[_("p",[e._v("Thank you for using MeiliSearch!")]),e._v(" "),_("p",[e._v("We collect anonymized analytics to improve our product and your experience. To learn more, including how to turn off analytics, visit our dedicated documentation page: https://docs.meilisearch.com/learn/what_is_meilisearch/telemetry.html.")]),e._v(" "),_("p",[e._v('Anonymous telemetry:\t"Enabled"')]),e._v(" "),_("p",[e._v('Instance UID: ":uidGeneratedAtFirstLaunch"')])]),e._v(" "),_("p",[_("strong",[e._v("Message displayed on the CLI at launch if analytics are disabled after being activated")])]),e._v(" "),_("p",[e._v("The unique identifier of the instance remains displayed even if analytics are disabled so that it does not reactivate the analytics to obtain it after having stopped it. The user can still ask us to remove the data previously collected by giving us his "),_("code",[e._v("Instance UID")]),e._v(".")]),e._v(" "),_("blockquote",[_("p",[e._v("Thank you for using MeiliSearch!")]),e._v(" "),_("p",[e._v('Anonymous telemetry:\t"Disabled"')]),e._v(" "),_("p",[e._v('Instance UID: ":uidGeneratedAtFirstLaunch"')])]),e._v(" "),_("p",[_("strong",[e._v("Message displayed on the CLI at launch if analytics are disabled at first launch")])]),e._v(" "),_("blockquote",[_("p",[e._v("Thank you for using MeiliSearch!")]),e._v(" "),_("p",[e._v('Anonymous telemetry:\t"Disabled"')])]),e._v(" "),_("h2",{attrs:{id:"_2-technical-aspects"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-aspects"}},[e._v("#")]),e._v(" 2. Technical Aspects")]),e._v(" "),_("h3",{attrs:{id:"i-technical-details"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#i-technical-details"}},[e._v("#")]),e._v(" I. Technical Details")]),e._v(" "),_("h4",{attrs:{id:"user-agent-case"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#user-agent-case"}},[e._v("#")]),e._v(" User-Agent case")]),e._v(" "),_("p",[e._v("The "),_("code",[e._v("User-Agent")]),e._v(" header is tracked on the events listed below. Our official SDKs/integrations should always contain "),_("code",[e._v("MeiliSearch")]),e._v(" in their names.")]),e._v(" "),_("p",[e._v("Each endpoint API tracked sends the "),_("code",[e._v("User-Agent")]),e._v(" as a "),_("code",[e._v("user_agent")]),e._v(" event property as an array. If several values are contained in the "),_("code",[e._v("User-Agent")]),e._v(" header, they are split by the "),_("code",[e._v(";")]),e._v(" character.")]),e._v(" "),_("h5",{attrs:{id:"x-meilisearch-client-header"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#x-meilisearch-client-header"}},[e._v("#")]),e._v(" "),_("code",[e._v("X-Meilisearch-Client")]),e._v(" Header")]),e._v(" "),_("p",[e._v("Some browser engines prevent overloading the User-Agent header. To track the calls made by some clients concerned by this fact, e.g. the JavaScript SDK, it is possible to use the "),_("code",[e._v("X-Meilisearch-Client")]),e._v(" custom header.")]),e._v(" "),_("p",[e._v("If the "),_("code",[e._v("X-Meilisearch-Client")]),e._v(" is encountered, it overrides the presence of the "),_("code",[e._v("User-Agent")]),e._v(" header.")]),e._v(" "),_("h4",{attrs:{id:"telemetry-endpoint"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#telemetry-endpoint"}},[e._v("#")]),e._v(" Telemetry Endpoint")]),e._v(" "),_("p",[e._v("Telemetric data are sent to the domain "),_("code",[e._v("telemetry.meilisearch.com")]),e._v(" which then redirects it to Segment.")]),e._v(" "),_("p",[e._v("This transit domain allows us to change the telemetry collection solution in the future without impacting older versions of Meilisearch.")]),e._v(" "),_("h5",{attrs:{id:"identifying-meilisearch-installation"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#identifying-meilisearch-installation"}},[e._v("#")]),e._v(" Identifying MeiliSearch installation")]),e._v(" "),_("p",[e._v("To identify instances, we generate a unique identifier at first launch if analytics are not disabled.")]),e._v(" "),_("ul",[_("li",[e._v("This unique identifier is inserted in the data.ms folder to be kept in case of version upgrades.")]),e._v(" "),_("li",[e._v("A file named following the given pattern "),_("code",[e._v(":MeiliSearchData.msPath-:instanceUid")]),e._v(" is generated in a "),_("code",[e._v("MeiliSearch")]),e._v(" folder to recover an identifier in case of corruption of the data.ms folder, causing it to be deleted and recreated. This "),_("code",[e._v("MeiliSearch")]),e._v(" folder is created in the "),_("code",[e._v("config_dir")]),e._v(" of each platform.")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Directory")]),e._v(" "),_("th",[e._v("Windows")]),e._v(" "),_("th",[e._v("Linux/*BSD")]),e._v(" "),_("th",[e._v("macOS")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("config_dir")]),e._v(" "),_("td",[e._v("%APPDATA% (C:\\Users%USERNAME%\\AppData\\Roaming)")]),e._v(" "),_("td",[e._v("$XDG_CONFIG_HOME (~/.config)")]),e._v(" "),_("td",[e._v("~/Library/Application Support")])])])]),e._v(" "),_("h5",{attrs:{id:"segment-identify-call"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#segment-identify-call"}},[e._v("#")]),e._v(" Segment Identify Call")]),e._v(" "),_("p",[e._v("The "),_("code",[e._v("identify")]),e._v(" method of Segment permits identifying an instance by sending a unique identifier. It groups the information of a MeiliSearch binary such as "),_("code",[e._v("system")]),e._v(", "),_("code",[e._v("stats")]),e._v(", and general properties related below in this specification.")]),e._v(" "),_("p",[e._v("The segment identify call is only sent after the first hour if the instance is still running. At the first launch, MeiliSearch sends a "),_("code",[e._v("Launched")]),e._v(" event on an instance ID equal to "),_("code",[e._v("total_launch")]),e._v(" in order to avoid tracking instances usage for nothing when they could be shut down and never restarted.")]),e._v(" "),_("h5",{attrs:{id:"segment-track-call"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#segment-track-call"}},[e._v("#")]),e._v(" Segment Track Call")]),e._v(" "),_("p",[e._v("The "),_("code",[e._v("track")]),e._v(" calls of Segment allow tracking the events passed on the instance.")]),e._v(" "),_("h5",{attrs:{id:"batching"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#batching"}},[e._v("#")]),e._v(" Batching")]),e._v(" "),_("p",[e._v("A batch is sent every hour or when it reaches the maximum size of "),_("code",[e._v("500Kb")]),e._v(" to avoid sending analytics in real-time and preserve network exchanges.")]),e._v(" "),_("p",[e._v("This batch contains an identify payload and all tracked events that occurred during this hour.")]),e._v(" "),_("h5",{attrs:{id:"logging"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#logging"}},[e._v("#")]),e._v(" Logging")]),e._v(" "),_("p",[e._v("Errors occurring when sending metrics to Segment should be silent. In general, the impact of data collection should be minimized as much as possible concerning performance and be entirely transparent for the user during its use.")]),e._v(" "),_("h4",{attrs:{id:"debug-build"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#debug-build"}},[e._v("#")]),e._v(" Debug build")]),e._v(" "),_("p",[e._v("In debug build, no analytics are collected.")]),e._v(" "),_("h2",{attrs:{id:"_3-future-possibilities"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[e._v("#")]),e._v(" 3. Future possibilities")]),e._v(" "),_("p",[e._v("n/a")])])}),[],!1,null,null,null);t.default=d.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{443:function(e,t,_){"use strict";_.r(t);var v=_(62),d=Object(v.a)({},(function(){var e=this,t=e.$createElement,_=e._self._c||t;return _("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[_("h1",{attrs:{id:"anonymous-analytics-policy"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#anonymous-analytics-policy"}},[e._v("#")]),e._v(" Anonymous Analytics Policy")]),e._v(" "),_("h2",{attrs:{id:"_1-functional-specification"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#_1-functional-specification"}},[e._v("#")]),e._v(" 1. Functional Specification")]),e._v(" "),_("h3",{attrs:{id:"i-summary"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#i-summary"}},[e._v("#")]),e._v(" I. Summary")]),e._v(" "),_("p",[e._v("This specification describes an exhaustive list of anonymous metrics collected by the MeiliSearch binary. It also describes the tools we use for this collection and how we identify a Meilisearch instance.")]),e._v(" "),_("h3",{attrs:{id:"ii-motivation"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#ii-motivation"}},[e._v("#")]),e._v(" II. Motivation")]),e._v(" "),_("p",[e._v("At MeiliSearch, our vision is to provide an easy-to-use search solution that meets the essential needs of our users. At all times, we strive to understand our users better and meet their expectations in the best possible way.")]),e._v(" "),_("p",[e._v("Although we can gather needs and understand our users through several channels such as Github, Slack, surveys, interviews or roadmap votes, we realize that this is not enough to have a complete view of MeiliSearch usage and features adoption. By cross-referencing our product discovery phases with aggregated quantitative data, we want to make the product much better than what it is today. Our decision-making will be taken a step further to make a product that users love.")]),e._v(" "),_("h3",{attrs:{id:"iii-explanation"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#iii-explanation"}},[e._v("#")]),e._v(" III. Explanation")]),e._v(" "),_("h4",{attrs:{id:"general-data-protection-regulation-gdpr"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#general-data-protection-regulation-gdpr"}},[e._v("#")]),e._v(" General Data Protection Regulation (GDPR)")]),e._v(" "),_("p",[e._v("The metrics collected are non-sensitive, non-personal and do not identify an individual or a group of individuals using MeiliSearch. The data collected is secured and anonymized. We do not collect any data from the values stored in the documents.")]),e._v(" "),_("p",[e._v("We, the MeiliSearch team, provide an email address so that users can request the removal of their data: privacy@meilisearch.com."),_("br"),e._v("\nThanks to the unique identifier generated for their MeiliSearch installation ("),_("code",[e._v("Instance UID")]),e._v(" when launching MeiliSearch), we can remove the corresponding data from all the tools we describe below. Any questions regarding the management of the data collected can be sent to the email address as well.")]),e._v(" "),_("h4",{attrs:{id:"tools"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#tools"}},[e._v("#")]),e._v(" Tools")]),e._v(" "),_("h5",{attrs:{id:"segment"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#segment"}},[e._v("#")]),e._v(" Segment")]),e._v(" "),_("p",[e._v("The collected data is sent to "),_("a",{attrs:{href:"https://segment.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Segment"),_("OutboundLink")],1),e._v(". Segment is a platform for data collection and provides data management tools.")]),e._v(" "),_("h5",{attrs:{id:"amplitude"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#amplitude"}},[e._v("#")]),e._v(" Amplitude")]),e._v(" "),_("p",[_("a",{attrs:{href:"https://amplitude.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Amplitude"),_("OutboundLink")],1),e._v(" is a tool for graphing and highlighting collected data. Segment feeds Amplitude so that we can build visualizations according to our needs.")]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"events-table"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#events-table"}},[e._v("#")]),e._v(" Events table")]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Event name")]),e._v(" "),_("th",[e._v("Description")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("Launched")]),e._v(" "),_("td",[e._v("Occurs when MeiliSearch is launched the first time.")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Searched POST")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("indexes/:indexUid/search")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Searched GET")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("GET")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/search")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Facet Searched POST")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/facet-search")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Searched by Multi-Search POST")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("POST")]),e._v("- "),_("code",[e._v("/multi-search")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Added")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Updated")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("PUT")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Fetched GET")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("GET")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents")]),e._v(" or "),_("code",[e._v("GET")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents/:doc_id")]),e._v(" routes during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Fetched POST")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents/fetch")]),e._v(" routes during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Deleted")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("DELETE")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents")]),e._v(", "),_("code",[e._v("DELETE")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents/:documentId")]),e._v(", "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("indexes/:indexUid/documents/delete-batch")]),e._v(", and "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("indexes/:indexUid/documents/delete")]),e._v(" routes during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Index Created")]),e._v(" "),_("td",[e._v("Occurs when an index is created via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Index Updated")]),e._v(" "),_("td",[e._v("Occurs when an index is updated via "),_("code",[e._v("PUT")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Indexes Swapped")]),e._v(" "),_("td",[e._v("Occurs when indexes are swapped via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/swap-indexes")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Settings Updated")]),e._v(" "),_("td",[e._v("Occurs when the settings are updated via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/settings")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("SearchableAttributes Updated")]),e._v(" "),_("td",[e._v("Occurs when searchable attributes are updated via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/settings/searchable-attributes")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("RankingRules Updated")]),e._v(" "),_("td",[e._v("Occurs when ranking rules are updated via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/settings/ranking-rules")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("FilterableAttributes Updated")]),e._v(" "),_("td",[e._v("Occurs when filterable attributes are updated via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/settings/filterable-attributes")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("SortableAttributes Updated")]),e._v(" "),_("td",[e._v("Occurs when sortable attributes are updated via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/settings/sortable-attributes")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("TypoTolerance Updated")]),e._v(" "),_("td",[e._v("Occurs when typo tolerance settings are updated via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/settings/typo-tolerance")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Pagination Updated")]),e._v(" "),_("td",[e._v("Occurs when pagination settings are updated via "),_("code",[e._v("PATCH")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/pagination")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Faceting Updated")]),e._v(" "),_("td",[e._v("Occurs when faceting settings are updated via "),_("code",[e._v("PATCH")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/faceting")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("DistinctAttribute Updated")]),e._v(" "),_("td",[e._v("Occurs when distinct attribute setting is updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/distinct-attribute")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("ProximityPrecision Updated")]),e._v(" "),_("td",[e._v("Occurs when proximity precision setting is updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/proximity-precision")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("DisplayedAttributes Updated")]),e._v(" "),_("td",[e._v("Occurs when displayed attributes are updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/displayed-attributes")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("StopWords Updated")]),e._v(" "),_("td",[e._v("Occurs when stop words are updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/stop-words")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("SeparatorTokens Updated")]),e._v(" "),_("td",[e._v("Occurs when separator tokens are updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/separator-tokens")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("NonSeparatorTokens Updated")]),e._v(" "),_("td",[e._v("Occurs when non separator tokens are updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/non-separator-tokens")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Synonyms Updated")]),e._v(" "),_("td",[e._v("Occurs when synonyms are updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/synonyms")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Dump Created")]),e._v(" "),_("td",[e._v("Occurs when a dump is created via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/dumps")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Snapshot Created")]),e._v(" "),_("td",[e._v("Occurs when a snapshot is created via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/snapshots")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Tasks Canceled")]),e._v(" "),_("td",[e._v("Occurs when tasks are requested to be canceled via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/tasks/cancel")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Tasks Deleted")]),e._v(" "),_("td",[e._v("Occurs when tasks are requested to be deleted via "),_("code",[e._v("DELETE")]),e._v("- "),_("code",[e._v("/tasks")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Tasks Seen")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("GET")]),e._v(" - "),_("code",[e._v("/tasks")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Stats Seen")]),e._v(" "),_("td",[e._v("Occurs when stats are fetched via "),_("code",[e._v("GET")]),e._v(" - "),_("code",[e._v("/stats")]),e._v(" or "),_("code",[e._v("/indexes/:indexUid/stats")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Health Seen")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("GET - /health")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Version Seen")]),e._v(" "),_("td",[e._v("Occurs when "),_("code",[e._v("GET - /version")]),e._v(" is fetched.")])]),e._v(" "),_("tr",[_("td",[e._v("Experimental features Seen")]),e._v(" "),_("td",[e._v("Occurs when "),_("code",[e._v("GET - /experimental-features")]),e._v(" is fetched.")])]),e._v(" "),_("tr",[_("td",[e._v("Experimental features Updated")]),e._v(" "),_("td",[e._v("Occurs when experimental features are updated via "),_("code",[e._v("PATCH - /experimental-features")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"summarized-metrics-events-table"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#summarized-metrics-events-table"}},[e._v("#")]),e._v(" Summarized Metrics/Events table")]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Metric name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")]),e._v(" "),_("th",[e._v("Triggered by")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[_("code",[e._v("context.app.version")])]),e._v(" "),_("td",[e._v("MeiliSearch version number")]),e._v(" "),_("td",[e._v("0.23.0")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.env")])]),e._v(" "),_("td",[e._v("MeiliSearch env")]),e._v(" "),_("td",[e._v("production")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.db_path")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--db-path")]),e._v("/"),_("code",[e._v("MEILI_DB_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.import_dump")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--import-dump")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.dump_dir")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--dump-dir")]),e._v("/"),_("code",[e._v("MEILI_DUMP_DIR")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ignore_missing_dump")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore-missing-dump")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ignore_dump_if_db_exists")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore-dump-if-db-exists")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.import_snapshot")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--import-snapshot")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.schedule_snapshot")])]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--schedule_snapshot")]),e._v("/"),_("code",[e._v("MEILI_SCHEDULE_SNAPSHOT")]),e._v(" if scheduled snapshots are enabled, otherwise "),_("code",[e._v("None")])]),e._v(" "),_("td",[e._v("86400")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.snapshot_dir")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--snapshot-dir")]),e._v("/"),_("code",[e._v("MEILI_SNAPSHOT_DIR")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ignore_missing_snapshot")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore_missing_snapshot")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ignore_snapshot_if_db_exists")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore_snapshot_if_db_exists")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.http_addr")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--http-addr")]),e._v("/"),_("code",[e._v("MEILI_HTTP_ADDR")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.http_payload_size_limit")])]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--http-payload-size-limit")]),e._v("/"),_("code",[e._v("MEILI_HTTP_PAYLOAD_SIZE_LIMIT")]),e._v(" in bytes")]),e._v(" "),_("td",[e._v("336042103")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.log_level")])]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--log-level")]),e._v("/"),_("code",[e._v("MEILI_LOG_LEVEL")])]),e._v(" "),_("td",[e._v("debug")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.max_indexing_memory")])]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--max-indexing-memory")]),e._v("/"),_("code",[e._v("MEILI_MAX_INDEXING_MEMORY")]),e._v(" in bytes")]),e._v(" "),_("td",[e._v("336042103")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.max_indexing_threads")])]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--max-indexing-threads")]),e._v("/"),_("code",[e._v("MEILI_MAX_INDEXING_THREADS")]),e._v(" in integer")]),e._v(" "),_("td",[e._v("4")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_auth_path")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-auth-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_AUTH_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_cert_path")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-cert-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_CERT_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_key_path")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-key-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_KEY_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_ocsp_path")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-ocsp-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_OCSP_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_require_auth")])]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--ssl-require-auth")]),e._v("/"),_("code",[e._v("MEILI_SSL_REQUIRE_AUTH")]),e._v(" as a boolean")]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_resumption")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-resumption")]),e._v("/"),_("code",[e._v("MEILI_SSL_RESUMPTION")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_tickets")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-tickets")]),e._v("/"),_("code",[e._v("MEILI_SSL_TICKETS")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.with_configuration_file")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the instance is launched with a configuration file, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.task_queue_webhook")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the instance is launched with a task queue webhook, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.experimental_enable_metrics")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-enable-metrics")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_ENABLE_METRICS")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.experimental_replication_parameters")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-replication-parameters")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_REPLICATION_PARAMETERS")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.experimental_logs_mode")])]),e._v(" "),_("td",[_("code",[e._v("human")]),e._v(" or "),_("code",[e._v("json")]),e._v(" depending on the value specified.")]),e._v(" "),_("td",[_("code",[e._v("human")])]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.experimental_enable_logs_route")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-enable-logs-route")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_ENABLE_LOGS_ROUTE")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.experimental_reduce_indexing_memory_usage")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-reduce-indexing-memory-usage")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_REDUCE_INDEXING_MEMORY_USAGE")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.gpu_enabled")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if Meilisearch was compiled with CUDA support, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("system.distribution")])]),e._v(" "),_("td",[e._v("Distribution on which MeiliSearch is launched")]),e._v(" "),_("td",[e._v("Arch Linux")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("system.kernel_version")])]),e._v(" "),_("td",[e._v("Kernel version on which MeiliSearch is launched")]),e._v(" "),_("td",[e._v("5.14.10")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("system.cores")])]),e._v(" "),_("td",[e._v("Number of cores")]),e._v(" "),_("td",[e._v("24")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("system.ram_size")])]),e._v(" "),_("td",[e._v("Total RAM capacity. Expressed in "),_("code",[e._v("KB")])]),e._v(" "),_("td",[e._v("16777216")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("system.disk_size")])]),e._v(" "),_("td",[e._v("Total capacity of the largest disk. Expressed in "),_("code",[e._v("Bytes")])]),e._v(" "),_("td",[e._v("1048576000")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("system.server_prodiver")])]),e._v(" "),_("td",[e._v("Users can tell us on which provider MeiliSearch is hosted by filling the "),_("code",[e._v("MEILI_SERVER_PROVIDER")]),e._v(" env var. This is also filled by our cloud deploy scripts, e.g. "),_("a",{attrs:{href:"https://github.com/meilisearch/cloud-scripts/blob/56a7c2630c1a508e5ad0c0ba1d8cfeb8d2fa9ae0/scripts/providers/gcp/cloud-config.yaml#L33",target:"_blank",rel:"noopener noreferrer"}},[e._v("GCP cloud-config.yaml"),_("OutboundLink")],1)]),e._v(" "),_("td",[e._v("gcp")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("stats.database_size")])]),e._v(" "),_("td",[e._v("Database size. Expressed in "),_("code",[e._v("Bytes")])]),e._v(" "),_("td",[e._v("2621440")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("stats.indexes_number")])]),e._v(" "),_("td",[e._v("Number of indexes")]),e._v(" "),_("td",[e._v("2")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("start_since_days")])]),e._v(" "),_("td",[e._v("Number of days since instance was launched")]),e._v(" "),_("td",[e._v("365")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("user_agent")])]),e._v(" "),_("td",[e._v("User-agent header encountered during one or more API calls")]),e._v(" "),_("td",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Index Created")]),e._v(", "),_("code",[e._v("Index Updated")]),e._v(", "),_("code",[e._v("Documents Added")]),e._v(", "),_("code",[e._v("Documents Updated")]),e._v(", "),_("code",[e._v("Documents Deleted")]),e._v(", "),_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")]),e._v(", "),_("code",[e._v("SortableAttributes Updated")]),e._v(", "),_("code",[e._v("FilterableAttributes Updated")]),e._v(", "),_("code",[e._v("SearchableAttributes Updated")]),e._v(", "),_("code",[e._v("TypoTolerance Updated")]),e._v(", "),_("code",[e._v("Pagination Updated")]),e._v(", "),_("code",[e._v("Faceting Updated")]),e._v(", "),_("code",[e._v("DistinctAttribute Updated")]),e._v(", "),_("code",[e._v("DisplayedAttributes Updated")]),e._v(", "),_("code",[e._v("StopWords Updated")]),e._v(", "),_("code",[e._v("Synonyms Updated")]),e._v(", "),_("code",[e._v("Dump Created")]),e._v(", "),_("code",[e._v("Snapshot Created")]),e._v(", "),_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Stats Seen")]),e._v(", "),_("code",[e._v("Health Seen")]),e._v(", "),_("code",[e._v("Version Seen")]),e._v(", "),_("code",[e._v("Documents Searched by Multi-Search POST")]),e._v(", "),_("code",[e._v("Experimental features Seen")]),e._v(", "),_("code",[e._v("Experimental features Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("requests.99th_response_time")])]),e._v(" "),_("td",[e._v("Highest latency from among the fastest 99% of successful search requests")]),e._v(" "),_("td",[e._v("57ms")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("requests.total_succeeded")])]),e._v(" "),_("td",[e._v("Total number of successful requests in this batch")]),e._v(" "),_("td",[e._v("3456")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("requests.total_failed")])]),e._v(" "),_("td",[e._v("Total number of failed requests in this batch")]),e._v(" "),_("td",[e._v("24")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("requests.total_received")])]),e._v(" "),_("td",[e._v("Total number of received requests in this batch")]),e._v(" "),_("td",[e._v("3480")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Deleted")]),e._v(", "),_("code",[e._v("Documents Fetched GET")]),e._v(", "),_("code",[e._v("Documents Fetched POST")]),e._v(", "),_("code",[e._v("Health Seen")]),e._v(", "),_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("sort.with_geoPoint")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the sort rule "),_("code",[e._v("_geoPoint")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("sort.avg_criteria_number")])]),e._v(" "),_("td",[e._v("Average number of sort criteria among all requests containing the "),_("code",[e._v("sort")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("2")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filter.with_geoRadius")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the filter rule "),_("code",[e._v("_geoRadius")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filter.with_geoBoundingBox")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the filter rule "),_("code",[e._v("_geoBoundingBox")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filter.most_used_syntax")])]),e._v(" "),_("td",[e._v("Most used filter syntax among all requests containing the "),_("code",[e._v("filter")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("string")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("attributes_to_search_on.total_number_of_uses")])]),e._v(" "),_("td",[e._v("Total number of queries where "),_("code",[e._v("attributesToSearchOn")]),e._v(" is set")]),e._v(" "),_("td",[e._v("5")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("q.max_terms_number")])]),e._v(" "),_("td",[e._v("Highest number of terms given for the "),_("code",[e._v("q")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("5")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("vector.max_vector_size")])]),e._v(" "),_("td",[e._v("Highest number of dimensions given for the "),_("code",[e._v("vector")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("1536")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_limit")])]),e._v(" "),_("td",[e._v("Highest value given for the "),_("code",[e._v("limit")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("60")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Fetched GET")]),e._v(", "),_("code",[e._v("Documents Fetched POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_offset")])]),e._v(" "),_("td",[e._v("Highest value given for the "),_("code",[e._v("offset")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("1000")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Fetched GET")]),e._v(", "),_("code",[e._v("Documents Fetched POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.most_used_navigation")])]),e._v(" "),_("td",[e._v("Most used search results navigation among all search requests in this batch. "),_("code",[e._v("estimated")]),e._v(" / "),_("code",[e._v("exhaustive")])]),e._v(" "),_("td",[_("code",[e._v("estimated")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.max_attributes_to_retrieve")])]),e._v(" "),_("td",[e._v("The maximum number of attributes to retrieve encountered among all requests in this batch.")]),e._v(" "),_("td",[e._v("100")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.max_attributes_to_highlight")])]),e._v(" "),_("td",[e._v("The maximum number of attributes to highlight encountered among all requests in this batch.")]),e._v(" "),_("td",[e._v("100")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.highlight_pre_tag")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("highlightPreTag")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.highlight_post_tag")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("highlightPostTag")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.max_attributes_to_crop")])]),e._v(" "),_("td",[e._v("The maximum number of attributes to crop encountered among all requests in this batch.")]),e._v(" "),_("td",[e._v("100")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.crop_length")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("cropLength")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.crop_marker")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("cropMarker")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.show_matches_position")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("showMatchesPosition")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("facets.avg_facets_number")])]),e._v(" "),_("td",[e._v("The average number of facets among all the requests containing the "),_("code",[e._v("facets")]),e._v(" parameter in this batch. "),_("code",[e._v('"facets": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("facets")]),e._v(" does not influence the average in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("10")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("primary_key")])]),e._v(" "),_("td",[e._v("Value given for the "),_("code",[e._v("primaryKey")]),e._v(" parameter if used, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[e._v("id")]),e._v(" "),_("td",[_("code",[e._v("Index Created")]),e._v(", "),_("code",[e._v("Index Updated")]),e._v(", "),_("code",[e._v("Documents Added")]),e._v(", "),_("code",[e._v("Documents Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("payload_type")])]),e._v(" "),_("td",[e._v("All "),_("code",[e._v("payload_type")]),e._v(" encountered in this batch")]),e._v(" "),_("td",[e._v('["application/json", "text/plain", "application/x-ndjson"]')]),e._v(" "),_("td",[_("code",[e._v("Documents Added")]),e._v(", "),_("code",[e._v("Documents Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("index_creation")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if a document addition or update request triggered index creation in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[_("code",[e._v("Documents Added")]),e._v(", "),_("code",[e._v("Documents Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.words_position")])]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("words")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("1")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.typo_position")])]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("typo")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("2")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.proximity_position")])]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("proximity")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.attribute_position")])]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("attribute")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("4")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.sort_position")])]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("sort")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("5")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.exactness_position")])]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("exactness")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("6")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.values")])]),e._v(" "),_("td",[e._v("A string representing the ranking rules without the custom asc-desc rules.")]),e._v(" "),_("td",[_("code",[e._v('"words, typo, attribute, sort, exactness"')])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("sortable_attributes.total")])]),e._v(" "),_("td",[e._v("Number of sortable attributes")]),e._v(" "),_("td",[e._v("3")]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("SortableAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("sortable_attributes.has_geo")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("_geo")]),e._v(" is set as a sortable attribute, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("SortableAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filterable_attributes.total")])]),e._v(" "),_("td",[e._v("Number of filterable attributes")]),e._v(" "),_("td",[e._v("3")]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("FilterableAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filterable_attributes.has_geo")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("_geo")]),e._v(" is set as a filterable attribute, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("FilterableAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("searchable_attributes.total")])]),e._v(" "),_("td",[e._v("Number of searchable attributes")]),e._v(" "),_("td",[e._v("4")]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("SearchableAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("searchable_attributes.with_wildcard")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("*")]),e._v(" is specified as a searchable attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("SearchableAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("typo_tolerance.enabled")])]),e._v(" "),_("td",[e._v("Whether the typo tolerance is enabled")]),e._v(" "),_("td",[_("code",[e._v("true")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("TypoTolerance Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("typo_tolerance.disable_on_attributes")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if at least one value is defined")]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("TypoTolerance Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("typo_tolerance.disable_on_words")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if at least one value is defined")]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("TypoTolerance Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("typo_tolerance.min_word_size_for_typos.one_typo")])]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("minWordSizeForTypos.oneTypo")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("5")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("TypoTolerance Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("typo_tolerance.min_word_size_for_typos.two_typos")])]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("minWordSizeForTypos.twoTypos")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("9")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("TypoTolerance Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_total_hits")])]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("pagination.maxTotalHits")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("1000")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Pagination Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("faceting.max_values_per_facet")])]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("faceting.maxValuesPerFacet")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("100")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Faceting Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("faceting.sort_facet_values_by_star_count")])]),e._v(" "),_("td",[e._v("Whether the user set all fields to be sort by count")]),e._v(" "),_("td",[_("code",[e._v("true")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Faceting Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("faceting.sort_facet_values_by_total")])]),e._v(" "),_("td",[e._v("The number of different values that were set")]),e._v(" "),_("td",[_("code",[e._v("10")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Faceting Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("distinct_attribute.set")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if a field name is specified as a distrinct attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("DistinctAttribute Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("proximity_precision.set")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" the setting has been manually set, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("ProximityPrecision Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("proximity_precision.value")])]),e._v(" "),_("td",[_("code",[e._v("byWord")]),e._v(" or "),_("code",[e._v("byAttribute")]),e._v(" if the setting has been set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("ProximityPrecision Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("displayed_attributes.total")])]),e._v(" "),_("td",[e._v("Number of displayed attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("SettingUpdated")]),e._v(", "),_("code",[e._v("DisplayedAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("displayed_attributes.with_wildcard")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("*")]),e._v(" is specified as a displayed attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("SettingUpdated")]),e._v(", "),_("code",[e._v("DisplayedAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("stop_words.total")])]),e._v(" "),_("td",[e._v("Number of stop words.")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("StopWords Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("separator_tokens.total")])]),e._v(" "),_("td",[e._v("Number of separator tokens.")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("SeparatorTokens Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("non_separator_tokens.total")])]),e._v(" "),_("td",[e._v("Number of non separator tokens.")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("NonSeparatorTokens Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("dictionary.total")])]),e._v(" "),_("td",[e._v("Number of words in the dictionary.")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Dictionary Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("synonyms.total")])]),e._v(" "),_("td",[e._v("Number of synonyms.")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Synonyms Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_task_uid")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if an uid is used to fetch a particular task resource, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_uid")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("uids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_index_uid")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("indexUids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_type")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("types")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_status")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("statuses")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_canceled_by")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("canceledBy")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_before_enqueued_at")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_after_enqueued_at")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_before_started_at")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_after_started_at")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_before_finished_at")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_after_finished_at")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_index_uid")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if an uid is used to fetch an index stat resource, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Stats Seen")])])]),e._v(" "),_("tr",[_("td",[e._v("searches.avg_search_count")]),e._v(" "),_("td",[e._v("The average number of search queries received per call for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("4.2")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[e._v("searches.total_search_count")]),e._v(" "),_("td",[e._v("The total number of search queries received for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("16023")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[e._v("indexes.avg_distinct_index_count")]),e._v(" "),_("td",[e._v("The average number of queried indexes received per call for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("1.2")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[e._v("indexes.total_distinct_index_count")]),e._v(" "),_("td",[e._v("The total number of distinct indexes queries for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("6023")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[e._v("indexes.total_single_index")]),e._v(" "),_("td",[e._v("The total number of calls where only one index where queried.")]),e._v(" "),_("td",[_("code",[e._v("2007")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("swap_operation_number")])]),e._v(" "),_("td",[e._v("The number of swap operation given in "),_("code",[e._v("POST /swap-indexes")]),e._v(" API call")]),e._v(" "),_("td",[e._v("2")]),e._v(" "),_("td",[_("code",[e._v("Indexes Swapped")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("matching_strategy.most_used_strategy")])]),e._v(" "),_("td",[e._v("Most used word matching strategy among all search requests in this batch")]),e._v(" "),_("td",[_("code",[e._v("last")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_document_id")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("DELETE /indexes/:indexUid/documents/:documentUid")]),e._v(" endpoint was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_batch")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("POST /indexes/:indexUid/documents/delete-batch")]),e._v(" endpoint was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_filter")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("POST /indexes/:indexUid/documents/delete")]),e._v(" endpoint was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Fetched GET")]),e._v(", "),_("code",[e._v("Documents Fetched POST")]),e._v(", "),_("code",[e._v("Documents Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("clear_all")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("DELETE /indexes/:indexUid/documents")]),e._v(" endpoint was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Deleted")])])]),e._v(" "),_("tr",[_("td",[e._v("vector_store")]),e._v(" "),_("td",[e._v("Whether the "),_("RouterLink",{attrs:{to:"/specifications/text/0193-experimental-features.html#vector-store"}},[e._v("vector store")]),e._v(" feature is enabled.")],1),e._v(" "),_("td",[_("code",[e._v("true")])]),e._v(" "),_("td",[_("code",[e._v("Experimental features Updated")])])]),e._v(" "),_("tr",[_("td",[e._v("scoring.show_ranking_score")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showRankingScore")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(", otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[e._v("scoring.show_ranking_score_details")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showRankingScoreDetails")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(", otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("facets.total_distinct_facet_count")])]),e._v(" "),_("td",[e._v("The total number of distinct facets queried for the aggregated event")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Facet Searched POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("facets.additional_search_parameters_provided")])]),e._v(" "),_("td",[e._v("Were additional search parameters provided for the aggregated event")]),e._v(" "),_("td",[_("code",[e._v("true")])]),e._v(" "),_("td",[_("code",[e._v("Facet Searched POST")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"detailed-list-of-instance-metrics-and-events-with-their-metrics"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#detailed-list-of-instance-metrics-and-events-with-their-metrics"}},[e._v("#")]),e._v(" Detailed list of Instance metrics and, events with their metrics")]),e._v(" "),_("h5",{attrs:{id:"system-configuration-system"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#system-configuration-system"}},[e._v("#")]),e._v(" System Configuration "),_("code",[e._v("system")])]),e._v(" "),_("p",[e._v("This property allows us to gather essential information to better understand on which type of machine MeiliSearch is used. This allows us to better advise users on the machines to choose according to their data volume and their use-cases.")]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("system.distribution")]),e._v(" "),_("td",[e._v("Distribution on which MeiliSearch is launched")]),e._v(" "),_("td",[_("code",[e._v("Arch Linux")])])]),e._v(" "),_("tr",[_("td",[e._v("system.kernel_version")]),e._v(" "),_("td",[e._v("Kernel version on which MeiliSearch is launched")]),e._v(" "),_("td",[_("code",[e._v("5.14.10-arch1-1")])])]),e._v(" "),_("tr",[_("td",[e._v("system.cores")]),e._v(" "),_("td",[e._v("Number of cores")]),e._v(" "),_("td",[_("code",[e._v("24")])])]),e._v(" "),_("tr",[_("td",[e._v("system.ram_size")]),e._v(" "),_("td",[e._v("Total RAM capacity. Expressed in "),_("code",[e._v("KB")])]),e._v(" "),_("td",[_("code",[e._v("33604210")])])]),e._v(" "),_("tr",[_("td",[e._v("system.disk_size")]),e._v(" "),_("td",[e._v("Total capacity of the largest disk. Expressed in "),_("code",[e._v("Bytes")])]),e._v(" "),_("td",[_("code",[e._v("336042103")])])]),e._v(" "),_("tr",[_("td",[e._v("system.server_provider")]),e._v(" "),_("td",[e._v("Users can tell us on which provider MeiliSearch is hosted by filling the "),_("code",[e._v("MEILI_SERVER_PROVIDER")]),e._v(" env var. This is also filled by our providers deploy scripts. e.g. "),_("a",{attrs:{href:"https://github.com/meilisearch/cloud-scripts/blob/56a7c2630c1a508e5ad0c0ba1d8cfeb8d2fa9ae0/scripts/providers/gcp/cloud-config.yaml#L33",target:"_blank",rel:"noopener noreferrer"}},[e._v("GCP cloud-config.yaml"),_("OutboundLink")],1)]),e._v(" "),_("td",[_("code",[e._v("gcp")])])])])]),e._v(" "),_("h5",{attrs:{id:"meilisearch-configuration-context-and-infos"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#meilisearch-configuration-context-and-infos"}},[e._v("#")]),e._v(" MeiliSearch Configuration "),_("code",[e._v("context")]),e._v(" and "),_("code",[e._v("infos")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("context.app.version")]),e._v(" "),_("td",[e._v("MeiliSearch version number. Sent in a "),_("code",[e._v("context")]),e._v(" object instead of "),_("code",[e._v("properties")]),e._v(" to match Amplitude requirement")]),e._v(" "),_("td",[e._v("0.23.0")])]),e._v(" "),_("tr",[_("td",[e._v("infos.env")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--env")]),e._v("/"),_("code",[e._v("MEILI_ENV")])]),e._v(" "),_("td",[_("code",[e._v("production")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.db_path")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--db-path")]),e._v("/"),_("code",[e._v("MEILI_DB_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.import_dump")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--import-dump")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.dump_dir")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--dump-dir")]),e._v("/"),_("code",[e._v("MEILI_DUMP_DIR")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.ignore_missing_dump")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore-missing-dump")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.ignore_dump_if_db_exists")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore-dump-if-db-exists")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.import_snapshot")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--import-snapshot")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.schedule_snapshot")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--schedule_snapshot")]),e._v("/"),_("code",[e._v("MEILI_SCHEDULE_SNAPSHOT")]),e._v(" if scheduled snapshots are enabled, otherwise "),_("code",[e._v("None")])]),e._v(" "),_("td",[_("code",[e._v("86400")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.snapshot_dir")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--snapshot-dir")]),e._v("/"),_("code",[e._v("MEILI_SNAPSHOT_DIR")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.ignore_missing_snapshot")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore-missing-snapshot")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.ignore_snapshot_if_db_exists")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore-snapshot-if-db-exists")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.http_addr")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--http-addr")]),e._v("/"),_("code",[e._v("MEILI_HTTP_ADDR")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.http_payload_size_limit")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--http-payload-size-limit")]),e._v("/"),_("code",[e._v("MEILI_HTTP_PAYLOAD_SIZE_LIMIT")]),e._v(" in bytes")]),e._v(" "),_("td",[_("code",[e._v("336042103")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.log_level")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--log-level")]),e._v("/"),_("code",[e._v("MEILI_LOG_LEVEL")])]),e._v(" "),_("td",[_("code",[e._v("debug")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.max_indexing_memory")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--max-indexing-memory")]),e._v("/"),_("code",[e._v("MEILI_MAX_INDEXING_MEMORY")]),e._v(" in bytes")]),e._v(" "),_("td",[_("code",[e._v("336042103")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.max_indexing_threads")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--max-indexing-threads")]),e._v("/"),_("code",[e._v("MEILI_MAX_INDEXING_THREADS")]),e._v(" in integer")]),e._v(" "),_("td",[_("code",[e._v("4")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_auth_path")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-auth-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_AUTH_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_cert_path")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-cert-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_CERT_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_key_path")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-key-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_KEY_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_ocsp_path")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-ocsp-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_OCSP_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_require_auth")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--ssl-require-auth")]),e._v("/"),_("code",[e._v("MEILI_SSL_REQUIRE_AUTH")]),e._v(" as a boolean")]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_resumption")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-resumption")]),e._v("/"),_("code",[e._v("MEILI_SSL_RESUMPTION")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_tickets")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-tickets")]),e._v("/"),_("code",[e._v("MEILI_SSL_TICKETS")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.with_configuration_file")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the instance is launched with a configuration file, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.task_queue_webhook")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the instance is launched with a task queue webhook, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.experimental_enable_metrics")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-enable-metrics")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_ENABLE_METRICS")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.experimental_replication_parameters")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-replication-parameters")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_REPLICATION_PARAMETERS")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.experimental_logs_mode")]),e._v(" "),_("td",[_("code",[e._v("human")]),e._v(" or "),_("code",[e._v("json")]),e._v(" depending on the value specified.")]),e._v(" "),_("td",[_("code",[e._v("human")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.experimental_enable_logs_route")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-enable-logs-route")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_ENABLE_LOGS_ROUTE")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.experimental_reduce_indexing_memory_usage")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-reduce-indexing-memory-usage")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_REDUCE_INDEXING_MEMORY_USAGE")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.gpu_enabled")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if Meilisearch was compiled with CUDA support, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("h5",{attrs:{id:"meilisearch-statistics-stats"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#meilisearch-statistics-stats"}},[e._v("#")]),e._v(" MeiliSearch Statistics "),_("code",[e._v("stats")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("stats.database_size")]),e._v(" "),_("td",[e._v("Database size. Expressed in "),_("code",[e._v("Bytes")])]),e._v(" "),_("td",[_("code",[e._v("180230")])])]),e._v(" "),_("tr",[_("td",[e._v("stats.indexes_number")]),e._v(" "),_("td",[e._v("Number of indexes")]),e._v(" "),_("td",[_("code",[e._v("2")])])]),e._v(" "),_("tr",[_("td",[e._v("stats.documents_number")]),e._v(" "),_("td",[e._v("Number of indexed documents")]),e._v(" "),_("td",[_("code",[e._v("165847")])])]),e._v(" "),_("tr",[_("td",[e._v("start_since_days")]),e._v(" "),_("td",[e._v("Number of days since instance was launched")]),e._v(" "),_("td",[_("code",[e._v("328")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"launched"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#launched"}},[e._v("#")]),e._v(" "),_("code",[e._v("Launched")])]),e._v(" "),_("blockquote",[_("p",[e._v("This is the first event sent to mark that MeiliSearch is launched a first time.")])]),e._v(" "),_("h4",{attrs:{id:"documents-searched-post"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-searched-post"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Searched POST")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Searched event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(". The event's properties are averaged over all requests on "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/search")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.99th_response_time")]),e._v(" "),_("td",[e._v("The maximum latency, in "),_("code",[e._v("ms")]),e._v(", for the fastest 99% of succeeded requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("57ms")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_succeeded")]),e._v(" "),_("td",[e._v("The total number of succeeded search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3456")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_failed")]),e._v(" "),_("td",[e._v("The total number of failed search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("24")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The total number of received search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])]),e._v(" "),_("tr",[_("td",[e._v("sort.with_geoPoint")]),e._v(" "),_("td",[e._v("Does the built-in sort rule _geoPoint rule has been used in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("sort.avg_criteria_number")]),e._v(" "),_("td",[e._v("The average number of sort criteria among all the requests containing the "),_("code",[e._v("sort")]),e._v(" parameter in the aggregated event. "),_("code",[e._v('"sort": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("sort")]),e._v(" does not influence the average.")]),e._v(" "),_("td",[_("code",[e._v("2")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.with_geoRadius")]),e._v(" "),_("td",[e._v("Does the built-in filter rule _geoRadius has been used in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.with_geoBoundingBox")]),e._v(" "),_("td",[e._v("Does the built-in filter rule _geoBoundingBox has been used in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.avg_criteria_number")]),e._v(" "),_("td",[e._v("The average number of filter criteria among all the requests containing the "),_("code",[e._v("filter")]),e._v(" parameter in the aggregated event. "),_("code",[e._v('"filter": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("filter")]),e._v(" does not influence the average in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("4")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.most_used_syntax")]),e._v(" "),_("td",[e._v("The most used filter syntax among all the requests containing the requests containing the "),_("code",[e._v("filter")]),e._v(" parameter in the aggregated event. "),_("code",[e._v("string")]),e._v(" / "),_("code",[e._v("array")]),e._v(" / "),_("code",[e._v("mixed")])]),e._v(" "),_("td",[_("code",[e._v("mixed")])])]),e._v(" "),_("tr",[_("td",[e._v("attributes_to_search_on.total_number_of_uses")]),e._v(" "),_("td",[e._v("Total number of queries where "),_("code",[e._v("attributesToSearchOn")]),e._v(" is set")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("q.max_terms_number")]),e._v(" "),_("td",[e._v("The maximum number of terms for the "),_("code",[e._v("q")]),e._v(" parameter among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("vector.max_vector_size")]),e._v(" "),_("td",[e._v("The maximum number of dimensions for the "),_("code",[e._v("vector")]),e._v(" parameter among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("1536")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.max_limit")]),e._v(" "),_("td",[e._v("The maximum limit encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("20")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.max_offset")]),e._v(" "),_("td",[e._v("The maximum offset encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("1000")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.most_used_navigation")]),e._v(" "),_("td",[e._v("Most used search results navigation among all requests in the aggregated event. "),_("code",[e._v("estimated")]),e._v(" / "),_("code",[e._v("exhaustive")])]),e._v(" "),_("td",[_("code",[e._v("estimated")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.max_attributes_to_retrieve")]),e._v(" "),_("td",[e._v("The maximum number of attributes to retrieve encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.max_attributes_to_highlight")]),e._v(" "),_("td",[e._v("The maximum number of attributes to highlight encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.highlight_pre_tag")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("highlightPreTag")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.highlight_post_tag")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("highlightPostTag")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.max_attributes_to_crop")]),e._v(" "),_("td",[e._v("The maximum number of attributes to crop encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.crop_length")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("cropLength")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.crop_marker")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("cropMarker")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.show_matches_position")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showMatchesPosition")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("facets.avg_facets_number")]),e._v(" "),_("td",[e._v("The average number of facets among all the requests containing the "),_("code",[e._v("facets")]),e._v(" parameter in the aggregated event. "),_("code",[e._v('"facets": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("facets")]),e._v(" does not influence the average in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("10")])])]),e._v(" "),_("tr",[_("td",[e._v("matching_strategy.most_used_strategy")]),e._v(" "),_("td",[e._v("Most used word matching strategy among all search requests in the aggregated event. "),_("code",[e._v("last")]),e._v(" / "),_("code",[e._v("all")])]),e._v(" "),_("td",[_("code",[e._v("last")])])]),e._v(" "),_("tr",[_("td",[e._v("scoring.show_ranking_score")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showRankingScore")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(", otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("scoring.show_ranking_score_details")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showRankingScoreDetails")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(", otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"documents-searched-get"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-searched-get"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Searched GET")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Searched event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(". The event's properties are averaged over all requests on "),_("code",[e._v("GET")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/search")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.99th_response_time")]),e._v(" "),_("td",[e._v("Highest latency from among the fastest 99% of successful search requests.")]),e._v(" "),_("td",[_("code",[e._v("57ms")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_succeeded")]),e._v(" "),_("td",[e._v("The total number of succeeded search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3456")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_failed")]),e._v(" "),_("td",[e._v("The total number of failed search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("24")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The total number of received search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])]),e._v(" "),_("tr",[_("td",[e._v("sort.with_geoPoint")]),e._v(" "),_("td",[e._v("Does the built-in sort rule _geoPoint rule has been used in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("sort.avg_criteria_number")]),e._v(" "),_("td",[e._v("The average number of sort criteria among all the requests containing the "),_("code",[e._v("sort")]),e._v(" parameter in the aggregated event. "),_("code",[e._v('"sort": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("sort")]),e._v(" does not influence the average.")]),e._v(" "),_("td",[_("code",[e._v("2")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.with_geoRadius")]),e._v(" "),_("td",[e._v("Does the built-in filter rule _geoRadius has been used in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.with_geoBoundingBox")]),e._v(" "),_("td",[e._v("Does the built-in filter rule _geoBoundingBox has been used in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.avg_criteria_number")]),e._v(" "),_("td",[e._v("The average number of filter criteria among all the requests containing the "),_("code",[e._v("filter")]),e._v(" parameter in the aggregated event. "),_("code",[e._v('"filter": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("filter")]),e._v(" does not influence the average in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("4")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.most_used_syntax")]),e._v(" "),_("td",[e._v("The most used filter syntax among all the requests containing the requests containing the "),_("code",[e._v("filter")]),e._v(" parameter in the aggregated event. "),_("code",[e._v("string")]),e._v(" / "),_("code",[e._v("array")]),e._v(" / "),_("code",[e._v("mixed")])]),e._v(" "),_("td",[_("code",[e._v("mixed")])])]),e._v(" "),_("tr",[_("td",[e._v("attributes_to_search_on.total_number_of_uses")]),e._v(" "),_("td",[e._v("Total number of queries where "),_("code",[e._v("attributesToSearchOn")]),e._v(" is set")]),e._v(" "),_("td",[e._v("5")])]),e._v(" "),_("tr",[_("td",[e._v("q.max_terms_number")]),e._v(" "),_("td",[e._v("The maximum number of terms for the "),_("code",[e._v("q")]),e._v(" parameter among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.max_limit")]),e._v(" "),_("td",[e._v("The maximum limit encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("20")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.max_offset")]),e._v(" "),_("td",[e._v("The maximum offset encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("1000")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.most_used_navigation")]),e._v(" "),_("td",[e._v("Most used search results navigation among all requests in the aggregated event. "),_("code",[e._v("estimated")]),e._v(" / "),_("code",[e._v("exhaustive")])]),e._v(" "),_("td",[_("code",[e._v("estimated")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.max_attributes_to_retrieve")]),e._v(" "),_("td",[e._v("The maximum number of attributes to retrieve encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.max_attributes_to_highlight")]),e._v(" "),_("td",[e._v("The maximum number of attributes to highlight encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.highlight_pre_tag")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("highlightPreTag")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.highlight_post_tag")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("highlightPostTag")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.max_attributes_to_crop")]),e._v(" "),_("td",[e._v("The maximum number of attributes to crop encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.crop_length")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("cropLength")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.crop_marker")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("cropMarker")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.show_matches_position")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("showMatchesPosition")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("facets.avg_facets_number")]),e._v(" "),_("td",[e._v("The average number of facets among all the requests containing the "),_("code",[e._v("facets")]),e._v(" parameter in the aggregated event. "),_("code",[e._v('"facets": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("facets")]),e._v(" does not influence the average in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("10")])])]),e._v(" "),_("tr",[_("td",[e._v("matching_strategy.most_used_strategy")]),e._v(" "),_("td",[e._v("Most used word matching strategy among all search requests in the aggregated event. "),_("code",[e._v("last")]),e._v(" / "),_("code",[e._v("all")])]),e._v(" "),_("td",[_("code",[e._v("last")])])]),e._v(" "),_("tr",[_("td",[e._v("scoring.show_ranking_score")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showRankingScore")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(", otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("scoring.show_ranking_score_details")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showRankingScoreDetails")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(", otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"facet-searched-post"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#facet-searched-post"}},[e._v("#")]),e._v(" "),_("code",[e._v("Facet Searched POST")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Facet Searched event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(". The event's properties are averaged over all requests on "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/facet-search")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.99th_response_time")]),e._v(" "),_("td",[e._v("Highest latency from among the fastest 99% of successful search requests.")]),e._v(" "),_("td",[_("code",[e._v("57ms")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_succeeded")]),e._v(" "),_("td",[e._v("The total number of succeeded search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3456")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_failed")]),e._v(" "),_("td",[e._v("The total number of failed search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("24")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The total number of received search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])]),e._v(" "),_("tr",[_("td",[e._v("facets.total_distinct_facet_count")]),e._v(" "),_("td",[e._v("The total number of distinct facets queried for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("facets.additional_search_parameters_provided")]),e._v(" "),_("td",[e._v("Were additional search parameters provided for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("true")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"documents-searched-by-multi-search-post"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-searched-by-multi-search-post"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Searched by Multi-Search POST")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Searched event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(". The event's properties are averaged over all requests on "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/multi-search")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_succeeded")]),e._v(" "),_("td",[e._v("The number of succeeded calls on the endpoint for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3456")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_failed")]),e._v(" "),_("td",[e._v("The number of calls on the endpoint for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("24")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The number of calls on the endpoint for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])]),e._v(" "),_("tr",[_("td",[e._v("searches.avg_search_count")]),e._v(" "),_("td",[e._v("The average number of search queries received per call for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("4.2")])])]),e._v(" "),_("tr",[_("td",[e._v("searches.total_search_count")]),e._v(" "),_("td",[e._v("The total number of search queries received for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("16023")])])]),e._v(" "),_("tr",[_("td",[e._v("indexes.avg_distinct_index_count")]),e._v(" "),_("td",[e._v("The average number of queried indexes received per call for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("1.2")])])]),e._v(" "),_("tr",[_("td",[e._v("indexes.total_distinct_index_count")]),e._v(" "),_("td",[e._v("The total number of distinct indexes queries for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("6023")])])]),e._v(" "),_("tr",[_("td",[e._v("indexes.total_single_index")]),e._v(" "),_("td",[e._v("The total number of calls where only one index where queried.")]),e._v(" "),_("td",[_("code",[e._v("2007")])])])])]),e._v(" "),_("h2",{attrs:{id:"index-created"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#index-created"}},[e._v("#")]),e._v(" "),_("code",[e._v("Index Created")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered for this API call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("primary_key")]),e._v(" "),_("td",[e._v("The field's name used as a primary key if set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("id")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"index-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#index-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Index Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered for this API call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("primary_key")]),e._v(" "),_("td",[e._v("The field's name used as a primary key if set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("id")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"indexes-swapped"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#indexes-swapped"}},[e._v("#")]),e._v(" "),_("code",[e._v("Indexes Swapped")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered for this API call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("swap_operation_number")]),e._v(" "),_("td",[e._v("The number of swap operation given for this API call.")]),e._v(" "),_("td",[_("code",[e._v("2")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"documents-added"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-added"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Added")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Added event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(". The event's properties are averaged over all requests on "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("payload_type")]),e._v(" "),_("td",[e._v("Represents all the payload_type encountered on this endpoint in the aggregated event as a set. "),_("code",[e._v("application/json")]),e._v("/ "),_("code",[e._v("application/x-ndjson")]),e._v("/ "),_("code",[e._v("text/plain")]),e._v(" or any non-supported content-type.")]),e._v(" "),_("td",[e._v("["),_("code",[e._v("text/plain")]),e._v(", "),_("code",[e._v("application/json")]),e._v("]")])]),e._v(" "),_("tr",[_("td",[e._v("primary_key")]),e._v(" "),_("td",[e._v("Represents all the "),_("code",[e._v("primaryKey")]),e._v(" query parameters encountered in the aggregated event as a set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v('["id"]')])])]),e._v(" "),_("tr",[_("td",[e._v("index_creation")]),e._v(" "),_("td",[e._v("Does an index creation happened among all requests in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"documents-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Updated")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Updated event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(". The event's properties are averaged over all requests on "),_("code",[e._v("PUT")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("payload_type")]),e._v(" "),_("td",[e._v("Represents all the payload_type encountered on this endpoint in the aggregated event as a set. "),_("code",[e._v("application/json")]),e._v("/ "),_("code",[e._v("application/x-ndjson")]),e._v("/ "),_("code",[e._v("text/plain")]),e._v(" or any non-supported content-type.")]),e._v(" "),_("td",[e._v("["),_("code",[e._v("text/plain")]),e._v(", "),_("code",[e._v("application/json")]),e._v("]")])]),e._v(" "),_("tr",[_("td",[e._v("primary_key")]),e._v(" "),_("td",[e._v("Represents all the "),_("code",[e._v("primaryKey")]),e._v(" query parameters encountered in the aggregated event as a set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v('["id"]')])])]),e._v(" "),_("tr",[_("td",[e._v("index_creation")]),e._v(" "),_("td",[e._v("Does an index creation happened among all requests in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"documents-deleted"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-deleted"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Deleted")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Deleted event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The total number of received requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])]),e._v(" "),_("tr",[_("td",[e._v("per_document_id")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("DELETE /indexes/:indexUid/documents/:documentUid")]),e._v(" endpoint is called in the aggregated event, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("clear_all")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("DELETE /indexes/:indexUid/documents")]),e._v(" endpoint is called in the aggregated event, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("per_batch")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("POST /indexes/:indexUid/documents/delete-batch")]),e._v(" endpoint is called in the aggregated event, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("per_filter")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("POST /indexes/:indexUid/documents/delete")]),e._v(" endpoint is called in the aggregated event, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("h2",{attrs:{id:"documents-fetched-get"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-fetched-get"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Fetched GET")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Fetched GET event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[_("code",[e._v("requests.total_received")])]),e._v(" "),_("td",[e._v("Total number of request received in this batch")]),e._v(" "),_("td",[e._v("325")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_document_id")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("GET /indexes/:indexUid/documents/:doc_id")]),e._v(" endpoint was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_filter")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("GET /indexes/:indexUid/documents")]),e._v(" endpoint was used with a filter in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_limit")])]),e._v(" "),_("td",[e._v("Highest value given for the "),_("code",[e._v("limit")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("60")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_offset")])]),e._v(" "),_("td",[e._v("Highest value given for the "),_("code",[e._v("offset")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("1000")])])])]),e._v(" "),_("h2",{attrs:{id:"documents-fetched-post"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-fetched-post"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Fetched POST")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Fetched POST event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[_("code",[e._v("requests.total_received")])]),e._v(" "),_("td",[e._v("Total number of request received in this batch")]),e._v(" "),_("td",[e._v("325")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_document_id")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_filter")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("POST /indexes/:indexUid/documents/fetch")]),e._v(" endpoint was used with a filter in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_limit")])]),e._v(" "),_("td",[e._v("Highest value given for the "),_("code",[e._v("limit")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("60")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_offset")])]),e._v(" "),_("td",[e._v("Highest value given for the "),_("code",[e._v("offset")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("1000")])])])]),e._v(" "),_("h2",{attrs:{id:"settings-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#settings-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Settings Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("searchable_attributes.total")]),e._v(" "),_("td",[e._v("Number of searchable attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("searchable_attributes.with_wildcard")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("*")]),e._v(" is specified as a searchable attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.words_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("words")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("1")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.typo_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("typo")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("2")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.proximity_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("proximity")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.attribute_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("attribute")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("4")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.sort_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("sort")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.exactness_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("exactness")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("6")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.values")]),e._v(" "),_("td",[e._v("A string representing the ranking rules without the custom asc-desc rules.")]),e._v(" "),_("td",[_("code",[e._v('"words, typo, attribute, sort, exactness"')])])]),e._v(" "),_("tr",[_("td",[e._v("sortable_attributes.total")]),e._v(" "),_("td",[e._v("Number of sortable attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("sortable_attributes.has_geo")]),e._v(" "),_("td",[e._v("Indicate if "),_("code",[e._v("_geo")]),e._v(" is set as a sortable attribute.")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("filterable_attributes.total")]),e._v(" "),_("td",[e._v("Number of filterable attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("filterable_attributes.has_geo")]),e._v(" "),_("td",[e._v("Indicate if "),_("code",[e._v("_geo")]),e._v(" is set as a filterable attribute.")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.enabled")]),e._v(" "),_("td",[e._v("Whether the typo tolerance is enabled.")]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.disable_on_attributes")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if at least one value is defined for "),_("code",[e._v("disableOnAttributes")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.disable_on_words")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if at least one value is defined for "),_("code",[e._v("disableOnWords")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.min_word_size_for_typos.one_typo")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("minWordSizeForTypos.oneTypo")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.min_word_size_for_typos.two_typos")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("minWordSizeForTypos.twoTypos")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("9")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.max_total_hits")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("pagination.maxTotalHits")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("1000")])])]),e._v(" "),_("tr",[_("td",[e._v("faceting.max_values_per_facet")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("faceting.maxValuesPerFacet")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("faceting.sort_facet_values_by_star_count")]),e._v(" "),_("td",[e._v("Whether the user set all fields to be sort by count")]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("faceting.sort_facet_values_by_total")]),e._v(" "),_("td",[e._v("The number of different values that were set")]),e._v(" "),_("td",[_("code",[e._v("10")])])]),e._v(" "),_("tr",[_("td",[e._v("distinct_attribute.set")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if a field name is specified, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("proximity_precision.set")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" the setting has been manually set, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("proximity_precision.value")]),e._v(" "),_("td",[_("code",[e._v("byWord")]),e._v(" or "),_("code",[e._v("byAttribute")]),e._v(" if the setting has been set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("null")])])]),e._v(" "),_("tr",[_("td",[e._v("displayed_attributes.total")]),e._v(" "),_("td",[e._v("Number of displayed attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("displayed_attributes.with_wildcard")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("*")]),e._v(" is specified as a displayed attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("stop_words.total")]),e._v(" "),_("td",[e._v("Number of stop words.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("separator_tokens.total")]),e._v(" "),_("td",[e._v("Number of separator tokens.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("non_separator_tokens.total")]),e._v(" "),_("td",[e._v("Number of non separator tokens.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("dictionary.total")]),e._v(" "),_("td",[e._v("Number of words in the dictionary.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("synonyms.total")]),e._v(" "),_("td",[e._v("Number of synonyms.")]),e._v(" "),_("td",[_("code",[e._v("3")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"rankingrules-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#rankingrules-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("RankingRules Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.words_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("words")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("1")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.typo_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("typo")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("2")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.proximity_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("proximity")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.attribute_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("attribute")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("4")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.sort_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("sort")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.exactness_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("exactness")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("6")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.values")]),e._v(" "),_("td",[e._v("A string representing the ranking rules without the custom asc-desc rules.")]),e._v(" "),_("td",[_("code",[e._v('"words, typo, attribute, sort, exactness"')])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"sortableattributes-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#sortableattributes-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("SortableAttributes Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("sortable_attributes.total")]),e._v(" "),_("td",[e._v("Number of sortable attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("sortable_attributes.has_geo")]),e._v(" "),_("td",[e._v("Indicate if "),_("code",[e._v("_geo")]),e._v(" is set as a sortable attribute.")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"filterableattributes-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#filterableattributes-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("FilterableAttributes Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("filterable_attributes.total")]),e._v(" "),_("td",[e._v("Number of filterable attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("filterable_attributes.has_geo")]),e._v(" "),_("td",[e._v("Indicate if "),_("code",[e._v("_geo")]),e._v(" is set as a filterable attribute.")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("h2",{attrs:{id:"searchableattributes-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#searchableattributes-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("SearchableAttributes Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("searchable_attributes.total")]),e._v(" "),_("td",[e._v("Number of searchable attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("searchable_attributes.with_wildcard")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("*")]),e._v(" is specified as a searchable attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("h2",{attrs:{id:"typotolerance-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#typotolerance-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("TypoTolerance Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.enabled")]),e._v(" "),_("td",[e._v("Whether the typo tolerance is enabled")]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.disable_on_attributes")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if at least one value is defined for "),_("code",[e._v("disableOnAttributes")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.disable_on_words")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if at least one value is defined for "),_("code",[e._v("disableOnWords")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.min_word_size_for_typos.one_typo")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("minWordSizeForTypos.oneTypo")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.min_word_size_for_typos.two_typos")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("minWordSizeForTypos.twoTypos")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("9")])])])])]),e._v(" "),_("h2",{attrs:{id:"pagination-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#pagination-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Pagination Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.max_total_hits")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("maxTotalHits")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("1000")])])])])]),e._v(" "),_("h2",{attrs:{id:"faceting-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#faceting-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Faceting Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("faceting.max_values_per_facet")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("maxValuesPerFacet")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("faceting.sort_facet_values_by_star_count")]),e._v(" "),_("td",[e._v("Whether the user set all fields to be sort by count")]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("faceting.sort_facet_values_by_total")]),e._v(" "),_("td",[e._v("The number of different values that were set")]),e._v(" "),_("td",[_("code",[e._v("10")])])])])]),e._v(" "),_("h2",{attrs:{id:"distinctattribute-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#distinctattribute-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("DistinctAttribute Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("distinct_attribute.set")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if a field name is specified, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("h2",{attrs:{id:"proximityprecision-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#proximityprecision-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("ProximityPrecision Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("proximity_precision.set")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" the setting has been manually set, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("proximity_precision.value")]),e._v(" "),_("td",[_("code",[e._v("byWord")]),e._v(" or "),_("code",[e._v("byAttribute")]),e._v(" if the setting has been set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("byWord")])])])])]),e._v(" "),_("h2",{attrs:{id:"displayedattributes-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#displayedattributes-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("DisplayedAttributes Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("displayed_attributes.total")]),e._v(" "),_("td",[e._v("Number of displayed attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("displayed_attributes.with_wildcard")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("*")]),e._v(" is specified as a displayed attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("h2",{attrs:{id:"stopwords-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#stopwords-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("StopWords Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("stop_words.total")]),e._v(" "),_("td",[e._v("Number of stop words.")]),e._v(" "),_("td",[_("code",[e._v("3")])])])])]),e._v(" "),_("h2",{attrs:{id:"separatortokens-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#separatortokens-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("SeparatorTokens Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("separator_tokens.total")]),e._v(" "),_("td",[e._v("Number of separator tokens.")]),e._v(" "),_("td",[_("code",[e._v("3")])])])])]),e._v(" "),_("h2",{attrs:{id:"nonseparatortokens-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#nonseparatortokens-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("NonSeparatorTokens Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("non_separator_tokens.total")]),e._v(" "),_("td",[e._v("Number of non separator tokens.")]),e._v(" "),_("td",[_("code",[e._v("3")])])])])]),e._v(" "),_("h2",{attrs:{id:"dictionary-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#dictionary-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Dictionary Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("dictionary.total")]),e._v(" "),_("td",[e._v("Number of words in the dictionary.")]),e._v(" "),_("td",[_("code",[e._v("3")])])])])]),e._v(" "),_("h2",{attrs:{id:"synonyms-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#synonyms-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Synonyms Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("synonyms.total")]),e._v(" "),_("td",[e._v("Number of synonyms.")]),e._v(" "),_("td",[_("code",[e._v("3")])])])])]),e._v(" "),_("h2",{attrs:{id:"dump-created"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#dump-created"}},[e._v("#")]),e._v(" "),_("code",[e._v("Dump Created")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])])])]),e._v(" "),_("h2",{attrs:{id:"snapshot-created"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#snapshot-created"}},[e._v("#")]),e._v(" "),_("code",[e._v("Snapshot Created")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])])])]),e._v(" "),_("h2",{attrs:{id:"tasks-seen"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#tasks-seen"}},[e._v("#")]),e._v(" "),_("code",[e._v("Tasks Seen")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Tasks Seen event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The total number of received requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])]),e._v(" "),_("tr",[_("td",[e._v("per_task_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if an uid is used to fetch a particular task resource, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("uids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_index_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("indexUids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_type")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("types")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_status")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("statuses")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_canceled_by")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("canceledBy")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_enqueued_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_enqueued_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_started_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_started_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_finished_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_finished_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])])])]),e._v(" "),_("h2",{attrs:{id:"tasks-canceled"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#tasks-canceled"}},[e._v("#")]),e._v(" "),_("code",[e._v("Tasks Canceled")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("uids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_index_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("indexUids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_type")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("types")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_status")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("statuses")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_canceled_by")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("canceledBy")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_enqueued_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_enqueued_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_started_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_started_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_finished_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_finished_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])])])]),e._v(" "),_("h2",{attrs:{id:"tasks-deleted"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#tasks-deleted"}},[e._v("#")]),e._v(" "),_("code",[e._v("Tasks Deleted")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("uids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_index_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("indexUids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_type")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("types")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_status")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("statuses")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_canceled_by")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("canceledBy")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_enqueued_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_enqueued_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_started_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_started_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_finished_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_finished_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])])])]),e._v(" "),_("h2",{attrs:{id:"stats-seen"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#stats-seen"}},[e._v("#")]),e._v(" "),_("code",[e._v("Stats Seen")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("per_index_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if an uid is used to fetch an index stat resource, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])])])]),e._v(" "),_("h2",{attrs:{id:"health-seen"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#health-seen"}},[e._v("#")]),e._v(" "),_("code",[e._v("Health Seen")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Health Seen event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The total number of received requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])])])]),e._v(" "),_("h2",{attrs:{id:"version-seen"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#version-seen"}},[e._v("#")]),e._v(" "),_("code",[e._v("Version Seen")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])])])]),e._v(" "),_("h2",{attrs:{id:"experimental-features-seen"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#experimental-features-seen"}},[e._v("#")]),e._v(" "),_("code",[e._v("Experimental features Seen")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])])])]),e._v(" "),_("h2",{attrs:{id:"experimental-features-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#experimental-features-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Experimental features Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("vector_store")]),e._v(" "),_("td",[e._v("Whether the "),_("RouterLink",{attrs:{to:"/specifications/text/0193-experimental-features.html#vector-store"}},[e._v("vector store")]),e._v(" feature is enabled.")],1),e._v(" "),_("td",[_("code",[e._v("true")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"user-interface"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#user-interface"}},[e._v("#")]),e._v(" User-interface")]),e._v(" "),_("p",[e._v("Analytics are enabled by default while leaving the option for users to disable it with the "),_("code",[e._v("--no-analytics")]),e._v(" option.")]),e._v(" "),_("p",[_("strong",[e._v("Message displayed on the CLI at launch if analytics are enabled")])]),e._v(" "),_("blockquote",[_("p",[e._v("Thank you for using MeiliSearch!")]),e._v(" "),_("p",[e._v("We collect anonymized analytics to improve our product and your experience. To learn more, including how to turn off analytics, visit our dedicated documentation page: https://docs.meilisearch.com/learn/what_is_meilisearch/telemetry.html.")]),e._v(" "),_("p",[e._v('Anonymous telemetry:\t"Enabled"')]),e._v(" "),_("p",[e._v('Instance UID: ":uidGeneratedAtFirstLaunch"')])]),e._v(" "),_("p",[_("strong",[e._v("Message displayed on the CLI at launch if analytics are disabled after being activated")])]),e._v(" "),_("p",[e._v("The unique identifier of the instance remains displayed even if analytics are disabled so that it does not reactivate the analytics to obtain it after having stopped it. The user can still ask us to remove the data previously collected by giving us his "),_("code",[e._v("Instance UID")]),e._v(".")]),e._v(" "),_("blockquote",[_("p",[e._v("Thank you for using MeiliSearch!")]),e._v(" "),_("p",[e._v('Anonymous telemetry:\t"Disabled"')]),e._v(" "),_("p",[e._v('Instance UID: ":uidGeneratedAtFirstLaunch"')])]),e._v(" "),_("p",[_("strong",[e._v("Message displayed on the CLI at launch if analytics are disabled at first launch")])]),e._v(" "),_("blockquote",[_("p",[e._v("Thank you for using MeiliSearch!")]),e._v(" "),_("p",[e._v('Anonymous telemetry:\t"Disabled"')])]),e._v(" "),_("h2",{attrs:{id:"_2-technical-aspects"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-aspects"}},[e._v("#")]),e._v(" 2. Technical Aspects")]),e._v(" "),_("h3",{attrs:{id:"i-technical-details"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#i-technical-details"}},[e._v("#")]),e._v(" I. Technical Details")]),e._v(" "),_("h4",{attrs:{id:"user-agent-case"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#user-agent-case"}},[e._v("#")]),e._v(" User-Agent case")]),e._v(" "),_("p",[e._v("The "),_("code",[e._v("User-Agent")]),e._v(" header is tracked on the events listed below. Our official SDKs/integrations should always contain "),_("code",[e._v("MeiliSearch")]),e._v(" in their names.")]),e._v(" "),_("p",[e._v("Each endpoint API tracked sends the "),_("code",[e._v("User-Agent")]),e._v(" as a "),_("code",[e._v("user_agent")]),e._v(" event property as an array. If several values are contained in the "),_("code",[e._v("User-Agent")]),e._v(" header, they are split by the "),_("code",[e._v(";")]),e._v(" character.")]),e._v(" "),_("h5",{attrs:{id:"x-meilisearch-client-header"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#x-meilisearch-client-header"}},[e._v("#")]),e._v(" "),_("code",[e._v("X-Meilisearch-Client")]),e._v(" Header")]),e._v(" "),_("p",[e._v("Some browser engines prevent overloading the User-Agent header. To track the calls made by some clients concerned by this fact, e.g. the JavaScript SDK, it is possible to use the "),_("code",[e._v("X-Meilisearch-Client")]),e._v(" custom header.")]),e._v(" "),_("p",[e._v("If the "),_("code",[e._v("X-Meilisearch-Client")]),e._v(" is encountered, it overrides the presence of the "),_("code",[e._v("User-Agent")]),e._v(" header.")]),e._v(" "),_("h4",{attrs:{id:"telemetry-endpoint"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#telemetry-endpoint"}},[e._v("#")]),e._v(" Telemetry Endpoint")]),e._v(" "),_("p",[e._v("Telemetric data are sent to the domain "),_("code",[e._v("telemetry.meilisearch.com")]),e._v(" which then redirects it to Segment.")]),e._v(" "),_("p",[e._v("This transit domain allows us to change the telemetry collection solution in the future without impacting older versions of Meilisearch.")]),e._v(" "),_("h5",{attrs:{id:"identifying-meilisearch-installation"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#identifying-meilisearch-installation"}},[e._v("#")]),e._v(" Identifying MeiliSearch installation")]),e._v(" "),_("p",[e._v("To identify instances, we generate a unique identifier at first launch if analytics are not disabled.")]),e._v(" "),_("ul",[_("li",[e._v("This unique identifier is inserted in the data.ms folder to be kept in case of version upgrades.")]),e._v(" "),_("li",[e._v("A file named following the given pattern "),_("code",[e._v(":MeiliSearchData.msPath-:instanceUid")]),e._v(" is generated in a "),_("code",[e._v("MeiliSearch")]),e._v(" folder to recover an identifier in case of corruption of the data.ms folder, causing it to be deleted and recreated. This "),_("code",[e._v("MeiliSearch")]),e._v(" folder is created in the "),_("code",[e._v("config_dir")]),e._v(" of each platform.")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Directory")]),e._v(" "),_("th",[e._v("Windows")]),e._v(" "),_("th",[e._v("Linux/*BSD")]),e._v(" "),_("th",[e._v("macOS")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("config_dir")]),e._v(" "),_("td",[e._v("%APPDATA% (C:\\Users%USERNAME%\\AppData\\Roaming)")]),e._v(" "),_("td",[e._v("$XDG_CONFIG_HOME (~/.config)")]),e._v(" "),_("td",[e._v("~/Library/Application Support")])])])]),e._v(" "),_("h5",{attrs:{id:"segment-identify-call"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#segment-identify-call"}},[e._v("#")]),e._v(" Segment Identify Call")]),e._v(" "),_("p",[e._v("The "),_("code",[e._v("identify")]),e._v(" method of Segment permits identifying an instance by sending a unique identifier. It groups the information of a MeiliSearch binary such as "),_("code",[e._v("system")]),e._v(", "),_("code",[e._v("stats")]),e._v(", and general properties related below in this specification.")]),e._v(" "),_("p",[e._v("The segment identify call is only sent after the first hour if the instance is still running. At the first launch, MeiliSearch sends a "),_("code",[e._v("Launched")]),e._v(" event on an instance ID equal to "),_("code",[e._v("total_launch")]),e._v(" in order to avoid tracking instances usage for nothing when they could be shut down and never restarted.")]),e._v(" "),_("h5",{attrs:{id:"segment-track-call"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#segment-track-call"}},[e._v("#")]),e._v(" Segment Track Call")]),e._v(" "),_("p",[e._v("The "),_("code",[e._v("track")]),e._v(" calls of Segment allow tracking the events passed on the instance.")]),e._v(" "),_("h5",{attrs:{id:"batching"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#batching"}},[e._v("#")]),e._v(" Batching")]),e._v(" "),_("p",[e._v("A batch is sent every hour or when it reaches the maximum size of "),_("code",[e._v("500Kb")]),e._v(" to avoid sending analytics in real-time and preserve network exchanges.")]),e._v(" "),_("p",[e._v("This batch contains an identify payload and all tracked events that occurred during this hour.")]),e._v(" "),_("h5",{attrs:{id:"logging"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#logging"}},[e._v("#")]),e._v(" Logging")]),e._v(" "),_("p",[e._v("Errors occurring when sending metrics to Segment should be silent. In general, the impact of data collection should be minimized as much as possible concerning performance and be entirely transparent for the user during its use.")]),e._v(" "),_("h4",{attrs:{id:"debug-build"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#debug-build"}},[e._v("#")]),e._v(" Debug build")]),e._v(" "),_("p",[e._v("In debug build, no analytics are collected.")]),e._v(" "),_("h2",{attrs:{id:"_3-future-possibilities"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[e._v("#")]),e._v(" 3. Future possibilities")]),e._v(" "),_("p",[e._v("n/a")])])}),[],!1,null,null,null);t.default=d.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/20.67b025f1.js b/docs/assets/js/20.fe442e43.js similarity index 99% rename from docs/assets/js/20.67b025f1.js rename to docs/assets/js/20.fe442e43.js index 70e05b987..bab7328c4 100644 --- a/docs/assets/js/20.67b025f1.js +++ b/docs/assets/js/20.fe442e43.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{442:function(e,t,i){"use strict";i.r(t);var a=i(62),r=Object(a.a)({},(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[i("ul",[i("li",[e._v("Title: Rename attributesForFaceting")]),e._v(" "),i("li",[e._v("Start Date: 2021-04-16")]),e._v(" "),i("li",[e._v("Specification PR: "),i("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/38",target:"_blank",rel:"noopener noreferrer"}},[e._v("#38"),i("OutboundLink")],1)]),e._v(" "),i("li",[e._v("MeiliSearch Tracking-Issues: "),i("a",{attrs:{href:"https://github.com/meilisearch/transplant/issues/187",target:"_blank",rel:"noopener noreferrer"}},[e._v("transplant/#187"),i("OutboundLink")],1)])]),e._v(" "),i("h1",{attrs:{id:"rename-attributesforfaceting"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#rename-attributesforfaceting"}},[e._v("#")]),e._v(" Rename attributesForFaceting")]),e._v(" "),i("h2",{attrs:{id:"_1-feature-description-and-interaction"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_1-feature-description-and-interaction"}},[e._v("#")]),e._v(" 1. Feature Description and Interaction")]),e._v(" "),i("h3",{attrs:{id:"i-summary-motivation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#i-summary-motivation"}},[e._v("#")]),e._v(" I. Summary & Motivation")]),e._v(" "),i("p",[e._v("As the new engine requires filterable fields to be declared in attributesForFaceting, the name of this field is not as clear as we would like it to be. Since it’s now concerning filter and possible wanted facets on search result by the user.")]),e._v(" "),i("h3",{attrs:{id:"ii-additional-materials"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#ii-additional-materials"}},[e._v("#")]),e._v(" II. Additional Materials")]),e._v(" "),i("p",[e._v("N/A")]),e._v(" "),i("h3",{attrs:{id:"iii-explanation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#iii-explanation"}},[e._v("#")]),e._v(" III.Explanation")]),e._v(" "),i("h4",{attrs:{id:"i-attributesforfaceting"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#i-attributesforfaceting"}},[e._v("#")]),e._v(" I. attributesForFaceting")]),e._v(" "),i("p",[i("code",[e._v("attributesForFaceting")]),e._v(" is now used for declaring fields that could be filtered and given as facets.")]),e._v(" "),i("p",[e._v("Since faceting is also used to filter the search result by navigation, the idea is to highlight the filtering aspect in the name of the field.")]),e._v(" "),i("blockquote",[i("p",[e._v("Any fields declared in "),i("code",[e._v("attributesForFaceting")]),e._v(" for filtering can be faceted. Any fields declared in "),i("code",[e._v("attributesForFaceting")]),e._v(" for faceting can be filtered.")])]),e._v(" "),i("p",[i("code",[e._v("attributesForFaceting")]),e._v(" is lacking precision because it is now used to authorize the usage of those fields in "),i("code",[e._v("filter")]),e._v(" and "),i("code",[e._v("facetsDistribution")]),e._v(" parameters. Also, note that "),i("code",[e._v("facetFilters")]),e._v(" and "),i("code",[e._v("filters")]),e._v(" have been merged in "),i("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/27",target:"_blank",rel:"noopener noreferrer"}},[e._v("#27"),i("OutboundLink")],1),e._v(" to be "),i("code",[e._v("filter")]),e._v(".")]),e._v(" "),i("h3",{attrs:{id:"ii-filterableattributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#ii-filterableattributes"}},[e._v("#")]),e._v(" II. filterableAttributes")]),e._v(" "),i("p",[e._v("We are proposing "),i("code",[e._v("filterableAttributes")]),e._v(" as the new parameter name. This will be clearer since all the fields declared within it now allow you to refine the search results. The declared fields allow you to refine the query in two ways. The first allows you to use these in the "),i("code",[e._v("filter")]),e._v(" parameter. The second also enables the possibility of distributing the fields as a facet by using those in the "),i("code",[e._v("facetsDistribution")]),e._v(" parameter.")]),e._v(" "),i("p",[e._v("This way of naming this field is clearly saying that the expected parameter is an array of fields. Keeping the term faceting in the field name is something to be avoided as this field is not related only to faceting. The expected action behind that will remain the fact of activating filtering for these fields.")]),e._v(" "),i("blockquote",[i("p",[e._v("Faceting is a UI method of displaying document fields in a distributed fashion. Generally the final aim involves proposing a method of refining the research by interacting with the facets previously generated. Thus, filtering the search result.")])]),e._v(" "),i("p",[e._v("On a side note, the term "),i("code",[e._v("facetDistribution")]),e._v(" is a term used in e-commerce and we will therefore probably deal with this in a future specification.")]),e._v(" "),i("h3",{attrs:{id:"iii-impact-on-documentation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#iii-impact-on-documentation"}},[e._v("#")]),e._v(" III. Impact on documentation")]),e._v(" "),i("p",[e._v("The documentation needs to replace occurences of "),i("code",[e._v("attributesForFaceting")]),e._v(" by "),i("code",[e._v("filterableAttributes")]),e._v(" "),i("a",{attrs:{href:"https://docs.meilisearch.com/reference/features/faceted_search.html#filters-or-facets",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),i("OutboundLink")],1),e._v(". Also, the documentation should mention that fields needs to be declared in "),i("code",[e._v("filterableAttributes")]),e._v(" to be used in the "),i("code",[e._v("filter")]),e._v(" query parameter "),i("a",{attrs:{href:"https://docs.meilisearch.com/reference/features/filtering.html#filtering",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),i("OutboundLink")],1),e._v(".")]),e._v(" "),i("h3",{attrs:{id:"iv-impact-on-sdks"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#iv-impact-on-sdks"}},[e._v("#")]),e._v(" IV. Impact on SDKs")]),e._v(" "),i("p",[e._v("N/A")]),e._v(" "),i("h2",{attrs:{id:"_2-technical-aspects"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-aspects"}},[e._v("#")]),e._v(" 2. Technical Aspects")]),e._v(" "),i("p",[e._v("N/A")]),e._v(" "),i("h2",{attrs:{id:"_3-future-possibilities"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[e._v("#")]),e._v(" 3. Future possibilities")]),e._v(" "),i("p",[e._v("N/A")])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{444:function(e,t,i){"use strict";i.r(t);var a=i(62),r=Object(a.a)({},(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[i("ul",[i("li",[e._v("Title: Rename attributesForFaceting")]),e._v(" "),i("li",[e._v("Start Date: 2021-04-16")]),e._v(" "),i("li",[e._v("Specification PR: "),i("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/38",target:"_blank",rel:"noopener noreferrer"}},[e._v("#38"),i("OutboundLink")],1)]),e._v(" "),i("li",[e._v("MeiliSearch Tracking-Issues: "),i("a",{attrs:{href:"https://github.com/meilisearch/transplant/issues/187",target:"_blank",rel:"noopener noreferrer"}},[e._v("transplant/#187"),i("OutboundLink")],1)])]),e._v(" "),i("h1",{attrs:{id:"rename-attributesforfaceting"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#rename-attributesforfaceting"}},[e._v("#")]),e._v(" Rename attributesForFaceting")]),e._v(" "),i("h2",{attrs:{id:"_1-feature-description-and-interaction"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_1-feature-description-and-interaction"}},[e._v("#")]),e._v(" 1. Feature Description and Interaction")]),e._v(" "),i("h3",{attrs:{id:"i-summary-motivation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#i-summary-motivation"}},[e._v("#")]),e._v(" I. Summary & Motivation")]),e._v(" "),i("p",[e._v("As the new engine requires filterable fields to be declared in attributesForFaceting, the name of this field is not as clear as we would like it to be. Since it’s now concerning filter and possible wanted facets on search result by the user.")]),e._v(" "),i("h3",{attrs:{id:"ii-additional-materials"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#ii-additional-materials"}},[e._v("#")]),e._v(" II. Additional Materials")]),e._v(" "),i("p",[e._v("N/A")]),e._v(" "),i("h3",{attrs:{id:"iii-explanation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#iii-explanation"}},[e._v("#")]),e._v(" III.Explanation")]),e._v(" "),i("h4",{attrs:{id:"i-attributesforfaceting"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#i-attributesforfaceting"}},[e._v("#")]),e._v(" I. attributesForFaceting")]),e._v(" "),i("p",[i("code",[e._v("attributesForFaceting")]),e._v(" is now used for declaring fields that could be filtered and given as facets.")]),e._v(" "),i("p",[e._v("Since faceting is also used to filter the search result by navigation, the idea is to highlight the filtering aspect in the name of the field.")]),e._v(" "),i("blockquote",[i("p",[e._v("Any fields declared in "),i("code",[e._v("attributesForFaceting")]),e._v(" for filtering can be faceted. Any fields declared in "),i("code",[e._v("attributesForFaceting")]),e._v(" for faceting can be filtered.")])]),e._v(" "),i("p",[i("code",[e._v("attributesForFaceting")]),e._v(" is lacking precision because it is now used to authorize the usage of those fields in "),i("code",[e._v("filter")]),e._v(" and "),i("code",[e._v("facetsDistribution")]),e._v(" parameters. Also, note that "),i("code",[e._v("facetFilters")]),e._v(" and "),i("code",[e._v("filters")]),e._v(" have been merged in "),i("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/27",target:"_blank",rel:"noopener noreferrer"}},[e._v("#27"),i("OutboundLink")],1),e._v(" to be "),i("code",[e._v("filter")]),e._v(".")]),e._v(" "),i("h3",{attrs:{id:"ii-filterableattributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#ii-filterableattributes"}},[e._v("#")]),e._v(" II. filterableAttributes")]),e._v(" "),i("p",[e._v("We are proposing "),i("code",[e._v("filterableAttributes")]),e._v(" as the new parameter name. This will be clearer since all the fields declared within it now allow you to refine the search results. The declared fields allow you to refine the query in two ways. The first allows you to use these in the "),i("code",[e._v("filter")]),e._v(" parameter. The second also enables the possibility of distributing the fields as a facet by using those in the "),i("code",[e._v("facetsDistribution")]),e._v(" parameter.")]),e._v(" "),i("p",[e._v("This way of naming this field is clearly saying that the expected parameter is an array of fields. Keeping the term faceting in the field name is something to be avoided as this field is not related only to faceting. The expected action behind that will remain the fact of activating filtering for these fields.")]),e._v(" "),i("blockquote",[i("p",[e._v("Faceting is a UI method of displaying document fields in a distributed fashion. Generally the final aim involves proposing a method of refining the research by interacting with the facets previously generated. Thus, filtering the search result.")])]),e._v(" "),i("p",[e._v("On a side note, the term "),i("code",[e._v("facetDistribution")]),e._v(" is a term used in e-commerce and we will therefore probably deal with this in a future specification.")]),e._v(" "),i("h3",{attrs:{id:"iii-impact-on-documentation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#iii-impact-on-documentation"}},[e._v("#")]),e._v(" III. Impact on documentation")]),e._v(" "),i("p",[e._v("The documentation needs to replace occurences of "),i("code",[e._v("attributesForFaceting")]),e._v(" by "),i("code",[e._v("filterableAttributes")]),e._v(" "),i("a",{attrs:{href:"https://docs.meilisearch.com/reference/features/faceted_search.html#filters-or-facets",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),i("OutboundLink")],1),e._v(". Also, the documentation should mention that fields needs to be declared in "),i("code",[e._v("filterableAttributes")]),e._v(" to be used in the "),i("code",[e._v("filter")]),e._v(" query parameter "),i("a",{attrs:{href:"https://docs.meilisearch.com/reference/features/filtering.html#filtering",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),i("OutboundLink")],1),e._v(".")]),e._v(" "),i("h3",{attrs:{id:"iv-impact-on-sdks"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#iv-impact-on-sdks"}},[e._v("#")]),e._v(" IV. Impact on SDKs")]),e._v(" "),i("p",[e._v("N/A")]),e._v(" "),i("h2",{attrs:{id:"_2-technical-aspects"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-aspects"}},[e._v("#")]),e._v(" 2. Technical Aspects")]),e._v(" "),i("p",[e._v("N/A")]),e._v(" "),i("h2",{attrs:{id:"_3-future-possibilities"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[e._v("#")]),e._v(" 3. Future possibilities")]),e._v(" "),i("p",[e._v("N/A")])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/24.37bbc839.js b/docs/assets/js/24.af4d4fe4.js similarity index 99% rename from docs/assets/js/24.37bbc839.js rename to docs/assets/js/24.af4d4fe4.js index 218c5f3b4..2ff0aebf9 100644 --- a/docs/assets/js/24.37bbc839.js +++ b/docs/assets/js/24.af4d4fe4.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{449:function(t,s,e){"use strict";e.r(s);var a=e(62),n=Object(a.a)({},(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("ul",[e("li",[t._v("Title: Sort")]),t._v(" "),e("li",[t._v("Start Date: 2021-07-20")]),t._v(" "),e("li",[t._v("Specification PR: "),e("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/55",target:"_blank",rel:"noopener noreferrer"}},[t._v("#55"),e("OutboundLink")],1)]),t._v(" "),e("li",[t._v("Discovery Issue: "),e("a",{attrs:{href:"https://github.com/meilisearch/product/issues/43",target:"_blank",rel:"noopener noreferrer"}},[t._v("#43"),e("OutboundLink")],1)])]),t._v(" "),e("h1",{attrs:{id:"sort"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#sort"}},[t._v("#")]),t._v(" Sort")]),t._v(" "),e("h2",{attrs:{id:"_1-functional-specification"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_1-functional-specification"}},[t._v("#")]),t._v(" 1. Functional Specification")]),t._v(" "),e("h3",{attrs:{id:"i-summary"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#i-summary"}},[t._v("#")]),t._v(" I. Summary")]),t._v(" "),e("p",[t._v("The purpose of this specification is to add a "),e("strong",[t._v("sort")]),t._v(" feature at search time to quickly sort the search results as an end-user. Fields called "),e("code",[t._v("sortable-attributes")]),t._v(" must be known for the search to be usable. These fields can be of type "),e("code",[t._v("string")]),t._v(" and "),e("code",[t._v("number")]),t._v(". We have also introduced a new ranking rule called "),e("code",[t._v("sort")]),t._v(", allowing the user to adjust how the sorting should behave. Its position within the ranking rules allows to adjust its behavior according to the needs of exhaustivity and relevancy. We also introduced a "),e("code",[t._v("sort")]),t._v(" parameter on the search resource to give the end-user the ability to sort the search results according to his needs.")]),t._v(" "),e("h4",{attrs:{id:"summary-key-points"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#summary-key-points"}},[t._v("#")]),t._v(" Summary Key points")]),t._v(" "),e("ul",[e("li",[e("code",[t._v("sortable-attributes")]),t._v(" setting MUST be known by the engine before search time.")]),t._v(" "),e("li",[e("code",[t._v("sort")]),t._v(' search parameter MUST be able to operate on multiple fields at search time. e.g. sort="price:asc,label:desc,...". '),e("code",[t._v("string")]),t._v(" and "),e("code",[t._v("number")]),t._v(" fields MUST be supported. Sorting on nested fields WON'T be supported for this iteration.")]),t._v(" "),e("li",[e("code",[t._v("sort")]),t._v(" ranking rule allows developers to adjust the sorting behavior between exhaustivity and relevancy.")])]),t._v(" "),e("h3",{attrs:{id:"ii-motivation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ii-motivation"}},[t._v("#")]),t._v(" II. Motivation")]),t._v(" "),e("p",[t._v("According to our user feedback, the lack of a sorting feature is mentioned as one of the biggest deal-breakers for choosing MeiliSearch as a search engine. A search engine must be able to offer this feature, especially for e-commerce use. Moreover, competitors all offer it. Today, users must find workarounds that take time to develop and maintain to sort search results.")]),t._v(" "),e("p",[t._v("We want to offer a simple and versatile solution for their needs.")]),t._v(" "),e("h3",{attrs:{id:"iii-explanation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#iii-explanation"}},[t._v("#")]),t._v(" III. Explanation")]),t._v(" "),e("h4",{attrs:{id:"as-a-developer-i-want-to-configure-the-sortable-attributes-so-that-the-end-user-can-sort-results"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#as-a-developer-i-want-to-configure-the-sortable-attributes-so-that-the-end-user-can-sort-results"}},[t._v("#")]),t._v(" "),e("strong",[t._v("As a developer, I want to configure the sortable attributes so that the end-user can sort results.")])]),t._v(" "),e("ul",[e("li",[t._v("Introduce a new "),e("code",[t._v("sortableAttributes")]),t._v(" field in the global settings resource schema.")]),t._v(" "),e("li",[t._v("Introduce a new "),e("code",[t._v("/sortable-attributes")]),t._v(" sub-setting resource.")])]),t._v(" "),e("p",[e("strong",[e("code",[t._v("sortableAttributes")]),t._v(" field definition")])]),t._v(" "),e("ul",[e("li",[t._v("Name: "),e("code",[t._v("sortableAttributes")])]),t._v(" "),e("li",[t._v("Type: Array[String]")]),t._v(" "),e("li",[t._v("Default: []")])]),t._v(" "),e("p",[e("strong",[t._v("GET settings")]),t._v(" "),e("code",[t._v("/indexes/{indexUid}/settings")])]),t._v(" "),e("p",[t._v("200 - Response with empty "),e("code",[t._v("sortableAttributes")]),t._v(" (default case)")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"sortableAttributes"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n ...\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[t._v("200 - Response with already configured "),e("code",[t._v("sortableAttributes")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"sortableAttributes"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"price"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"release_date"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n ...\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[t._v("💡 The values order in "),e("code",[t._v("sortableAttributes")]),t._v(" has no impact. The order will be determined at search time from the "),e("code",[t._v("sort")]),t._v(" parameter.")]),t._v(" "),e("p",[e("strong",[t._v("POST settings")]),t._v(" "),e("code",[t._v("/indexes/{indexUid}/settings")])]),t._v(" "),e("p",[t._v("Request body")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t"),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"sortableAttributes"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"price"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"release_date"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"title"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[t._v("202 Accepted - Response body")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"updateId"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("7")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("ul",[e("li",[t._v("💡 Sending an inexistent field WON'T throw an error. It is possible to define settings before indexing documents so we accept fields that may not yet exist within a document.")]),t._v(" "),e("li",[t._v("💡 "),e("code",[t._v("sortableAttributes")]),t._v(" accepts "),e("code",[t._v("null")]),t._v(" and "),e("code",[t._v("[]")]),t._v(" values to be reset.\n🔴 Sending other than string value as array item results in a 400 bad request - "),e("strong",[t._v("invalid_request_error")]),t._v(".")])]),t._v(" "),e("p",[e("strong",[t._v("DELETE settings")]),t._v(" "),e("code",[t._v("/indexes/{indexUid}/settings")])]),t._v(" "),e("p",[t._v("💡 Resetting all settings will result to the default case e.g. "),e("code",[t._v("sortableAttributes: []")])]),t._v(" "),e("p",[t._v("202 Accepted - Response body")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"updateId"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("8")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[e("strong",[t._v("GET settings/sortable-attributes")]),t._v(" "),e("code",[t._v("/indexes/{indexUid}/settings/sortable-attributes")])]),t._v(" "),e("p",[t._v("200 - Response body (Default case)")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),e("p",[t._v("200 - Response body with "),e("code",[t._v("sortableAttributes")]),t._v(" already configured")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"price"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"release_date"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),e("ul",[e("li",[t._v("🔴 If a master key is set and missing from the client, the new GET "),e("code",[t._v("settings/sortable-attributes")]),t._v(" API method is protected and returns a 401 Unauthorized "),e("code",[t._v("missing_authorization_header")]),t._v(".")]),t._v(" "),e("li",[t._v("🔴 If the index is not found, a 404 Not Found response is returned.")])]),t._v(" "),e("p",[e("strong",[t._v("POST settings/sortable-attributes")]),t._v(" "),e("code",[t._v("/indexes/{indexUid}/settings/sortable-attributes")])]),t._v(" "),e("p",[t._v("Request body")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v('[\n "price",\n "release_date",\n "title"\n]\n')])])]),e("p",[t._v("202 Accepted - Response body")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"updateId"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("7")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("ul",[e("li",[t._v("💡 Sending an inexistent field WON'T throw an error. It is possible to define settings before indexing documents so we accept fields that may not yet exist within a document.")]),t._v(" "),e("li",[t._v("💡 POST request body accept null and [] values to reset the "),e("code",[t._v("sortableAttributes")]),t._v(".")]),t._v(" "),e("li",[t._v("🔴 Sending other than string value as array item results in a 400 bad request - "),e("strong",[t._v("invalid_request_error")]),t._v(".")]),t._v(" "),e("li",[t._v("🔴 If a master key is set and missing from the client, the new POST "),e("code",[t._v("settings/sortable-attributes")]),t._v(" API method is protected and returns a 401 Unauthorized "),e("code",[t._v("missing_authorization_header")]),t._v(".")]),t._v(" "),e("li",[t._v("🔴 If the index is not found, a 404 Not Found response is returned.")])]),t._v(" "),e("p",[e("strong",[t._v("DEL settings/sortable-attributes")]),t._v(" "),e("code",[t._v("/indexes/{indexUid}/settings/sortable-attributes")])]),t._v(" "),e("p",[t._v("202 Accepted - Response body")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"updateId"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("8")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("ul",[e("li",[t._v("🔴 If a master key is set and missing from the client, the new DELETE "),e("code",[t._v("settings/sortable-attributes")]),t._v(" API method is protected and returns a 401 Unauthorized "),e("code",[t._v("missing_authorization_header")]),t._v(".")]),t._v(" "),e("li",[t._v("🔴 If the index is not found, a 404 Not Found response is returned.")])]),t._v(" "),e("h4",{attrs:{id:"as-an-end-user-i-want-to-specify-a-sort-parameter-at-search-time-so-that-i-can-sort-search-result-in-ascending-descending-order-from-document-attributes-whether-they-are-numeric-or-string"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#as-an-end-user-i-want-to-specify-a-sort-parameter-at-search-time-so-that-i-can-sort-search-result-in-ascending-descending-order-from-document-attributes-whether-they-are-numeric-or-string"}},[t._v("#")]),t._v(" "),e("strong",[t._v("As an End-User, I want to specify a "),e("code",[t._v("sort")]),t._v(" parameter at search time so that I can sort search result in ascending/descending order from document attributes, whether they are "),e("code",[t._v("numeric")]),t._v(" or "),e("code",[t._v("string")]),t._v(".")])]),t._v(" "),e("ul",[e("li",[t._v("Introduce a "),e("code",[t._v("sort")]),t._v(" parameter on GET/POST "),e("code",[t._v("/search")]),t._v(" methods.")])]),t._v(" "),e("blockquote",[e("p",[t._v("💡 In the case where an attribute is specified as a sort criterion at search time and if this attribute is of a different type between several documents, the numeric type will always be favored first by the engine. This means that documents with numeric values for this attribute will be sorted before those with string values. This can lead to awkward sorting behavior, so the user should make sure to have the same type on the attribute he wants to sort on for all these documents.")])]),t._v(" "),e("blockquote",[e("p",[t._v("💡 In the case where an attribute is specified as a sort criterion at search time and does not exist on a document, the document will be placed at the end of the ranking rule sort.")])]),t._v(" "),e("p",[e("strong",[t._v("GET Search /indexes/{indexUid}/search")])]),t._v(" "),e("p",[e("code",[t._v("sort")]),t._v(" - String - E.g. "),e("code",[t._v('sort="price:asc,release_date:desc"')])]),t._v(" "),e("blockquote",[e("p",[e("code",[t._v(":asc")])])]),t._v(" "),e("p",[e("strong",[t._v("POST Search /indexes/{indexUid}/search")])]),t._v(" "),e("p",[e("code",[t._v("sort")]),t._v(" - Array[String] - E.g.")]),t._v(" "),e("p",[t._v("Request body")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"sort"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"price:asc"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"release_date:desc"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("ul",[e("li",[t._v("🔴 Sending a sort parameter while the "),e("code",[t._v("sort")]),t._v(" ranking rule is not specified in the ranking rules settings will lead to a 400 Bad Request - "),e("strong",[t._v("invalid_sort")]),t._v(" error.")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"You must specify where `sort` is listed in the rankingRules setting to use the sort parameter at search time."')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"errorCode"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_sort"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"errorType"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request_error"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"errorLink"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_sort"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("ul",[e("li",[t._v("🔴 Sending a value not set in "),e("code",[t._v("sortableAttribute")]),t._v(" will lead to a 400 Bad Request - "),e("strong",[t._v("invalid_sort")]),t._v(" error.")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Attribute :attribute is not sortable, available sortable attributes are: ..., ..."')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"errorCode"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_sort"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"errorType"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request_error"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"errorLink"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_sort"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("ul",[e("li",[e("p",[e("code",[t._v(":attribute")]),t._v(" is inferred when the message is generated.")])]),t._v(" "),e("li",[e("p",[t._v("🔴 Sending a wrong formatted value will lead to a 400 Bad Request - "),e("strong",[t._v("invalid_sort")]),t._v(".")])])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Invalid syntax for the sort parameter: :syntaxErrorHelper."')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"errorCode"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_sort"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"errorType"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request_error"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"errorLink"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_sort"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("ul",[e("li",[e("code",[t._v(":syntaxErrorhelper")]),t._v(" is inferred when the message is generated.")])]),t._v(" "),e("p",[t._v("We want to align the way custom ordering rules are written with the syntax of the "),e("code",[t._v("sort")]),t._v(" search parameter.")]),t._v(" "),e("p",[t._v("Current custom ranking rule definition syntax")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"asc(title)"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),e("p",[t._v("become")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"title:asc"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),e("p",[e("strong",[t._v("Search example with "),e("code",[t._v("sort")])])]),t._v(" "),e("p",[t._v("With this set of document")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Vans Classic II sweatshirt in black"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"price"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("52.00")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"black"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"sizes"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"xs"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"s"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"xl"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"reviews_rating"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("4.5")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The North Face Drew Peak hoodie in green"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"price"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("36.00")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"reviews_rating"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("4.89")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Nike Club hoodie in navy"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"price"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("52.00")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"navy"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"reviews_rating"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("4.7")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),e("p",[t._v("With this ranking rules definition")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"sort"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"typo"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"words"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"proximity"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"attribute"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exactness"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),e("p",[t._v("And with this "),e("code",[t._v("sortableAttributes")]),t._v(" definition")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"price"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"reviews_rating"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),e("p",[e("strong",[t._v("POST Search")])]),t._v(" "),e("p",[t._v("Request Body")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"sort"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"price:asc"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"reviews_rating:desc"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[t._v("200 - Response")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The North Face Drew Peak hoodie in green"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"price"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("36.00")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"reviews_rating"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("4.89")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Nike Club hoodie in navy"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"price"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("52.00")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"navy"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"reviews_rating"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("4.7")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Vans Classic II sweatshirt in black"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"price"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("52.00")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"black"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"sizes"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"xs"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"s"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"xl"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"reviews_rating"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("4.5")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[t._v("As we can see "),e("code",[t._v("sort")]),t._v(" is the most important criterion in play according to the ranking rules ordering. Moreover, we see that the "),e("code",[t._v("sort")]),t._v(" search parameter is able to handle several attributes. The priorities are determined from left to right, so the "),e("code",[t._v("price")]),t._v(" field is more important, if N documents share the same price value they are sorted by "),e("code",[t._v("reviews_rating")]),t._v(" and so on.")]),t._v(" "),e("h4",{attrs:{id:"as-a-developer-i-want-to-change-the-position-of-the-sort-ranking-rule-so-that-i-tweak-the-behavior-of-the-sort-ranking-rule-between-exhaustivity-and-relevancy"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#as-a-developer-i-want-to-change-the-position-of-the-sort-ranking-rule-so-that-i-tweak-the-behavior-of-the-sort-ranking-rule-between-exhaustivity-and-relevancy"}},[t._v("#")]),t._v(" "),e("strong",[t._v("As a Developer, I want to change the position of the "),e("code",[t._v("sort")]),t._v(" ranking rule so that I tweak the behavior of the "),e("code",[t._v("sort")]),t._v(" ranking rule between exhaustivity and relevancy.")])]),t._v(" "),e("p",[e("strong",[t._v("GET settings/ranking-rules")]),t._v(" "),e("code",[t._v("/indexes/{indexUid}/settings/ranking-rules")])]),t._v(" "),e("p",[t._v("200 - Response body (Default case)")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"words"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"typo"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"proximity"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"attribute"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"sort"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exactness"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),e("p",[e("strong",[t._v("POST settings/ranking-rules")])]),t._v(" "),e("p",[t._v("Request body")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"sort"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"words"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"typo"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"proximity"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"attribute"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exactness"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),e("p",[t._v("202 Accepted - Response body")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"updateId"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("7")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("ul",[e("li",[t._v("ℹ️ The position of the sort ranking rule is significant. The higher it is, the more critical it will be. The lower it is, the less important it will be and other rules will take priority. This allows the developer to adjust the behavior between exhaustivity and relevancy with the sort criterion. If the "),e("code",[t._v("sort")]),t._v(" ranking rule is in the last position you will have a very relevant sort; that is, results will emphasize relevancy over your sort criteria. Likewise, if "),e("code",[t._v("sort")]),t._v(" is in the first position, you will have a very exhaustive search that gives precedence to results less relevant to the query terms but more in line with your sort criteria.")])]),t._v(" "),e("p",[e("strong",[t._v("Real condition explanation")])]),t._v(" "),e("p",[t._v("e.g. Relevant Sort")]),t._v(" "),e("p",[t._v("I want a relevant sort (sort on relevant items). I put sort at the latest level of my ranking rules.")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"typo"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"words"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"proximity"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"attribute"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exactness"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"sort"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),e("p",[t._v("At search time, if I use (knowing that price and reviews_rating have been set as sortable-attributes previously)")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Mac Book"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"sort"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"price:asc"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"reviews_rating:desc"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[t._v("Ranking rules can virtually be represented that way for this search request.")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"typo"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"words"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"proximity"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"attribute"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exactness"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"price:asc"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//First part of the `sort` ranking rule.")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"reviews_rating:desc"')]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Second part of the `sort`ranking rule.")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),e("p",[t._v("Note that if I change the "),e("code",[t._v("sort")]),t._v(" search parameter's value order, it changes the inner element of the "),e("code",[t._v("sort")]),t._v(" ranking rule.")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Mac Book"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"sort"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"reviews_rating:desc"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"price:asc"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"typo"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"words"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"proximity"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"attribute"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exactness"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"reviews_rating:desc"')]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//The ordering of inner elements of the sort ranking rule is made from the order of the `sort` query/request parameter.")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"price:asc"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),e("h3",{attrs:{id:"iv-finalized-key-changes"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#iv-finalized-key-changes"}},[t._v("#")]),t._v(" IV. Finalized Key Changes")]),t._v(" "),e("ul",[e("li",[t._v("Add "),e("code",[t._v("sortableAttributes")]),t._v(" parameter in settings schema.")]),t._v(" "),e("li",[t._v("Add "),e("code",[t._v("sortable-attributes")]),t._v(" API ressource.")]),t._v(" "),e("li",[t._v("Add the "),e("code",[t._v("sort")]),t._v(" ranking rule after "),e("code",[t._v("attribute")]),t._v(" ranking rule by default to promote relevant sort.")]),t._v(" "),e("li",[t._v("Add "),e("code",[t._v("sort")]),t._v(" query/request parameter on "),e("code",[t._v("/search")]),t._v(" resource. Support "),e("code",[t._v("string")]),t._v(" and "),e("code",[t._v("number")]),t._v(". "),e("code",[t._v("string")]),t._v(" can be sorted in lexicographical order.")]),t._v(" "),e("li",[t._v("Change custom ranking rule format. e.g. "),e("code",[t._v("asc(price)")]),t._v(" become "),e("code",[t._v("price:asc")])]),t._v(" "),e("li",[t._v("Add a new error "),e("code",[t._v("invalid_sort")]),t._v(" similar to "),e("code",[t._v("invalid_filter")]),t._v(".")]),t._v(" "),e("li",[t._v("The numeric type is preferred to the string type by the "),e("code",[t._v("sort")]),t._v(" ranking rule. If an attribute has different types among the documents, those containing a numeric value will be placed before the documents containing a string value type.")]),t._v(" "),e("li",[t._v("A document not containing an attribute requested in the "),e("code",[t._v("sort")]),t._v(" parameter will be placed last during the tie-breaking of the "),e("code",[t._v("sort")]),t._v(" ranking-rule.")])]),t._v(" "),e("h2",{attrs:{id:"_2-technical-details"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-details"}},[t._v("#")]),t._v(" 2. Technical details")]),t._v(" "),e("h3",{attrs:{id:"i-measuring"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#i-measuring"}},[t._v("#")]),t._v(" I. Measuring")]),t._v(" "),e("ul",[e("li",[t._v("Number of sorted attributes used in "),e("code",[t._v("sort")]),t._v(" search parameter to calculate an avg per server.")]),t._v(" "),e("li",[e("code",[t._v("ranking-rules")]),t._v(" setting definition to evaluate position customization.")]),t._v(" "),e("li",[t._v("Number of "),e("code",[t._v("sortableAttributes")]),t._v(" to calculate an avg per server.")])]),t._v(" "),e("h2",{attrs:{id:"_3-future-possibilities"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[t._v("#")]),t._v(" 3. Future Possibilities")]),t._v(" "),e("ul",[e("li",[t._v("Support sort on nested fields")]),t._v(" "),e("li",[t._v("Support computational functions avg, sum, min, max, median. For now, the workaround is to pre-compute values in the document before indexing and sort them at search time with a "),e("code",[t._v("sort")]),t._v(' on the pre-computed field. e.g. sort="precomputed_avg_price:desc".')]),t._v(" "),e("li",[t._v("Ability to set a custom ranking rules order at search time. Out of scope from the "),e("code",[t._v("sort")]),t._v(".")])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{452:function(t,s,e){"use strict";e.r(s);var a=e(62),n=Object(a.a)({},(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("ul",[e("li",[t._v("Title: Sort")]),t._v(" "),e("li",[t._v("Start Date: 2021-07-20")]),t._v(" "),e("li",[t._v("Specification PR: "),e("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/55",target:"_blank",rel:"noopener noreferrer"}},[t._v("#55"),e("OutboundLink")],1)]),t._v(" "),e("li",[t._v("Discovery Issue: "),e("a",{attrs:{href:"https://github.com/meilisearch/product/issues/43",target:"_blank",rel:"noopener noreferrer"}},[t._v("#43"),e("OutboundLink")],1)])]),t._v(" "),e("h1",{attrs:{id:"sort"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#sort"}},[t._v("#")]),t._v(" Sort")]),t._v(" "),e("h2",{attrs:{id:"_1-functional-specification"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_1-functional-specification"}},[t._v("#")]),t._v(" 1. Functional Specification")]),t._v(" "),e("h3",{attrs:{id:"i-summary"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#i-summary"}},[t._v("#")]),t._v(" I. Summary")]),t._v(" "),e("p",[t._v("The purpose of this specification is to add a "),e("strong",[t._v("sort")]),t._v(" feature at search time to quickly sort the search results as an end-user. Fields called "),e("code",[t._v("sortable-attributes")]),t._v(" must be known for the search to be usable. These fields can be of type "),e("code",[t._v("string")]),t._v(" and "),e("code",[t._v("number")]),t._v(". We have also introduced a new ranking rule called "),e("code",[t._v("sort")]),t._v(", allowing the user to adjust how the sorting should behave. Its position within the ranking rules allows to adjust its behavior according to the needs of exhaustivity and relevancy. We also introduced a "),e("code",[t._v("sort")]),t._v(" parameter on the search resource to give the end-user the ability to sort the search results according to his needs.")]),t._v(" "),e("h4",{attrs:{id:"summary-key-points"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#summary-key-points"}},[t._v("#")]),t._v(" Summary Key points")]),t._v(" "),e("ul",[e("li",[e("code",[t._v("sortable-attributes")]),t._v(" setting MUST be known by the engine before search time.")]),t._v(" "),e("li",[e("code",[t._v("sort")]),t._v(' search parameter MUST be able to operate on multiple fields at search time. e.g. sort="price:asc,label:desc,...". '),e("code",[t._v("string")]),t._v(" and "),e("code",[t._v("number")]),t._v(" fields MUST be supported. Sorting on nested fields WON'T be supported for this iteration.")]),t._v(" "),e("li",[e("code",[t._v("sort")]),t._v(" ranking rule allows developers to adjust the sorting behavior between exhaustivity and relevancy.")])]),t._v(" "),e("h3",{attrs:{id:"ii-motivation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ii-motivation"}},[t._v("#")]),t._v(" II. Motivation")]),t._v(" "),e("p",[t._v("According to our user feedback, the lack of a sorting feature is mentioned as one of the biggest deal-breakers for choosing MeiliSearch as a search engine. A search engine must be able to offer this feature, especially for e-commerce use. Moreover, competitors all offer it. Today, users must find workarounds that take time to develop and maintain to sort search results.")]),t._v(" "),e("p",[t._v("We want to offer a simple and versatile solution for their needs.")]),t._v(" "),e("h3",{attrs:{id:"iii-explanation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#iii-explanation"}},[t._v("#")]),t._v(" III. Explanation")]),t._v(" "),e("h4",{attrs:{id:"as-a-developer-i-want-to-configure-the-sortable-attributes-so-that-the-end-user-can-sort-results"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#as-a-developer-i-want-to-configure-the-sortable-attributes-so-that-the-end-user-can-sort-results"}},[t._v("#")]),t._v(" "),e("strong",[t._v("As a developer, I want to configure the sortable attributes so that the end-user can sort results.")])]),t._v(" "),e("ul",[e("li",[t._v("Introduce a new "),e("code",[t._v("sortableAttributes")]),t._v(" field in the global settings resource schema.")]),t._v(" "),e("li",[t._v("Introduce a new "),e("code",[t._v("/sortable-attributes")]),t._v(" sub-setting resource.")])]),t._v(" "),e("p",[e("strong",[e("code",[t._v("sortableAttributes")]),t._v(" field definition")])]),t._v(" "),e("ul",[e("li",[t._v("Name: "),e("code",[t._v("sortableAttributes")])]),t._v(" "),e("li",[t._v("Type: Array[String]")]),t._v(" "),e("li",[t._v("Default: []")])]),t._v(" "),e("p",[e("strong",[t._v("GET settings")]),t._v(" "),e("code",[t._v("/indexes/{indexUid}/settings")])]),t._v(" "),e("p",[t._v("200 - Response with empty "),e("code",[t._v("sortableAttributes")]),t._v(" (default case)")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"sortableAttributes"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n ...\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[t._v("200 - Response with already configured "),e("code",[t._v("sortableAttributes")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"sortableAttributes"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"price"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"release_date"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n ...\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[t._v("💡 The values order in "),e("code",[t._v("sortableAttributes")]),t._v(" has no impact. The order will be determined at search time from the "),e("code",[t._v("sort")]),t._v(" parameter.")]),t._v(" "),e("p",[e("strong",[t._v("POST settings")]),t._v(" "),e("code",[t._v("/indexes/{indexUid}/settings")])]),t._v(" "),e("p",[t._v("Request body")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t"),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"sortableAttributes"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"price"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"release_date"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"title"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[t._v("202 Accepted - Response body")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"updateId"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("7")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("ul",[e("li",[t._v("💡 Sending an inexistent field WON'T throw an error. It is possible to define settings before indexing documents so we accept fields that may not yet exist within a document.")]),t._v(" "),e("li",[t._v("💡 "),e("code",[t._v("sortableAttributes")]),t._v(" accepts "),e("code",[t._v("null")]),t._v(" and "),e("code",[t._v("[]")]),t._v(" values to be reset.\n🔴 Sending other than string value as array item results in a 400 bad request - "),e("strong",[t._v("invalid_request_error")]),t._v(".")])]),t._v(" "),e("p",[e("strong",[t._v("DELETE settings")]),t._v(" "),e("code",[t._v("/indexes/{indexUid}/settings")])]),t._v(" "),e("p",[t._v("💡 Resetting all settings will result to the default case e.g. "),e("code",[t._v("sortableAttributes: []")])]),t._v(" "),e("p",[t._v("202 Accepted - Response body")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"updateId"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("8")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[e("strong",[t._v("GET settings/sortable-attributes")]),t._v(" "),e("code",[t._v("/indexes/{indexUid}/settings/sortable-attributes")])]),t._v(" "),e("p",[t._v("200 - Response body (Default case)")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),e("p",[t._v("200 - Response body with "),e("code",[t._v("sortableAttributes")]),t._v(" already configured")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"price"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"release_date"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),e("ul",[e("li",[t._v("🔴 If a master key is set and missing from the client, the new GET "),e("code",[t._v("settings/sortable-attributes")]),t._v(" API method is protected and returns a 401 Unauthorized "),e("code",[t._v("missing_authorization_header")]),t._v(".")]),t._v(" "),e("li",[t._v("🔴 If the index is not found, a 404 Not Found response is returned.")])]),t._v(" "),e("p",[e("strong",[t._v("POST settings/sortable-attributes")]),t._v(" "),e("code",[t._v("/indexes/{indexUid}/settings/sortable-attributes")])]),t._v(" "),e("p",[t._v("Request body")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v('[\n "price",\n "release_date",\n "title"\n]\n')])])]),e("p",[t._v("202 Accepted - Response body")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"updateId"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("7")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("ul",[e("li",[t._v("💡 Sending an inexistent field WON'T throw an error. It is possible to define settings before indexing documents so we accept fields that may not yet exist within a document.")]),t._v(" "),e("li",[t._v("💡 POST request body accept null and [] values to reset the "),e("code",[t._v("sortableAttributes")]),t._v(".")]),t._v(" "),e("li",[t._v("🔴 Sending other than string value as array item results in a 400 bad request - "),e("strong",[t._v("invalid_request_error")]),t._v(".")]),t._v(" "),e("li",[t._v("🔴 If a master key is set and missing from the client, the new POST "),e("code",[t._v("settings/sortable-attributes")]),t._v(" API method is protected and returns a 401 Unauthorized "),e("code",[t._v("missing_authorization_header")]),t._v(".")]),t._v(" "),e("li",[t._v("🔴 If the index is not found, a 404 Not Found response is returned.")])]),t._v(" "),e("p",[e("strong",[t._v("DEL settings/sortable-attributes")]),t._v(" "),e("code",[t._v("/indexes/{indexUid}/settings/sortable-attributes")])]),t._v(" "),e("p",[t._v("202 Accepted - Response body")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"updateId"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("8")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("ul",[e("li",[t._v("🔴 If a master key is set and missing from the client, the new DELETE "),e("code",[t._v("settings/sortable-attributes")]),t._v(" API method is protected and returns a 401 Unauthorized "),e("code",[t._v("missing_authorization_header")]),t._v(".")]),t._v(" "),e("li",[t._v("🔴 If the index is not found, a 404 Not Found response is returned.")])]),t._v(" "),e("h4",{attrs:{id:"as-an-end-user-i-want-to-specify-a-sort-parameter-at-search-time-so-that-i-can-sort-search-result-in-ascending-descending-order-from-document-attributes-whether-they-are-numeric-or-string"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#as-an-end-user-i-want-to-specify-a-sort-parameter-at-search-time-so-that-i-can-sort-search-result-in-ascending-descending-order-from-document-attributes-whether-they-are-numeric-or-string"}},[t._v("#")]),t._v(" "),e("strong",[t._v("As an End-User, I want to specify a "),e("code",[t._v("sort")]),t._v(" parameter at search time so that I can sort search result in ascending/descending order from document attributes, whether they are "),e("code",[t._v("numeric")]),t._v(" or "),e("code",[t._v("string")]),t._v(".")])]),t._v(" "),e("ul",[e("li",[t._v("Introduce a "),e("code",[t._v("sort")]),t._v(" parameter on GET/POST "),e("code",[t._v("/search")]),t._v(" methods.")])]),t._v(" "),e("blockquote",[e("p",[t._v("💡 In the case where an attribute is specified as a sort criterion at search time and if this attribute is of a different type between several documents, the numeric type will always be favored first by the engine. This means that documents with numeric values for this attribute will be sorted before those with string values. This can lead to awkward sorting behavior, so the user should make sure to have the same type on the attribute he wants to sort on for all these documents.")])]),t._v(" "),e("blockquote",[e("p",[t._v("💡 In the case where an attribute is specified as a sort criterion at search time and does not exist on a document, the document will be placed at the end of the ranking rule sort.")])]),t._v(" "),e("p",[e("strong",[t._v("GET Search /indexes/{indexUid}/search")])]),t._v(" "),e("p",[e("code",[t._v("sort")]),t._v(" - String - E.g. "),e("code",[t._v('sort="price:asc,release_date:desc"')])]),t._v(" "),e("blockquote",[e("p",[e("code",[t._v(":asc")])])]),t._v(" "),e("p",[e("strong",[t._v("POST Search /indexes/{indexUid}/search")])]),t._v(" "),e("p",[e("code",[t._v("sort")]),t._v(" - Array[String] - E.g.")]),t._v(" "),e("p",[t._v("Request body")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"sort"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"price:asc"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"release_date:desc"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("ul",[e("li",[t._v("🔴 Sending a sort parameter while the "),e("code",[t._v("sort")]),t._v(" ranking rule is not specified in the ranking rules settings will lead to a 400 Bad Request - "),e("strong",[t._v("invalid_sort")]),t._v(" error.")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"You must specify where `sort` is listed in the rankingRules setting to use the sort parameter at search time."')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"errorCode"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_sort"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"errorType"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request_error"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"errorLink"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_sort"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("ul",[e("li",[t._v("🔴 Sending a value not set in "),e("code",[t._v("sortableAttribute")]),t._v(" will lead to a 400 Bad Request - "),e("strong",[t._v("invalid_sort")]),t._v(" error.")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Attribute :attribute is not sortable, available sortable attributes are: ..., ..."')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"errorCode"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_sort"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"errorType"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request_error"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"errorLink"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_sort"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("ul",[e("li",[e("p",[e("code",[t._v(":attribute")]),t._v(" is inferred when the message is generated.")])]),t._v(" "),e("li",[e("p",[t._v("🔴 Sending a wrong formatted value will lead to a 400 Bad Request - "),e("strong",[t._v("invalid_sort")]),t._v(".")])])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Invalid syntax for the sort parameter: :syntaxErrorHelper."')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"errorCode"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_sort"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"errorType"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request_error"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"errorLink"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_sort"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("ul",[e("li",[e("code",[t._v(":syntaxErrorhelper")]),t._v(" is inferred when the message is generated.")])]),t._v(" "),e("p",[t._v("We want to align the way custom ordering rules are written with the syntax of the "),e("code",[t._v("sort")]),t._v(" search parameter.")]),t._v(" "),e("p",[t._v("Current custom ranking rule definition syntax")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"asc(title)"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),e("p",[t._v("become")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"title:asc"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),e("p",[e("strong",[t._v("Search example with "),e("code",[t._v("sort")])])]),t._v(" "),e("p",[t._v("With this set of document")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Vans Classic II sweatshirt in black"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"price"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("52.00")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"black"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"sizes"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"xs"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"s"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"xl"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"reviews_rating"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("4.5")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The North Face Drew Peak hoodie in green"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"price"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("36.00")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"reviews_rating"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("4.89")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Nike Club hoodie in navy"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"price"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("52.00")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"navy"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"reviews_rating"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("4.7")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),e("p",[t._v("With this ranking rules definition")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"sort"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"typo"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"words"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"proximity"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"attribute"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exactness"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),e("p",[t._v("And with this "),e("code",[t._v("sortableAttributes")]),t._v(" definition")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"price"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"reviews_rating"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),e("p",[e("strong",[t._v("POST Search")])]),t._v(" "),e("p",[t._v("Request Body")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"sort"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"price:asc"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"reviews_rating:desc"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[t._v("200 - Response")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The North Face Drew Peak hoodie in green"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"price"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("36.00")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"reviews_rating"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("4.89")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Nike Club hoodie in navy"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"price"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("52.00")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"navy"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"reviews_rating"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("4.7")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Vans Classic II sweatshirt in black"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"price"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("52.00")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"black"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"sizes"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"xs"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"s"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"xl"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"reviews_rating"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("4.5")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[t._v("As we can see "),e("code",[t._v("sort")]),t._v(" is the most important criterion in play according to the ranking rules ordering. Moreover, we see that the "),e("code",[t._v("sort")]),t._v(" search parameter is able to handle several attributes. The priorities are determined from left to right, so the "),e("code",[t._v("price")]),t._v(" field is more important, if N documents share the same price value they are sorted by "),e("code",[t._v("reviews_rating")]),t._v(" and so on.")]),t._v(" "),e("h4",{attrs:{id:"as-a-developer-i-want-to-change-the-position-of-the-sort-ranking-rule-so-that-i-tweak-the-behavior-of-the-sort-ranking-rule-between-exhaustivity-and-relevancy"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#as-a-developer-i-want-to-change-the-position-of-the-sort-ranking-rule-so-that-i-tweak-the-behavior-of-the-sort-ranking-rule-between-exhaustivity-and-relevancy"}},[t._v("#")]),t._v(" "),e("strong",[t._v("As a Developer, I want to change the position of the "),e("code",[t._v("sort")]),t._v(" ranking rule so that I tweak the behavior of the "),e("code",[t._v("sort")]),t._v(" ranking rule between exhaustivity and relevancy.")])]),t._v(" "),e("p",[e("strong",[t._v("GET settings/ranking-rules")]),t._v(" "),e("code",[t._v("/indexes/{indexUid}/settings/ranking-rules")])]),t._v(" "),e("p",[t._v("200 - Response body (Default case)")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"words"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"typo"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"proximity"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"attribute"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"sort"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exactness"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),e("p",[e("strong",[t._v("POST settings/ranking-rules")])]),t._v(" "),e("p",[t._v("Request body")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"sort"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"words"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"typo"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"proximity"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"attribute"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exactness"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),e("p",[t._v("202 Accepted - Response body")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"updateId"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("7")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("ul",[e("li",[t._v("ℹ️ The position of the sort ranking rule is significant. The higher it is, the more critical it will be. The lower it is, the less important it will be and other rules will take priority. This allows the developer to adjust the behavior between exhaustivity and relevancy with the sort criterion. If the "),e("code",[t._v("sort")]),t._v(" ranking rule is in the last position you will have a very relevant sort; that is, results will emphasize relevancy over your sort criteria. Likewise, if "),e("code",[t._v("sort")]),t._v(" is in the first position, you will have a very exhaustive search that gives precedence to results less relevant to the query terms but more in line with your sort criteria.")])]),t._v(" "),e("p",[e("strong",[t._v("Real condition explanation")])]),t._v(" "),e("p",[t._v("e.g. Relevant Sort")]),t._v(" "),e("p",[t._v("I want a relevant sort (sort on relevant items). I put sort at the latest level of my ranking rules.")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"typo"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"words"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"proximity"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"attribute"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exactness"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"sort"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),e("p",[t._v("At search time, if I use (knowing that price and reviews_rating have been set as sortable-attributes previously)")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Mac Book"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"sort"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"price:asc"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"reviews_rating:desc"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[t._v("Ranking rules can virtually be represented that way for this search request.")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"typo"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"words"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"proximity"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"attribute"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exactness"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"price:asc"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//First part of the `sort` ranking rule.")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"reviews_rating:desc"')]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Second part of the `sort`ranking rule.")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),e("p",[t._v("Note that if I change the "),e("code",[t._v("sort")]),t._v(" search parameter's value order, it changes the inner element of the "),e("code",[t._v("sort")]),t._v(" ranking rule.")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Mac Book"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"sort"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"reviews_rating:desc"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"price:asc"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"typo"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"words"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"proximity"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"attribute"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exactness"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"reviews_rating:desc"')]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//The ordering of inner elements of the sort ranking rule is made from the order of the `sort` query/request parameter.")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"price:asc"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),e("h3",{attrs:{id:"iv-finalized-key-changes"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#iv-finalized-key-changes"}},[t._v("#")]),t._v(" IV. Finalized Key Changes")]),t._v(" "),e("ul",[e("li",[t._v("Add "),e("code",[t._v("sortableAttributes")]),t._v(" parameter in settings schema.")]),t._v(" "),e("li",[t._v("Add "),e("code",[t._v("sortable-attributes")]),t._v(" API ressource.")]),t._v(" "),e("li",[t._v("Add the "),e("code",[t._v("sort")]),t._v(" ranking rule after "),e("code",[t._v("attribute")]),t._v(" ranking rule by default to promote relevant sort.")]),t._v(" "),e("li",[t._v("Add "),e("code",[t._v("sort")]),t._v(" query/request parameter on "),e("code",[t._v("/search")]),t._v(" resource. Support "),e("code",[t._v("string")]),t._v(" and "),e("code",[t._v("number")]),t._v(". "),e("code",[t._v("string")]),t._v(" can be sorted in lexicographical order.")]),t._v(" "),e("li",[t._v("Change custom ranking rule format. e.g. "),e("code",[t._v("asc(price)")]),t._v(" become "),e("code",[t._v("price:asc")])]),t._v(" "),e("li",[t._v("Add a new error "),e("code",[t._v("invalid_sort")]),t._v(" similar to "),e("code",[t._v("invalid_filter")]),t._v(".")]),t._v(" "),e("li",[t._v("The numeric type is preferred to the string type by the "),e("code",[t._v("sort")]),t._v(" ranking rule. If an attribute has different types among the documents, those containing a numeric value will be placed before the documents containing a string value type.")]),t._v(" "),e("li",[t._v("A document not containing an attribute requested in the "),e("code",[t._v("sort")]),t._v(" parameter will be placed last during the tie-breaking of the "),e("code",[t._v("sort")]),t._v(" ranking-rule.")])]),t._v(" "),e("h2",{attrs:{id:"_2-technical-details"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-details"}},[t._v("#")]),t._v(" 2. Technical details")]),t._v(" "),e("h3",{attrs:{id:"i-measuring"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#i-measuring"}},[t._v("#")]),t._v(" I. Measuring")]),t._v(" "),e("ul",[e("li",[t._v("Number of sorted attributes used in "),e("code",[t._v("sort")]),t._v(" search parameter to calculate an avg per server.")]),t._v(" "),e("li",[e("code",[t._v("ranking-rules")]),t._v(" setting definition to evaluate position customization.")]),t._v(" "),e("li",[t._v("Number of "),e("code",[t._v("sortableAttributes")]),t._v(" to calculate an avg per server.")])]),t._v(" "),e("h2",{attrs:{id:"_3-future-possibilities"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[t._v("#")]),t._v(" 3. Future Possibilities")]),t._v(" "),e("ul",[e("li",[t._v("Support sort on nested fields")]),t._v(" "),e("li",[t._v("Support computational functions avg, sum, min, max, median. For now, the workaround is to pre-compute values in the document before indexing and sort them at search time with a "),e("code",[t._v("sort")]),t._v(' on the pre-computed field. e.g. sort="precomputed_avg_price:desc".')]),t._v(" "),e("li",[t._v("Ability to set a custom ranking rules order at search time. Out of scope from the "),e("code",[t._v("sort")]),t._v(".")])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/26.719ff326.js b/docs/assets/js/26.949faf8b.js similarity index 99% rename from docs/assets/js/26.719ff326.js rename to docs/assets/js/26.949faf8b.js index 729914f27..a1a5b8180 100644 --- a/docs/assets/js/26.719ff326.js +++ b/docs/assets/js/26.949faf8b.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[26],{450:function(t,s,e){"use strict";e.r(s);var a=e(62),r=Object(a.a)({},(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"tasks-api"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#tasks-api"}},[t._v("#")]),t._v(" Tasks API")]),t._v(" "),e("h2",{attrs:{id:"_1-functional-specification"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_1-functional-specification"}},[t._v("#")]),t._v(" 1. Functional Specification")]),t._v(" "),e("h3",{attrs:{id:"i-summary"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#i-summary"}},[t._v("#")]),t._v(" I. Summary")]),t._v(" "),e("p",[t._v("This specification describes the behavior of the task queue and the API endpoints for handling asynchronous operations.")]),t._v(" "),e("h3",{attrs:{id:"ii-motivation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ii-motivation"}},[t._v("#")]),t._v(" II. Motivation")]),t._v(" "),e("p",[t._v("As writing is asynchronous for most of Meilisearch's operations, this API allows users to track the progress of asynchronous tasks, know and understand why a task has failed, and cancel specific tasks being enqueued or processing. It's also possible to delete tasks being in a finished state.")]),t._v(" "),e("h3",{attrs:{id:"iii-explanation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#iii-explanation"}},[t._v("#")]),t._v(" III. Explanation")]),t._v(" "),e("h4",{attrs:{id:"_1-task-object-definition"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_1-task-object-definition"}},[t._v("#")]),t._v(" 1. "),e("code",[t._v("task")]),t._v(" object definition")]),t._v(" "),e("h5",{attrs:{id:"fully-qualified-task-object"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#fully-qualified-task-object"}},[t._v("#")]),t._v(" "),e("strong",[t._v("Fully Qualified "),e("code",[t._v("task")]),t._v(" object")])]),t._v(" "),e("blockquote",[e("p",[t._v("This fully qualified version appears as a response object on "),e("code",[t._v("task")]),t._v(" dedicated endpoints.")])]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("field")]),t._v(" "),e("th",[t._v("type")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("uid")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("Unique sequential identifier")])]),t._v(" "),e("tr",[e("td",[t._v("indexUid")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("Unique index identifier. This field is "),e("code",[t._v("null")]),t._v(" when the task is a "),e("a",{attrs:{href:"#global-task"}},[t._v("global task")]),t._v(".")])]),t._v(" "),e("tr",[e("td",[t._v("status")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("Status of the task. Possible values are "),e("code",[t._v("enqueued")]),t._v(", "),e("code",[t._v("processing")]),t._v(", "),e("code",[t._v("succeeded")]),t._v(", "),e("code",[t._v("failed")]),t._v(", "),e("code",[t._v("canceled")])])]),t._v(" "),e("tr",[e("td",[t._v("type")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("Type of the task. Possible values are "),e("code",[t._v("indexCreation")]),t._v(", "),e("code",[t._v("indexUpdate")]),t._v(", "),e("code",[t._v("indexDeletion")]),t._v(", "),e("code",[t._v("indexSwap")]),t._v(", "),e("code",[t._v("documentAdditionOrUpdate")]),t._v(", "),e("code",[t._v("documentDeletion")]),t._v(", "),e("code",[t._v("settingsUpdate")]),t._v(", "),e("code",[t._v("dumpCreation")]),t._v(", "),e("code",[t._v("taskCancelation")]),t._v(", "),e("code",[t._v("taskDeletion")]),t._v(", "),e("code",[t._v("snapshotCreation")])])]),t._v(" "),e("tr",[e("td",[t._v("canceledBy")]),t._v(" "),e("td",[t._v("integer")]),t._v(" "),e("td",[t._v("Unique identifier of the task that canceled this task. Default is set to "),e("code",[t._v("null")]),t._v(".")])]),t._v(" "),e("tr",[e("td",[t._v("details")]),t._v(" "),e("td",[t._v("object")]),t._v(" "),e("td",[t._v("Details information for a task payload. See Task Details part.")])]),t._v(" "),e("tr",[e("td",[t._v("error")]),t._v(" "),e("td",[t._v("object")]),t._v(" "),e("td",[t._v("Error object containing error details and context when a task has a "),e("code",[t._v("failed")]),t._v(" status. See "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html"}},[t._v("0061-error-format-and-definitions.md")]),t._v(". Default is set to "),e("code",[t._v("null")]),t._v(".")],1)]),t._v(" "),e("tr",[e("td",[t._v("duration")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("Total elapsed time the engine was in processing state expressed as an "),e("code",[t._v("ISO-8601")]),t._v(" duration format. Times below the second can be expressed with the "),e("code",[t._v(".")]),t._v(" notation, e.g., "),e("code",[t._v("PT0.5S")]),t._v(" to express "),e("code",[t._v("500ms")]),t._v(". Default is set to "),e("code",[t._v("null")]),t._v(".")])]),t._v(" "),e("tr",[e("td",[t._v("enqueuedAt")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("Represent the date and time as "),e("code",[t._v("RFC 3339")]),t._v(" format when the task has been enqueued")])]),t._v(" "),e("tr",[e("td",[t._v("startedAt")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("Represent the date and time as "),e("code",[t._v("RFC 3339")]),t._v(" format when the task has been dequeued and started to be processed. Default is set to "),e("code",[t._v("null")]),t._v(".")])]),t._v(" "),e("tr",[e("td",[t._v("finishedAt")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("Represent the date and time as "),e("code",[t._v("RFC 3339")]),t._v(" format when the task has a "),e("code",[t._v("failed")]),t._v(", "),e("code",[t._v("succeeded")]),t._v(" or "),e("code",[t._v("canceled")]),t._v(" status. Default is set to "),e("code",[t._v("null")]),t._v(".")])])])]),t._v(" "),e("blockquote",[e("p",[t._v("💡 The order of the fields must be returned in this order.")])]),t._v(" "),e("h6",{attrs:{id:"global-task"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#global-task"}},[t._v("#")]),t._v(" Global task")]),t._v(" "),e("p",[t._v("Some specific tasks are not associated with a particular index and apply to all. They are considered global.")]),t._v(" "),e("p",[t._v("The fully qualified and summarized task objects linked to this kind of task display a "),e("code",[t._v("null")]),t._v(" value for the "),e("code",[t._v("indexUid")]),t._v(" field.")]),t._v(" "),e("p",[t._v("List of global tasks by "),e("code",[t._v("type")]),t._v(":")]),t._v(" "),e("ul",[e("li",[e("code",[t._v("dumpCreation")])]),t._v(" "),e("li",[e("code",[t._v("taskCancelation")])]),t._v(" "),e("li",[e("code",[t._v("taskDeletion")])])]),t._v(" "),e("h5",{attrs:{id:"summarized-task-object-for-202-accepted"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#summarized-task-object-for-202-accepted"}},[t._v("#")]),t._v(" Summarized "),e("code",[t._v("task")]),t._v(" Object for "),e("code",[t._v("202 Accepted")])]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("field")]),t._v(" "),e("th",[t._v("type")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("taskUid")]),t._v(" "),e("td",[t._v("integer")]),t._v(" "),e("td",[t._v("Unique sequential identifier")])]),t._v(" "),e("tr",[e("td",[t._v("indexUid")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("Unique index identifier. This field is "),e("code",[t._v("null")]),t._v(" when the task is a "),e("a",{attrs:{href:"#global-task"}},[t._v("global task")])])]),t._v(" "),e("tr",[e("td",[t._v("status")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("Status of the task. Value is "),e("code",[t._v("enqueued")])])]),t._v(" "),e("tr",[e("td",[t._v("type")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("Type of the task")])]),t._v(" "),e("tr",[e("td",[t._v("enqueuedAt")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("Represent the date and time as "),e("code",[t._v("RFC 3339")]),t._v(" format when the task has been enqueued")])])])]),t._v(" "),e("blockquote",[e("p",[t._v("💡 The order of the fields must be returned in this order.")]),t._v(" "),e("p",[t._v("💡 This summarized version appears only in "),e("code",[t._v("202 Accepted")]),t._v(" responses.")])]),t._v(" "),e("h4",{attrs:{id:"_2-status-field-enum"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_2-status-field-enum"}},[t._v("#")]),t._v(" 2. "),e("code",[t._v("status")]),t._v(" field enum")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("label")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("enqueued")])]),t._v(" "),e("tr",[e("td",[t._v("processing")])]),t._v(" "),e("tr",[e("td",[t._v("succeeded")])]),t._v(" "),e("tr",[e("td",[t._v("failed")])]),t._v(" "),e("tr",[e("td",[t._v("canceled")])])])]),t._v(" "),e("h4",{attrs:{id:"_3-type-field-enum"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-type-field-enum"}},[t._v("#")]),t._v(" 3. "),e("code",[t._v("type")]),t._v(" field enum")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("label")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("indexCreation")])]),t._v(" "),e("tr",[e("td",[t._v("indexUpdate")])]),t._v(" "),e("tr",[e("td",[t._v("indexDeletion")])]),t._v(" "),e("tr",[e("td",[t._v("indexSwap")])]),t._v(" "),e("tr",[e("td",[t._v("documentAdditionOrUpdate")])]),t._v(" "),e("tr",[e("td",[t._v("documentDeletion")])]),t._v(" "),e("tr",[e("td",[t._v("settingsUpdate")])]),t._v(" "),e("tr",[e("td",[t._v("dumpCreation")])]),t._v(" "),e("tr",[e("td",[t._v("taskCancelation")])]),t._v(" "),e("tr",[e("td",[t._v("taskDeletion")])]),t._v(" "),e("tr",[e("td",[t._v("snapshotCreation")])])])]),t._v(" "),e("blockquote",[e("p",[t._v("👍 Type values follow a "),e("code",[t._v("camelCase")]),t._v(" naming convention.")])]),t._v(" "),e("h4",{attrs:{id:"_4-details-field-object"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-details-field-object"}},[t._v("#")]),t._v(" 4. "),e("code",[t._v("details")]),t._v(" field object")]),t._v(" "),e("h5",{attrs:{id:"documentadditionorupdate"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#documentadditionorupdate"}},[t._v("#")]),t._v(" documentAdditionOrUpdate")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("name")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("receivedDocuments")]),t._v(" "),e("td",[t._v("Number of documents received.")])]),t._v(" "),e("tr",[e("td",[t._v("indexedDocuments")]),t._v(" "),e("td",[t._v("Number of documents finally indexed. "),e("code",[t._v("null")]),t._v(" when the task status is enqueued or processing.")])])])]),t._v(" "),e("h5",{attrs:{id:"documentdeletion"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#documentdeletion"}},[t._v("#")]),t._v(" documentDeletion")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("name")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("providedIds")]),t._v(" "),e("td",[t._v("Number of provided document ids.")])]),t._v(" "),e("tr",[e("td",[t._v("originalFilter")]),t._v(" "),e("td",[t._v("The filter used to delete documents. "),e("code",[t._v("null")]),t._v(" if "),e("code",[t._v("filter")]),t._v(" was not used for the deletion request.")])]),t._v(" "),e("tr",[e("td",[t._v("deletedDocuments")]),t._v(" "),e("td",[t._v("Number of documents finally deleted.")])])])]),t._v(" "),e("h5",{attrs:{id:"indexcreation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#indexcreation"}},[t._v("#")]),t._v(" indexCreation")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("name")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("primaryKey")]),t._v(" "),e("td",[t._v("Value for the "),e("code",[t._v("primaryKey")]),t._v(" field into the POST index payload. "),e("code",[t._v("null")]),t._v(" if no "),e("code",[t._v("primaryKey")]),t._v(" has been specified at the time of the index creation.")])])])]),t._v(" "),e("h5",{attrs:{id:"indexupdate"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#indexupdate"}},[t._v("#")]),t._v(" indexUpdate")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("name")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("primaryKey")]),t._v(" "),e("td",[t._v("Value for the "),e("code",[t._v("primaryKey")]),t._v(" field into the PUT index payload. "),e("code",[t._v("null")]),t._v(" if no "),e("code",[t._v("primaryKey")]),t._v(" has been specified at the time of the index update.")])])])]),t._v(" "),e("h5",{attrs:{id:"indexdeletion"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#indexdeletion"}},[t._v("#")]),t._v(" indexDeletion")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("name")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("deletedDocuments")]),t._v(" "),e("td",[t._v("Number of deleted documents. Should be all documents contained in the deleted index. "),e("code",[t._v("null")]),t._v(" when the task status is enqueued or processing.")])])])]),t._v(" "),e("h5",{attrs:{id:"indexswap"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#indexswap"}},[t._v("#")]),t._v(" indexSwap")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("name")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("swaps")]),t._v(" "),e("td",[t._v("Object containing the payload originating the "),e("code",[t._v("indexSwap")]),t._v(" task creation")])])])]),t._v(" "),e("h5",{attrs:{id:"settingsupdate"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#settingsupdate"}},[t._v("#")]),t._v(" settingsUpdate")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("name")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("rankingRules")]),t._v(" "),e("td",[e("code",[t._v("rankingRules")]),t._v(" payload array")])]),t._v(" "),e("tr",[e("td",[t._v("searchableAttributes")]),t._v(" "),e("td",[e("code",[t._v("searchableAttributes")]),t._v(" payload array")])]),t._v(" "),e("tr",[e("td",[t._v("filterableAttributes")]),t._v(" "),e("td",[e("code",[t._v("filterableAttributes")]),t._v(" payload array")])]),t._v(" "),e("tr",[e("td",[t._v("sortableAttributes")]),t._v(" "),e("td",[e("code",[t._v("sortableAttributes")]),t._v(" payload array")])]),t._v(" "),e("tr",[e("td",[t._v("stopWords")]),t._v(" "),e("td",[e("code",[t._v("stopWords")]),t._v(" payload array")])]),t._v(" "),e("tr",[e("td",[t._v("synonyms")]),t._v(" "),e("td",[e("code",[t._v("synonyms")]),t._v(" payload object")])]),t._v(" "),e("tr",[e("td",[t._v("distinctAttribute")]),t._v(" "),e("td",[e("code",[t._v("distrinctAttribute")]),t._v(" payload string")])]),t._v(" "),e("tr",[e("td",[t._v("displayedAttributes")]),t._v(" "),e("td",[e("code",[t._v("displayedAttributes")]),t._v(" payload array")])]),t._v(" "),e("tr",[e("td",[t._v("typoTolerance")]),t._v(" "),e("td",[e("code",[t._v("typoTolerance")]),t._v(" payload object")])]),t._v(" "),e("tr",[e("td",[t._v("pagination")]),t._v(" "),e("td",[e("code",[t._v("pagination")]),t._v(" payload object")])]),t._v(" "),e("tr",[e("td",[t._v("faceting")]),t._v(" "),e("td",[e("code",[t._v("faceting")]),t._v(" payload object")])])])]),t._v(" "),e("h5",{attrs:{id:"dumpcreation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#dumpcreation"}},[t._v("#")]),t._v(" dumpCreation")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("name")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("dumpUid")]),t._v(" "),e("td",[t._v("The generated uid of the dump. "),e("code",[t._v("null")]),t._v(" when the task status is enqueued, processing, canceled, or failed.")])])])]),t._v(" "),e("h5",{attrs:{id:"taskcancelation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#taskcancelation"}},[t._v("#")]),t._v(" taskCancelation")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("matchedTasks")]),t._v(" "),e("td",[t._v("The number of tasks that can be canceled based on the request. If the API key doesn’t have access to any of the indexes specified in the request via the "),e("code",[t._v("indexUids")]),t._v(" query parameter, those tasks will not be included in "),e("code",[t._v("matchedTasks")]),t._v(".")])]),t._v(" "),e("tr",[e("td",[t._v("canceledTasks")]),t._v(" "),e("td",[t._v("The number of tasks successfully canceled. If the task fails, "),e("code",[t._v("0")]),t._v(" is displayed. "),e("code",[t._v("null")]),t._v(" when the task status is enqueued or processing.")])]),t._v(" "),e("tr",[e("td",[t._v("originalFilter")]),t._v(" "),e("td",[t._v("The extracted URL query parameters used in the originating task cancelation request.")])])])]),t._v(" "),e("h5",{attrs:{id:"taskdeletion"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#taskdeletion"}},[t._v("#")]),t._v(" taskDeletion")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("matchedTasks")]),t._v(" "),e("td",[t._v("The number of tasks that can be deleted based on the request. If the API key doesn’t have access to any of the indexes specified in the request via the "),e("code",[t._v("indexUid")]),t._v(" query parameter, those tasks will not be included in "),e("code",[t._v("matchedTasks")]),t._v(".")])]),t._v(" "),e("tr",[e("td",[t._v("deletedTasks")]),t._v(" "),e("td",[t._v("The number of tasks successfully deleted. If the task fails, "),e("code",[t._v("0")]),t._v(" is displayed. "),e("code",[t._v("null")]),t._v(" when the task status is enqueud or processing.")])]),t._v(" "),e("tr",[e("td",[t._v("originalFilter")]),t._v(" "),e("td",[t._v("The extracted URL query parameters used in the originating task deletion request.")])])])]),t._v(" "),e("h5",{attrs:{id:"snapshotcreation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#snapshotcreation"}},[t._v("#")]),t._v(" snapshotCreation")]),t._v(" "),e("p",[t._v("N/A")]),t._v(" "),e("p",[t._v("The "),e("code",[t._v("details")]),t._v(" object is specified to "),e("code",[t._v("null")]),t._v(" for a "),e("code",[t._v("snapshotCreation")]),t._v(" task.")]),t._v(" "),e("h4",{attrs:{id:"_5-examples"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_5-examples"}},[t._v("#")]),t._v(" 5. Examples")]),t._v(" "),e("p",[t._v("e.g. A fully qualified "),e("code",[t._v("task")]),t._v(" object in an "),e("code",[t._v("enqueued")]),t._v(" state.")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"enqueued"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"settingsUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"details"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"rankingRules"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"typo"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ranking:desc"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"words"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"proximity"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"attribute"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exactness"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"duration"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-10T14:29:17.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"startedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"finishedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[t._v("e.g. A fully qualified "),e("code",[t._v("task")]),t._v(" object in a "),e("code",[t._v("processing")]),t._v(" state.")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"processing"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"settingsUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"details"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"rankingRules"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"typo"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ranking:desc"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"words"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"proximity"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"attribute"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exactness"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"duration"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-10T14:29:17.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"startedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-10T14:29:18.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"finishedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[t._v("e.g. A fully qualified "),e("code",[t._v("task")]),t._v(" object in a "),e("code",[t._v("succeeded")]),t._v(" state.")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"succeeded"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"settingsUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"details"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"rankingRules"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"typo"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ranking:desc"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"words"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"proximity"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"attribute"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exactness"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"duration"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"PT1S"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-10T14:29:17.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"startedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-10T14:29:18.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"finishedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-10T14:29:19.000000Z"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[t._v("e.g. A fully qualified "),e("code",[t._v("task")]),t._v(" object in a "),e("code",[t._v("failed")]),t._v(" state.")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"failed"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"settingsUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"details"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"rankingRules"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"typo"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ranking:desc"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"words"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"proximity"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"attribute"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wordsPosition"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exactness"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid criterion wordsPosition"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"internal"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"internal_error"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#internal"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"duration"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"PT1S"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-10T14:29:17.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"startedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-10T14:29:18.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"finishedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-10T14:29:19.000000Z"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[t._v("e.g. A fully qualified "),e("code",[t._v("task")]),t._v(" object in a "),e("code",[t._v("canceled")]),t._v(" state.")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"canceled"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"settingsUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"details"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"rankingRules"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"typo"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ranking:desc"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"words"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"proximity"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"attribute"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exactness"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"duration"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"PT1S"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-10T14:29:17.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"startedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-10T14:29:18.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"finishedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-10T14:29:19.000000Z"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[t._v("e.g. A summarized "),e("code",[t._v("task")]),t._v(" object in a "),e("code",[t._v("202 Accepted")]),t._v(" HTTP response returned at index creation.")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"taskUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"enqueued"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"indexCreation"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-11T09:25:53.000000Z"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("hr"),t._v(" "),e("h4",{attrs:{id:"_6-apis-endpoints"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-apis-endpoints"}},[t._v("#")]),t._v(" 6. APIs endpoints")]),t._v(" "),e("h5",{attrs:{id:"_6-1-get-all-tasks-get-tasks"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-1-get-all-tasks-get-tasks"}},[t._v("#")]),t._v(" 6.1. Get all tasks | "),e("code",[t._v("GET")]),t._v(" - "),e("code",[t._v("/tasks")])]),t._v(" "),e("h5",{attrs:{id:"_6-1-1-goals"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-1-1-goals"}},[t._v("#")]),t._v(" 6.1.1. Goals")]),t._v(" "),e("p",[t._v("Allows users to list tasks globally regardless of the indexes involved. Particularly useful to visualize all the tasks.")]),t._v(" "),e("p",[e("code",[t._v("200")]),t._v(" - Response body - "),e("code",[t._v("/tasks")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"results"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies_reviews"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"enqueued"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"details"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"receivedDocuments"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("100")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexedDocuments"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"duration"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-12T10:00:00.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"startedProcessingAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"finishedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"succeeded"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"details"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"receivedDocuments"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("100")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexedDocuments"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("100")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"duration"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"PT16S"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-11T09:25:53.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"startedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-11T10:03:00.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"finishedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-11T10:03:16.000000Z"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("h5",{attrs:{id:"_6-1-2-requirements"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-1-2-requirements"}},[t._v("#")]),t._v(" 6.1.2. Requirements")]),t._v(" "),e("blockquote",[e("p",[t._v("💡 "),e("code",[t._v("task")]),t._v(" objects are contained in a "),e("code",[t._v("results")]),t._v(" array.")]),t._v(" "),e("p",[t._v("💡 "),e("code",[t._v("task")]),t._v(" uid is generated globally. The "),e("code",[t._v("uid")]),t._v(" of the tasks are no longer scoped to an index.")]),t._v(" "),e("p",[t._v("💡 By default, objects are sorted by "),e("code",[t._v("desc")]),t._v(" order on "),e("code",[t._v("uid")]),t._v(" field. So the most recent tasks appear first.")]),t._v(" "),e("p",[t._v("💡 When an index is deleted, its tasks remain accessible on the global "),e("code",[t._v("/tasks")]),t._v(" endpoint.")])]),t._v(" "),e("h5",{attrs:{id:"_6-1-3-errors"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-1-3-errors"}},[t._v("#")]),t._v(" 6.1.3. Errors")]),t._v(" "),e("p",[t._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),t._v(" "),e("ul",[e("li",[t._v("🔴 Accessing this route without the "),e("code",[t._v("Authorization")]),t._v(" header returns a "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),e("li",[t._v("🔴 Accessing this route with a key that does not have the required permissions (i.e. other than the master-key) returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),e("hr"),t._v(" "),e("h5",{attrs:{id:"_6-2-get-a-task-by-uid-get-tasks-uid"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-2-get-a-task-by-uid-get-tasks-uid"}},[t._v("#")]),t._v(" 6.2. Get a task by uid | "),e("code",[t._v("GET")]),t._v(" - "),e("code",[t._v("/tasks/{uid}")])]),t._v(" "),e("h5",{attrs:{id:"_6-2-1-goals"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-2-1-goals"}},[t._v("#")]),t._v(" 6.2.1. Goals")]),t._v(" "),e("p",[t._v("Allows users to get a detailed "),e("code",[t._v("task")]),t._v(" object retrieved by the "),e("code",[t._v("uid")]),t._v(" field regardless of the index involved.")]),t._v(" "),e("p",[e("code",[t._v("200")]),t._v(" - Response body - "),e("code",[t._v("/tasks/1")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"enqueued"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"details"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n ...\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"duration"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-12T10:00:00.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"startedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"finishedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("h5",{attrs:{id:"_6-2-2-errors"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-2-2-errors"}},[t._v("#")]),t._v(" 6.2.2. Errors")]),t._v(" "),e("ul",[e("li",[t._v("🔴 If the task does not exist, the API returns a "),e("code",[t._v("404 Not Found")]),t._v(" - "),e("code",[t._v("task_not_found")]),t._v(" error.")])]),t._v(" "),e("p",[t._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),t._v(" "),e("ul",[e("li",[t._v("🔴 Accessing this route without the "),e("code",[t._v("Authorization")]),t._v(" header returns a "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),e("li",[t._v("🔴 Accessing this route with a key that does not have the required permissions (i.e. other than the master-key) returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),e("hr"),t._v(" "),e("h5",{attrs:{id:"_6-3-cancel-tasks-post-tasks-cancel"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-3-cancel-tasks-post-tasks-cancel"}},[t._v("#")]),t._v(" 6.3. Cancel tasks | "),e("code",[t._v("POST")]),t._v(" - "),e("code",[t._v("/tasks/cancel")])]),t._v(" "),e("h5",{attrs:{id:"_6-3-1-goals"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-3-1-goals"}},[t._v("#")]),t._v(" 6.3.1. Goals")]),t._v(" "),e("p",[t._v("Allows users to cancel an "),e("code",[t._v("enqueued")]),t._v(" or "),e("code",[t._v("processing")]),t._v(" task. Particularly useful if a long or heavy task blocks the queue.")]),t._v(" "),e("p",[e("code",[t._v("202")]),t._v(" - Response body - "),e("code",[t._v("/tasks/cancel")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"taskUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"enqueued"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"taskCancelation"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-12T10:00:00.000000Z"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("h5",{attrs:{id:"_6-3-2-response-definition"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-3-2-response-definition"}},[t._v("#")]),t._v(" 6.3.2. Response Definition")]),t._v(" "),e("p",[t._v("When the request is successful, Meilisearch returns the HTTP code 202 Accepted. The response's content is the summarized representation of the received asynchronous task.")]),t._v(" "),e("h5",{attrs:{id:"_6-3-3-auto-batching"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-3-3-auto-batching"}},[t._v("#")]),t._v(" 6.3.3. Auto-batching")]),t._v(" "),e("p",[t._v("If the task you’re canceling is part of a batch, "),e("strong",[t._v("the whole batch is stopped.")]),t._v(" Once it is stopped, Meilisearch automatically creates a new batch with the remaining tasks. The canceled tasks are not part of the new batch.")]),t._v(" "),e("p",[t._v("This means:")]),t._v(" "),e("ul",[e("li",[t._v("When the new batch is created, it may contain tasks that have been enqueued between the batch cancelation and recreation.")]),t._v(" "),e("li",[t._v("Any progress the batch made before being canceled is lost.")])]),t._v(" "),e("h5",{attrs:{id:"_6-3-4-errors"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-3-4-errors"}},[t._v("#")]),t._v(" 6.3.4. Errors")]),t._v(" "),e("p",[t._v("If a user tries canceling a "),e("code",[t._v("succeeded")]),t._v(", "),e("code",[t._v("failed")]),t._v(", or "),e("code",[t._v("canceled")]),t._v(" task, it won’t throw an error. Task cancelation is an atomic transaction; all tasks are successfully canceled, or none are.")]),t._v(" "),e("ul",[e("li",[t._v("🔴 Sending a task cancelation without filtering query parameters returns a "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_task_filters"}},[t._v("missing_task_filters")]),t._v(" error.")],1)]),t._v(" "),e("p",[t._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),t._v(" "),e("ul",[e("li",[t._v("🔴 Accessing this route without the "),e("code",[t._v("Authorization")]),t._v(" header returns a "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),e("li",[t._v("🔴 Accessing this route with a key that does not have the required permissions (i.e. other than the master-key) returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),e("hr"),t._v(" "),e("h5",{attrs:{id:"_6-4-delete-tasks-delete-tasks"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-4-delete-tasks-delete-tasks"}},[t._v("#")]),t._v(" 6.4 Delete tasks | "),e("code",[t._v("DELETE")]),t._v(" - "),e("code",[t._v("/tasks")])]),t._v(" "),e("h5",{attrs:{id:"_6-4-1-goals"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-4-1-goals"}},[t._v("#")]),t._v(" 6.4.1 Goals")]),t._v(" "),e("p",[t._v("Allows users to delete a finished ("),e("code",[t._v("succeeded")]),t._v(", "),e("code",[t._v("processing")]),t._v(" or "),e("code",[t._v("canceled")]),t._v(") tasks.")]),t._v(" "),e("p",[e("code",[t._v("202")]),t._v(" - Response body - "),e("code",[t._v("/tasks")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"taskUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"enqueued"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"taskDeletion"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-12T10:00:00.000000Z"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("h5",{attrs:{id:"_6-4-2-response-definition"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-4-2-response-definition"}},[t._v("#")]),t._v(" 6.4.2. Response Definition")]),t._v(" "),e("p",[t._v("When the request is successful, Meilisearch returns the HTTP code 202 Accepted. The response's content is the summarized representation of the received asynchronous task.")]),t._v(" "),e("h5",{attrs:{id:"_6-4-3-errors"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-4-3-errors"}},[t._v("#")]),t._v(" 6.4.3. Errors")]),t._v(" "),e("p",[t._v("If a user tries deleting an "),e("code",[t._v("enqueued")]),t._v(", or "),e("code",[t._v("processing")]),t._v(" task, it won’t throw an error. Task deletion is an atomic transaction; all tasks are successfully deleted, or none aren't.")]),t._v(" "),e("ul",[e("li",[t._v("🔴 Sending a task deletion without filtering query parameters returns a "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_task_filters"}},[t._v("missing_task_filters")]),t._v(" error.")],1),t._v(" "),e("li",[t._v("🔴 Sending a task once the task queue is full will throw a "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#no_space_left_on_device"}},[e("code",[t._v("no_space_left_on_device")])]),t._v(" error. Once this state is reached, the only possible action is to delete tasks.")],1)]),t._v(" "),e("p",[t._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),t._v(" "),e("ul",[e("li",[t._v("🔴 Accessing this route without the "),e("code",[t._v("Authorization")]),t._v(" header returns a "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),e("li",[t._v("🔴 Accessing this route with a key that does not have the required permissions (i.e. other than the master-key) returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),e("hr"),t._v(" "),e("h4",{attrs:{id:"_7-task-not-found-error"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_7-task-not-found-error"}},[t._v("#")]),t._v(" 7. "),e("code",[t._v("task_not_found")]),t._v(" error")]),t._v(" "),e("h5",{attrs:{id:"context"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#context"}},[t._v("#")]),t._v(" Context")]),t._v(" "),e("p",[t._v("This error happens when a requested task can't be found. Fetching a deleted task returns a "),e("code",[t._v("task_not_found")]),t._v(" error.")]),t._v(" "),e("h5",{attrs:{id:"error-definition"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#error-definition"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),e("p",[t._v("HTTP Code: "),e("code",[t._v("404 Not Found")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Task :taskUid not found."')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"task_not_found"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#task_not_found"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("ul",[e("li",[t._v("The "),e("code",[t._v(":taskUid")]),t._v(" is inferred when the message is generated.")])]),t._v(" "),e("h4",{attrs:{id:"_8-asynchronous-write-operations-on-index-resource"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_8-asynchronous-write-operations-on-index-resource"}},[t._v("#")]),t._v(" 8. Asynchronous Write Operations on Index resource")]),t._v(" "),e("ul",[e("li",[t._v("💡 Automatic index creation using the "),e("code",[t._v("/indexes/:indexToCreate/documents")]),t._v(" route generates a "),e("code",[t._v("documentAdditionOrUpdate")]),t._v(" task that also handles index creation.")])]),t._v(" "),e("h4",{attrs:{id:"_9-paginate-task-resource-lists"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_9-paginate-task-resource-lists"}},[t._v("#")]),t._v(" 9. Paginate "),e("code",[t._v("task")]),t._v(" resource lists")]),t._v(" "),e("p",[t._v("The API endpoint "),e("code",[t._v("GET /tasks")]),t._v(" is browsable using a keyset-based pagination.")]),t._v(" "),e("h5",{attrs:{id:"_9-1-why-a-seek-keyset-based-pagination"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_9-1-why-a-seek-keyset-based-pagination"}},[t._v("#")]),t._v(" 9.1. Why a Seek/Keyset based pagination?")]),t._v(" "),e("p",[t._v("Keyset-based pagination is more appropriate when the data can grow or shrink quickly in terms of magnitude.")]),t._v(" "),e("h6",{attrs:{id:"_9-1-1-pros"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_9-1-1-pros"}},[t._v("#")]),t._v(" 9.1.1. Pros")]),t._v(" "),e("p",[t._v("The performance is better than the not-so-good but old pagination with "),e("code",[t._v("offset")]),t._v("/"),e("code",[t._v("limit")]),t._v(".")]),t._v(" "),e("p",[t._v("Seek/Keyset pagination keeps the results consistent between each page as the data evolves. It avoids the "),e("a",{attrs:{href:"https://use-the-index-luke.com/sql/partial-results/fetch-next-page",target:"_blank",rel:"noopener noreferrer"}},[t._v("Page Drift effect"),e("OutboundLink")],1),t._v(", especially when the data is sorted from the most recent to the oldest.")]),t._v(" "),e("p",[t._v("Moreover, the performance is superior to traditional pagination since the computational complexity remains constant to reach the identifier marking the beginning of the new slice to be returned from a hash table.")]),t._v(" "),e("h6",{attrs:{id:"_9-1-2-cons"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_9-1-2-cons"}},[t._v("#")]),t._v(" 9.1.2. Cons")]),t._v(" "),e("p",[t._v("The main drawback of this type of pagination is that it does not navigate within a finite number of pages. It is also limited to a precise sorting criterion on unique identifiers ordered sequentially.")]),t._v(" "),e("h5",{attrs:{id:"_9-2-response-attributes"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_9-2-response-attributes"}},[t._v("#")]),t._v(" 9.2. Response attributes")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("field")]),t._v(" "),e("th",[t._v("type")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("total")]),t._v(" "),e("td",[t._v("integer")]),t._v(" "),e("td",[t._v("The total number of tasks matching the filter/query")])]),t._v(" "),e("tr",[e("td",[t._v("limit")]),t._v(" "),e("td",[t._v("integer")]),t._v(" "),e("td",[t._v("Default "),e("code",[t._v("20")]),t._v(".")])]),t._v(" "),e("tr",[e("td",[t._v("from")]),t._v(" "),e("td",[t._v("integer")]),t._v(" "),e("td",[t._v("The first task uid returned")])]),t._v(" "),e("tr",[e("td",[t._v("next")]),t._v(" "),e("td",[t._v("integer - nullable")]),t._v(" "),e("td",[t._v("Represents the value to send in "),e("code",[t._v("from")]),t._v(" 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.")])])])]),t._v(" "),e("h5",{attrs:{id:"_9-3-get-query-parameters"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_9-3-get-query-parameters"}},[t._v("#")]),t._v(" 9.3. GET query parameters")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("field")]),t._v(" "),e("th",[t._v("type")]),t._v(" "),e("th",[t._v("required")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("limit")]),t._v(" "),e("td",[t._v("integer")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Default "),e("code",[t._v("20")]),t._v(". Limit on the number of tasks to be returned.")])]),t._v(" "),e("tr",[e("td",[t._v("from")]),t._v(" "),e("td",[t._v("integer")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Limit results to tasks with uids equal to and lower than this uid.")])])])]),t._v(" "),e("h5",{attrs:{id:"_9-4-usage-examples"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_9-4-usage-examples"}},[t._v("#")]),t._v(" 9.4. Usage examples")]),t._v(" "),e("p",[t._v("This part demonstrates keyset paging in action on "),e("code",[t._v("/tasks")]),t._v(". The items "),e("code",[t._v("uid")]),t._v(" remains sorted sequentially and can be used to navigate a list of "),e("code",[t._v("tasks")]),t._v(" objects.")]),t._v(" "),e("hr"),t._v(" "),e("p",[e("strong",[t._v("Initial default slice of "),e("code",[t._v("tasks")])])]),t._v(" "),e("p",[e("code",[t._v("GET")]),t._v(" - "),e("code",[t._v("/tasks")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"results"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1350")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1330")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies_reviews"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"total"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1351")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"limit"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"from"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1350")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"next"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1329")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[e("strong",[t._v("Request the next slice of "),e("code",[t._v("tasks")]),t._v(" items with a limit of "),e("code",[t._v("50")]),t._v(" tasks")])]),t._v(" "),e("p",[e("code",[t._v("GET")]),t._v(" - "),e("code",[t._v("/tasks?from=1329&limit=50")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"results"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1329")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1279")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"settingsUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"total"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1330")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"limit"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("50")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"from"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1329")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"next"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1278")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[e("strong",[t._v("End of seek/keyset pagination")])]),t._v(" "),e("p",[e("code",[t._v("GET")]),t._v(" - "),e("code",[t._v("/tasks?from=20")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"results"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("19")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentsAdditionOrUdpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentsAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"total"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"limit"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"from"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"next"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("ul",[e("li",[t._v("💡 "),e("code",[t._v("next")]),t._v(" response parameter is null because there are no more "),e("code",[t._v("tasks")]),t._v(" to fetch. It means that the response represents the last slice of results for the given resource list.")])]),t._v(" "),e("h5",{attrs:{id:"_9-5-behaviors-for-limit-and-from-query-parameters"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_9-5-behaviors-for-limit-and-from-query-parameters"}},[t._v("#")]),t._v(" 9.5. Behaviors for "),e("code",[t._v("limit")]),t._v(" and "),e("code",[t._v("from")]),t._v(" query parameters")]),t._v(" "),e("h6",{attrs:{id:"_9-5-1-limit"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_9-5-1-limit"}},[t._v("#")]),t._v(" 9.5.1. "),e("code",[t._v("limit")])]),t._v(" "),e("ul",[e("li",[t._v("If "),e("code",[t._v("limit")]),t._v(" is not set, the default value is chosen.")])]),t._v(" "),e("h6",{attrs:{id:"_9-5-2-from"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_9-5-2-from"}},[t._v("#")]),t._v(" 9.5.2. "),e("code",[t._v("from")])]),t._v(" "),e("ul",[e("li",[t._v("If "),e("code",[t._v("from")]),t._v(" is set with an out of bounds task "),e("code",[t._v("uid")]),t._v(", the response returns the tasks that are the nearest to the specified uid, the "),e("code",[t._v("next")]),t._v(" field is set to the next page. It will be equivalent to call the "),e("code",[t._v("/tasks")]),t._v(" route without any parameter.")])]),t._v(" "),e("h6",{attrs:{id:"_9-5-3-errors"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_9-5-3-errors"}},[t._v("#")]),t._v(" 9.5.3. Errors")]),t._v(" "),e("ul",[e("li",[t._v("🔴 Sending a value with a different type than "),e("code",[t._v("Integer")]),t._v(" for "),e("code",[t._v("limit")]),t._v(" returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_limit"}},[t._v("invalid_task_limit")]),t._v(" error.")],1),t._v(" "),e("li",[t._v("🔴 Sending a value with a different type than "),e("code",[t._v("Integer")]),t._v(" for "),e("code",[t._v("from")]),t._v(" returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_from"}},[t._v("invalid_task_from")]),t._v(" error.")],1)]),t._v(" "),e("h4",{attrs:{id:"_10-filtering-task-resources"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-filtering-task-resources"}},[t._v("#")]),t._v(" 10. Filtering task resources")]),t._v(" "),e("p",[t._v("The tasks API endpoints are filterable by "),e("code",[t._v("uids")]),t._v(", "),e("code",[t._v("indexUids")]),t._v(", "),e("code",[t._v("types")]),t._v(", "),e("code",[t._v("statuses")]),t._v(", "),e("code",[t._v("canceledBy")]),t._v(", "),e("code",[t._v("beforeEnqueuedAt")]),t._v(", "),e("code",[t._v("afterEnqueuedAt")]),t._v(", "),e("code",[t._v("beforeStartedAt")]),t._v(", "),e("code",[t._v("afterStartedAt")]),t._v(", "),e("code",[t._v("beforeFinishedAt")]),t._v(", "),e("code",[t._v("afterFinishedAt")]),t._v(" query parameters.")]),t._v(" "),e("h5",{attrs:{id:"_10-1-query-parameters-definition"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-1-query-parameters-definition"}},[t._v("#")]),t._v(" 10.1 Query parameters definition")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("parameter")]),t._v(" "),e("th",[t._v("type")]),t._v(" "),e("th",[t._v("required")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("uids")]),t._v(" "),e("td",[t._v("integer")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Permits to filter tasks by their related unique identifier. By default, when "),e("code",[t._v("uids")]),t._v(" query parameter is not set or set to "),e("code",[t._v("*")]),t._v(", all the tasks are concerned. It is possible to specify several uid by separating them with the "),e("code",[t._v(",")]),t._v(" character.")])]),t._v(" "),e("tr",[e("td",[t._v("indexUids")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Permits to filter tasks by their related index. By default, when "),e("code",[t._v("indexUids")]),t._v(" query parameter is not set or set to "),e("code",[t._v("*")]),t._v(", the tasks of all the indexes are concerned. It is possible to specify several indexUids by separating them with the "),e("code",[t._v(",")]),t._v(" character.")])]),t._v(" "),e("tr",[e("td",[t._v("statuses")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Permits to filter tasks by their status. By default, when "),e("code",[t._v("statuses")]),t._v(" query parameter is not set or set to "),e("code",[t._v("*")]),t._v(", all task statuses are concerned. It's possible to specify several statuses by separating them with the "),e("code",[t._v(",")]),t._v(" character.")])]),t._v(" "),e("tr",[e("td",[t._v("types")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Permits to filter tasks by their related type. By default, when "),e("code",[t._v("types")]),t._v(" query parameter is not set or set to "),e("code",[t._v("*")]),t._v(", all task types are concerned. It's possible to specify several types by separating them with the "),e("code",[t._v(",")]),t._v(" character.")])]),t._v(" "),e("tr",[e("td",[t._v("canceledBy")]),t._v(" "),e("td",[t._v("integer")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Permits to filter tasks by the "),e("code",[t._v("taskCancelation")]),t._v(" uid that canceled them. It's possible to specify several task uids by separating them with the "),e("code",[t._v(",")]),t._v(" character.")])]),t._v(" "),e("tr",[e("td",[t._v("beforeEnqueuedAt")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Filter tasks based on their enqueuedAt time. Retrieve tasks enqueued before the given filter value. By default, when "),e("code",[t._v("beforeEnqueuedAt")]),t._v(" query parameter is not set or set to "),e("code",[t._v("*")]),t._v(", all task are selected.")])]),t._v(" "),e("tr",[e("td",[t._v("afterEnqueuedAt")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Filter tasks based on their enqueuedAt time. Retrieve tasks enqueued after the given filter value. By default, when "),e("code",[t._v("afterEnqueuedAt")]),t._v(" query parameter is not set or set to "),e("code",[t._v("*")]),t._v(", all task are selected.")])]),t._v(" "),e("tr",[e("td",[t._v("beforeStartedAt")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Filter tasks based on their startedAt time. Retrieve tasks started before the given value. By default, when "),e("code",[t._v("beforeStartedAt")]),t._v(" query parameter is not set or set to "),e("code",[t._v("*")]),t._v(", all task are selected.")])]),t._v(" "),e("tr",[e("td",[t._v("afterStartedAt")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Filter tasks based on their startedAt time. Retrieve tasks started after the given filter value. By default, when "),e("code",[t._v("afterStartedAt")]),t._v(" query parameter is not set or set to "),e("code",[t._v("*")]),t._v(", all task are selected.")])]),t._v(" "),e("tr",[e("td",[t._v("beforeFinishedAt")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Filter tasks based on their finishedAt time. Retrieve tasks finished before the given filter value. By default, when "),e("code",[t._v("beforeFinishedAt")]),t._v(" query parameter is not set or set to "),e("code",[t._v("*")]),t._v(", all task are selected.")])]),t._v(" "),e("tr",[e("td",[t._v("afterFinishedAt")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Filter tasks based on their finishedAt time. Retrieve tasks finished after the given filter value. By default, when "),e("code",[t._v("afterFinishedAt")]),t._v(" query parameter is not set or set to "),e("code",[t._v("*")]),t._v(", all task are selected.")])])])]),t._v(" "),e("h5",{attrs:{id:"_10-2-query-parameters-behaviors"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-2-query-parameters-behaviors"}},[t._v("#")]),t._v(" 10.2. Query Parameters Behaviors")]),t._v(" "),e("h6",{attrs:{id:"_10-2-1-uids"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-2-1-uids"}},[t._v("#")]),t._v(" 10.2.1. "),e("code",[t._v("uids")])]),t._v(" "),e("p",[t._v("Filter tasks by their related unique identifier. By default, when "),e("code",[t._v("uids")]),t._v(" query parameter is not set, all the tasks are concerned. It is possible to specify several uid by separating them with the "),e("code",[t._v(",")]),t._v(" character.")]),t._v(" "),e("ul",[e("li",[t._v("Type: Integer")]),t._v(" "),e("li",[t._v("Required: False")]),t._v(" "),e("li",[t._v("Default: "),e("code",[t._v("*")])])]),t._v(" "),e("p",[e("code",[t._v("uids")]),t._v(" is "),e("strong",[t._v("case-unsensitive")]),t._v(".")]),t._v(" "),e("ul",[e("li",[t._v("🔴 Sending values with a different type than "),e("code",[t._v("Integer")]),t._v(" being separated by "),e("code",[t._v(",")]),t._v(" for the "),e("code",[t._v("uids")]),t._v(" parameter returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_uids"}},[e("code",[t._v("invalid_task_uids")])]),t._v(" error.")],1)]),t._v(" "),e("h6",{attrs:{id:"_10-2-2-indexuids"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-2-2-indexuids"}},[t._v("#")]),t._v(" 10.2.2. "),e("code",[t._v("indexUids")])]),t._v(" "),e("p",[t._v("Filter tasks by their related index. By default, when "),e("code",[t._v("indexUids")]),t._v(" query parameter is not set, the tasks of all the indexes are concerned. It is possible to specify several indexUids by separating them with the "),e("code",[t._v(",")]),t._v(" character.")]),t._v(" "),e("ul",[e("li",[t._v("Type: String")]),t._v(" "),e("li",[t._v("Required: False")]),t._v(" "),e("li",[t._v("Default: "),e("code",[t._v("*")])])]),t._v(" "),e("p",[e("code",[t._v("indexUids")]),t._v(" is "),e("strong",[t._v("case-sensitive")]),t._v(".")]),t._v(" "),e("ul",[e("li",[t._v("🔴 Sending an invalid index uid format returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_uids"}},[e("code",[t._v("invalid_task_index_uids")])]),t._v(" error is returned.")],1)]),t._v(" "),e("h6",{attrs:{id:"_10-2-3-statuses"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-2-3-statuses"}},[t._v("#")]),t._v(" 10.2.3. "),e("code",[t._v("statuses")])]),t._v(" "),e("p",[t._v("Filter tasks by their status. By default, when "),e("code",[t._v("statuses")]),t._v(" query parameter is not set, all task statuses are concerned. It's possible to specify several statuses by separating them with the "),e("code",[t._v(",")]),t._v(" character.")]),t._v(" "),e("ul",[e("li",[t._v("Type: String")]),t._v(" "),e("li",[t._v("Required: False")]),t._v(" "),e("li",[t._v("Default: "),e("code",[t._v("*")])])]),t._v(" "),e("p",[e("code",[t._v("statuses")]),t._v(" is "),e("strong",[t._v("case-insensitive")]),t._v(".")]),t._v(" "),e("ul",[e("li",[t._v("🔴 If the "),e("code",[t._v("statuses")]),t._v(" parameter value is not consistent with one of the task statuses, an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_statuses"}},[e("code",[t._v("invalid_task_statuses")])]),t._v(" error is returned.")],1)]),t._v(" "),e("h6",{attrs:{id:"_10-2-4-types"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-2-4-types"}},[t._v("#")]),t._v(" 10.2.4. "),e("code",[t._v("types")])]),t._v(" "),e("p",[t._v("Filter tasks by their related type. By default, when "),e("code",[t._v("types")]),t._v(" query parameter is not set, all task types are concerned. It's possible to specify several types by separating them with the "),e("code",[t._v(",")]),t._v(" character.")]),t._v(" "),e("ul",[e("li",[t._v("Type: String")]),t._v(" "),e("li",[t._v("Required: False")]),t._v(" "),e("li",[t._v("Default: "),e("code",[t._v("*")])])]),t._v(" "),e("p",[e("code",[t._v("types")]),t._v(" is "),e("strong",[t._v("case-insensitive")]),t._v(".")]),t._v(" "),e("ul",[e("li",[t._v("🔴 If the "),e("code",[t._v("types")]),t._v(" parameter value is not consistent with one of the task types, an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_types"}},[e("code",[t._v("invalid_task_types")])]),t._v(" error is returned.")],1)]),t._v(" "),e("h6",{attrs:{id:"_10-2-5-canceledby"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-2-5-canceledby"}},[t._v("#")]),t._v(" 10.2.5. "),e("code",[t._v("canceledBy")])]),t._v(" "),e("p",[t._v("Filter tasks by the "),e("code",[t._v("taskCancelation")]),t._v(" uid that canceled them. It's possible to specify several task uids by separating them with the "),e("code",[t._v(",")]),t._v(" character.")]),t._v(" "),e("ul",[e("li",[t._v("Type: Integer")]),t._v(" "),e("li",[t._v("Required: False")]),t._v(" "),e("li",[t._v("Default: "),e("code",[t._v("null")])])]),t._v(" "),e("p",[e("code",[t._v("canceledBy")]),t._v(" is "),e("strong",[t._v("case-insensitive")]),t._v(".")]),t._v(" "),e("ul",[e("li",[t._v("🔴 Sending a value with a different type than "),e("code",[t._v("Integer")]),t._v(" for the "),e("code",[t._v("canceledBy")]),t._v(" parameter returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_canceled_by"}},[e("code",[t._v("invalid_task_canceled_by")])]),t._v(" error.")],1)]),t._v(" "),e("h6",{attrs:{id:"_10-2-6-date-parameters"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-2-6-date-parameters"}},[t._v("#")]),t._v(" 10.2.6. Date Parameters")]),t._v(" "),e("p",[t._v("Date filters accepts the RFC 3339 format. The following syntaxes are valid:")]),t._v(" "),e("ul",[e("li",[e("code",[t._v("YYYY-MM-DD")])]),t._v(" "),e("li",[e("code",[t._v("YYYY-MM-DDTHH:MM:SSZ")])]),t._v(" "),e("li",[e("code",[t._v("YYYY-MM-DDTHH:MM:SS+01:00")])])]),t._v(" "),e("h6",{attrs:{id:"_10-2-6-1-beforeenqueuedat-and-afterenqueuedat"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-2-6-1-beforeenqueuedat-and-afterenqueuedat"}},[t._v("#")]),t._v(" 10.2.6.1. "),e("code",[t._v("beforeEnqueuedAt")]),t._v(" and "),e("code",[t._v("afterEnqueuedAt")])]),t._v(" "),e("p",[t._v("Filter tasks based on their enqueuedAt time. Retrieve tasks enqueued before/after the given filter value.")]),t._v(" "),e("ul",[e("li",[e("p",[t._v("Type: String")])]),t._v(" "),e("li",[e("p",[t._v("Required: False")])]),t._v(" "),e("li",[e("p",[t._v("Default: "),e("code",[t._v("*")])])]),t._v(" "),e("li",[e("p",[t._v("🔴 The date filters are exclusive. It means the given value will not be included.")])]),t._v(" "),e("li",[e("p",[t._v("🔴 Sending an invalid value for "),e("code",[t._v("beforeEnqueuedAt")]),t._v(" parameter returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_before_enqueued_at"}},[e("code",[t._v("invalid_task_before_enqueued_at")])]),t._v(" error.")],1)]),t._v(" "),e("li",[e("p",[t._v("🔴 Sending an invalid value for "),e("code",[t._v("afterEnqueuedAt")]),t._v(" parameter returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_after_enqueued_at"}},[e("code",[t._v("invalid_task_after_enqueued_at")])]),t._v(" error.")],1)])]),t._v(" "),e("h6",{attrs:{id:"_10-2-6-2-beforestartedat-and-afterstartedat"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-2-6-2-beforestartedat-and-afterstartedat"}},[t._v("#")]),t._v(" 10.2.6.2. "),e("code",[t._v("beforeStartedAt")]),t._v(" and "),e("code",[t._v("afterStartedAt")])]),t._v(" "),e("p",[t._v("Filter tasks based on their startedAt time. Retrieve tasks started before/after the given filter value.")]),t._v(" "),e("ul",[e("li",[e("p",[t._v("Type: String")])]),t._v(" "),e("li",[e("p",[t._v("Required: False")])]),t._v(" "),e("li",[e("p",[t._v("Default: "),e("code",[t._v("*")])])]),t._v(" "),e("li",[e("p",[t._v("🔴 The date filters are exclusive. It means the given value will not be included.")])]),t._v(" "),e("li",[e("p",[t._v("🔴 Sending an invalid value for "),e("code",[t._v("beforeStartedAt")]),t._v(" parameter returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_before_started_at"}},[e("code",[t._v("invalid_task_before_started_at")])]),t._v(" error.")],1)]),t._v(" "),e("li",[e("p",[t._v("🔴 Sending an invalid value for "),e("code",[t._v("afterStartedAt")]),t._v(" parameter returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_after_started_at"}},[e("code",[t._v("invalid_task_after_started_at")])]),t._v(" error.")],1)])]),t._v(" "),e("h6",{attrs:{id:"_10-2-6-3-beforefinishedat-and-afterfinishedat"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-2-6-3-beforefinishedat-and-afterfinishedat"}},[t._v("#")]),t._v(" 10.2.6.3. "),e("code",[t._v("beforeFinishedAt")]),t._v(" and "),e("code",[t._v("afterFinishedAt")])]),t._v(" "),e("p",[t._v("Filter tasks based on their finishedAt time. Retrieve tasks finished before/after the given filter value.")]),t._v(" "),e("ul",[e("li",[e("p",[t._v("Type: String")])]),t._v(" "),e("li",[e("p",[t._v("Required: False")])]),t._v(" "),e("li",[e("p",[t._v("Default: "),e("code",[t._v("*")])])]),t._v(" "),e("li",[e("p",[t._v("🔴 The date filters are exclusive. It means the given value will not be included.")])]),t._v(" "),e("li",[e("p",[t._v("🔴 Sending an invalid value for "),e("code",[t._v("beforeFinishedAt")]),t._v(" parameter returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_before_finished_at"}},[e("code",[t._v("invalid_task_before_finished_at")])]),t._v(" error.")],1)]),t._v(" "),e("li",[e("p",[t._v("🔴 Sending an invalid value for "),e("code",[t._v("afterFinishedAt")]),t._v(" parameter returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_after_finished_at"}},[e("code",[t._v("invalid_task_after_finished_at")])]),t._v(" error.")],1)])]),t._v(" "),e("h6",{attrs:{id:"_10-2-7-select-multiple-values-for-the-same-filter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-2-7-select-multiple-values-for-the-same-filter"}},[t._v("#")]),t._v(" 10.2.7. Select multiple values for the same filter")]),t._v(" "),e("p",[t._v("It is possible to specify multiple values for a filter using the "),e("code",[t._v(",")]),t._v(" character.")]),t._v(" "),e("p",[t._v("For example, to select the "),e("code",[t._v("enqueued")]),t._v(" and "),e("code",[t._v("processing")]),t._v(" tasks of the "),e("code",[t._v("movies")]),t._v(" and "),e("code",[t._v("movie_reviews")]),t._v(" indexes, it is possible to express it like this: "),e("code",[t._v("/tasks?indexUids=movies,movie_reviews&statuses=enqueued,processing")])]),t._v(" "),e("hr"),t._v(" "),e("h5",{attrs:{id:"_10-3-usages-examples"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-3-usages-examples"}},[t._v("#")]),t._v(" 10.3. Usages examples")]),t._v(" "),e("p",[t._v("This part demonstrates filtering on "),e("code",[t._v("/tasks")]),t._v(".")]),t._v(" "),e("hr"),t._v(" "),e("p",[e("strong",[t._v("No filtering")])]),t._v(" "),e("p",[e("code",[t._v("GET")]),t._v(" - "),e("code",[t._v("/tasks")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"results"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1350")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"failed"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1330")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies_reviews"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"succeeded"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentDeletion"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[e("strong",[t._v("Filter "),e("code",[t._v("tasks")]),t._v(" that have a "),e("code",[t._v("failed")]),t._v(" "),e("code",[t._v("status")])])]),t._v(" "),e("p",[e("code",[t._v("GET")]),t._v(" - "),e("code",[t._v("/tasks?statuses=failed")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"results"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1350")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"failed"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1279")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"failed"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"settingsUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[e("strong",[t._v("Filter "),e("code",[t._v("tasks")]),t._v(" that are of "),e("code",[t._v("documentAdditionOrUpdate")]),t._v(" type")])]),t._v(" "),e("p",[e("code",[t._v("GET")]),t._v(" - "),e("code",[t._v("/tasks?types=documentAdditionOrUpdate")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"results"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1350")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"failed"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1343")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"succeeded"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[e("strong",[t._v("Filter "),e("code",[t._v("canceled")]),t._v(" tasks by "),e("code",[t._v("canceledBy")]),t._v(" parameter")])]),t._v(" "),e("p",[e("code",[t._v("GET")]),t._v(" "),e("code",[t._v("tasks?canceledBy=1")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"results"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1350")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"canceled"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1343")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"canceled"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[e("strong",[t._v("Filter "),e("code",[t._v("tasks")]),t._v(" that are of "),e("code",[t._v("documentAdditionOrUpdate")]),t._v(" type and have a "),e("code",[t._v("failed")]),t._v(" status")])]),t._v(" "),e("p",[e("code",[t._v("GET")]),t._v(" - "),e("code",[t._v("/tasks?types=documentAdditionOrUpdate&statuses=failed")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"results"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1350")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"failed"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1346")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"failed"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("ul",[e("li",[t._v("💡 Filters can be used together. The two parameters are cumulated and a "),e("code",[t._v("AND")]),t._v(" operation is performed between the two filters. An OR operation between filters is not supported.")]),t._v(" "),e("li",[e("code",[t._v("types")]),t._v(" and "),e("code",[t._v("statuses")]),t._v(" query parameters can be read as is "),e("code",[t._v("types=documentsAdditionOrUpdate AND statuses=failed")]),t._v(".")])]),t._v(" "),e("p",[e("strong",[t._v("Filter "),e("code",[t._v("tasks")]),t._v(" by an non-existent "),e("code",[t._v("indexUid")])])]),t._v(" "),e("p",[e("code",[t._v("GET")]),t._v(" - "),e("code",[t._v("/tasks?indexUids=aaaaa")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"results"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("ul",[e("li",[t._v("If the "),e("code",[t._v("indexUids")]),t._v(" query parameter value contains an inexistent index, it returns an empty "),e("code",[t._v("results")]),t._v(" array.")])]),t._v(" "),e("p",[e("strong",[t._v("Cancel all the tasks with filter")])]),t._v(" "),e("p",[e("code",[t._v("POST")]),t._v(" - "),e("code",[t._v("/tasks/cancel?statuses=processing,enqueued")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"taskUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"enqueued"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"taskCancelation"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-12T10:00:00.000000Z"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("hr"),t._v(" "),e("h5",{attrs:{id:"_10-4-empty-results"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-4-empty-results"}},[t._v("#")]),t._v(" 10.4. Empty "),e("code",[t._v("results")])]),t._v(" "),e("p",[t._v("If no results match the filters. A response is returned with an empty "),e("code",[t._v("results")]),t._v(" array.")]),t._v(" "),e("hr"),t._v(" "),e("h2",{attrs:{id:"_2-technical-details"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-details"}},[t._v("#")]),t._v(" 2. Technical details")]),t._v(" "),e("h3",{attrs:{id:"_2-1-tasks-priority"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-tasks-priority"}},[t._v("#")]),t._v(" 2.1. Tasks Priority")]),t._v(" "),e("p",[t._v("The tasks are processed given a order of priority. That is, if a task "),e("code",[t._v("B")]),t._v(" of a higher priority is enqueued after an enqueued "),e("code",[t._v("task A")]),t._v(", "),e("code",[t._v("task B")]),t._v(" will be processed first.")]),t._v(" "),e("p",[t._v("The task types are listed in decreasing order of priority:")]),t._v(" "),e("ol",[e("li",[e("code",[t._v("taskCancelation")])]),t._v(" "),e("li",[e("code",[t._v("taskDeletion")])]),t._v(" "),e("li",[e("code",[t._v("snapshotCreation")])]),t._v(" "),e("li",[e("code",[t._v("dumpCreation")])]),t._v(" "),e("li",[t._v("All other task types with by their enqueued at order.")])]),t._v(" "),e("h3",{attrs:{id:"_2-2-auto-deletion-of-tasks"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_2-2-auto-deletion-of-tasks"}},[t._v("#")]),t._v(" 2.2. Auto deletion of tasks")]),t._v(" "),e("p",[t._v("Since Meilisearch can't store tasks forever, at some point, it needs to free up some space in its queue. The engine will try to delete the 100k last finished tasks upon reaching 1M total tasks stored.")]),t._v(" "),e("p",[t._v("That means after a batch finishes processing and right before processing the following enqueued tasks, Meilisearch will check the number of tasks currently written in its queue. If this number is more than 1M, the engine will enqueue a new task that automatically deletes the last 100k "),e("strong",[t._v("finished")]),t._v(" tasks. That means if there are only 2k finished tasks, only these ones will be deleted. And if all the tasks in the queue are still enqueued, then nothing will be deleted, and the engine will continue to process the next enqueued tasks.")]),t._v(" "),e("h2",{attrs:{id:"_3-future-possibilities"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[t._v("#")]),t._v(" 3. Future Possibilities")]),t._v(" "),e("ul",[e("li",[t._v("Use Hateoas capability to give direct access to a "),e("code",[t._v("task")]),t._v(" resource.")]),t._v(" "),e("li",[t._v("Add dedicated task type names modifying a sub-setting. e.g. "),e("code",[t._v("SearchableAttributesUpdate")]),t._v(".")]),t._v(" "),e("li",[t._v("Add the "),e("code",[t._v("API Key")]),t._v(" identity that added a "),e("code",[t._v("task")]),t._v(".")]),t._v(" "),e("li",[t._v("Make dump import visible as a task.")])])])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[26],{449:function(t,s,e){"use strict";e.r(s);var a=e(62),r=Object(a.a)({},(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"tasks-api"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#tasks-api"}},[t._v("#")]),t._v(" Tasks API")]),t._v(" "),e("h2",{attrs:{id:"_1-functional-specification"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_1-functional-specification"}},[t._v("#")]),t._v(" 1. Functional Specification")]),t._v(" "),e("h3",{attrs:{id:"i-summary"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#i-summary"}},[t._v("#")]),t._v(" I. Summary")]),t._v(" "),e("p",[t._v("This specification describes the behavior of the task queue and the API endpoints for handling asynchronous operations.")]),t._v(" "),e("h3",{attrs:{id:"ii-motivation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ii-motivation"}},[t._v("#")]),t._v(" II. Motivation")]),t._v(" "),e("p",[t._v("As writing is asynchronous for most of Meilisearch's operations, this API allows users to track the progress of asynchronous tasks, know and understand why a task has failed, and cancel specific tasks being enqueued or processing. It's also possible to delete tasks being in a finished state.")]),t._v(" "),e("h3",{attrs:{id:"iii-explanation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#iii-explanation"}},[t._v("#")]),t._v(" III. Explanation")]),t._v(" "),e("h4",{attrs:{id:"_1-task-object-definition"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_1-task-object-definition"}},[t._v("#")]),t._v(" 1. "),e("code",[t._v("task")]),t._v(" object definition")]),t._v(" "),e("h5",{attrs:{id:"fully-qualified-task-object"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#fully-qualified-task-object"}},[t._v("#")]),t._v(" "),e("strong",[t._v("Fully Qualified "),e("code",[t._v("task")]),t._v(" object")])]),t._v(" "),e("blockquote",[e("p",[t._v("This fully qualified version appears as a response object on "),e("code",[t._v("task")]),t._v(" dedicated endpoints.")])]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("field")]),t._v(" "),e("th",[t._v("type")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("uid")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("Unique sequential identifier")])]),t._v(" "),e("tr",[e("td",[t._v("indexUid")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("Unique index identifier. This field is "),e("code",[t._v("null")]),t._v(" when the task is a "),e("a",{attrs:{href:"#global-task"}},[t._v("global task")]),t._v(".")])]),t._v(" "),e("tr",[e("td",[t._v("status")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("Status of the task. Possible values are "),e("code",[t._v("enqueued")]),t._v(", "),e("code",[t._v("processing")]),t._v(", "),e("code",[t._v("succeeded")]),t._v(", "),e("code",[t._v("failed")]),t._v(", "),e("code",[t._v("canceled")])])]),t._v(" "),e("tr",[e("td",[t._v("type")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("Type of the task. Possible values are "),e("code",[t._v("indexCreation")]),t._v(", "),e("code",[t._v("indexUpdate")]),t._v(", "),e("code",[t._v("indexDeletion")]),t._v(", "),e("code",[t._v("indexSwap")]),t._v(", "),e("code",[t._v("documentAdditionOrUpdate")]),t._v(", "),e("code",[t._v("documentDeletion")]),t._v(", "),e("code",[t._v("settingsUpdate")]),t._v(", "),e("code",[t._v("dumpCreation")]),t._v(", "),e("code",[t._v("taskCancelation")]),t._v(", "),e("code",[t._v("taskDeletion")]),t._v(", "),e("code",[t._v("snapshotCreation")])])]),t._v(" "),e("tr",[e("td",[t._v("canceledBy")]),t._v(" "),e("td",[t._v("integer")]),t._v(" "),e("td",[t._v("Unique identifier of the task that canceled this task. Default is set to "),e("code",[t._v("null")]),t._v(".")])]),t._v(" "),e("tr",[e("td",[t._v("details")]),t._v(" "),e("td",[t._v("object")]),t._v(" "),e("td",[t._v("Details information for a task payload. See Task Details part.")])]),t._v(" "),e("tr",[e("td",[t._v("error")]),t._v(" "),e("td",[t._v("object")]),t._v(" "),e("td",[t._v("Error object containing error details and context when a task has a "),e("code",[t._v("failed")]),t._v(" status. See "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html"}},[t._v("0061-error-format-and-definitions.md")]),t._v(". Default is set to "),e("code",[t._v("null")]),t._v(".")],1)]),t._v(" "),e("tr",[e("td",[t._v("duration")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("Total elapsed time the engine was in processing state expressed as an "),e("code",[t._v("ISO-8601")]),t._v(" duration format. Times below the second can be expressed with the "),e("code",[t._v(".")]),t._v(" notation, e.g., "),e("code",[t._v("PT0.5S")]),t._v(" to express "),e("code",[t._v("500ms")]),t._v(". Default is set to "),e("code",[t._v("null")]),t._v(".")])]),t._v(" "),e("tr",[e("td",[t._v("enqueuedAt")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("Represent the date and time as "),e("code",[t._v("RFC 3339")]),t._v(" format when the task has been enqueued")])]),t._v(" "),e("tr",[e("td",[t._v("startedAt")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("Represent the date and time as "),e("code",[t._v("RFC 3339")]),t._v(" format when the task has been dequeued and started to be processed. Default is set to "),e("code",[t._v("null")]),t._v(".")])]),t._v(" "),e("tr",[e("td",[t._v("finishedAt")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("Represent the date and time as "),e("code",[t._v("RFC 3339")]),t._v(" format when the task has a "),e("code",[t._v("failed")]),t._v(", "),e("code",[t._v("succeeded")]),t._v(" or "),e("code",[t._v("canceled")]),t._v(" status. Default is set to "),e("code",[t._v("null")]),t._v(".")])])])]),t._v(" "),e("blockquote",[e("p",[t._v("💡 The order of the fields must be returned in this order.")])]),t._v(" "),e("h6",{attrs:{id:"global-task"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#global-task"}},[t._v("#")]),t._v(" Global task")]),t._v(" "),e("p",[t._v("Some specific tasks are not associated with a particular index and apply to all. They are considered global.")]),t._v(" "),e("p",[t._v("The fully qualified and summarized task objects linked to this kind of task display a "),e("code",[t._v("null")]),t._v(" value for the "),e("code",[t._v("indexUid")]),t._v(" field.")]),t._v(" "),e("p",[t._v("List of global tasks by "),e("code",[t._v("type")]),t._v(":")]),t._v(" "),e("ul",[e("li",[e("code",[t._v("dumpCreation")])]),t._v(" "),e("li",[e("code",[t._v("taskCancelation")])]),t._v(" "),e("li",[e("code",[t._v("taskDeletion")])])]),t._v(" "),e("h5",{attrs:{id:"summarized-task-object-for-202-accepted"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#summarized-task-object-for-202-accepted"}},[t._v("#")]),t._v(" Summarized "),e("code",[t._v("task")]),t._v(" Object for "),e("code",[t._v("202 Accepted")])]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("field")]),t._v(" "),e("th",[t._v("type")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("taskUid")]),t._v(" "),e("td",[t._v("integer")]),t._v(" "),e("td",[t._v("Unique sequential identifier")])]),t._v(" "),e("tr",[e("td",[t._v("indexUid")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("Unique index identifier. This field is "),e("code",[t._v("null")]),t._v(" when the task is a "),e("a",{attrs:{href:"#global-task"}},[t._v("global task")])])]),t._v(" "),e("tr",[e("td",[t._v("status")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("Status of the task. Value is "),e("code",[t._v("enqueued")])])]),t._v(" "),e("tr",[e("td",[t._v("type")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("Type of the task")])]),t._v(" "),e("tr",[e("td",[t._v("enqueuedAt")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("Represent the date and time as "),e("code",[t._v("RFC 3339")]),t._v(" format when the task has been enqueued")])])])]),t._v(" "),e("blockquote",[e("p",[t._v("💡 The order of the fields must be returned in this order.")]),t._v(" "),e("p",[t._v("💡 This summarized version appears only in "),e("code",[t._v("202 Accepted")]),t._v(" responses.")])]),t._v(" "),e("h4",{attrs:{id:"_2-status-field-enum"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_2-status-field-enum"}},[t._v("#")]),t._v(" 2. "),e("code",[t._v("status")]),t._v(" field enum")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("label")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("enqueued")])]),t._v(" "),e("tr",[e("td",[t._v("processing")])]),t._v(" "),e("tr",[e("td",[t._v("succeeded")])]),t._v(" "),e("tr",[e("td",[t._v("failed")])]),t._v(" "),e("tr",[e("td",[t._v("canceled")])])])]),t._v(" "),e("h4",{attrs:{id:"_3-type-field-enum"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-type-field-enum"}},[t._v("#")]),t._v(" 3. "),e("code",[t._v("type")]),t._v(" field enum")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("label")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("indexCreation")])]),t._v(" "),e("tr",[e("td",[t._v("indexUpdate")])]),t._v(" "),e("tr",[e("td",[t._v("indexDeletion")])]),t._v(" "),e("tr",[e("td",[t._v("indexSwap")])]),t._v(" "),e("tr",[e("td",[t._v("documentAdditionOrUpdate")])]),t._v(" "),e("tr",[e("td",[t._v("documentDeletion")])]),t._v(" "),e("tr",[e("td",[t._v("settingsUpdate")])]),t._v(" "),e("tr",[e("td",[t._v("dumpCreation")])]),t._v(" "),e("tr",[e("td",[t._v("taskCancelation")])]),t._v(" "),e("tr",[e("td",[t._v("taskDeletion")])]),t._v(" "),e("tr",[e("td",[t._v("snapshotCreation")])])])]),t._v(" "),e("blockquote",[e("p",[t._v("👍 Type values follow a "),e("code",[t._v("camelCase")]),t._v(" naming convention.")])]),t._v(" "),e("h4",{attrs:{id:"_4-details-field-object"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-details-field-object"}},[t._v("#")]),t._v(" 4. "),e("code",[t._v("details")]),t._v(" field object")]),t._v(" "),e("h5",{attrs:{id:"documentadditionorupdate"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#documentadditionorupdate"}},[t._v("#")]),t._v(" documentAdditionOrUpdate")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("name")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("receivedDocuments")]),t._v(" "),e("td",[t._v("Number of documents received.")])]),t._v(" "),e("tr",[e("td",[t._v("indexedDocuments")]),t._v(" "),e("td",[t._v("Number of documents finally indexed. "),e("code",[t._v("null")]),t._v(" when the task status is enqueued or processing.")])])])]),t._v(" "),e("h5",{attrs:{id:"documentdeletion"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#documentdeletion"}},[t._v("#")]),t._v(" documentDeletion")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("name")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("providedIds")]),t._v(" "),e("td",[t._v("Number of provided document ids.")])]),t._v(" "),e("tr",[e("td",[t._v("originalFilter")]),t._v(" "),e("td",[t._v("The filter used to delete documents. "),e("code",[t._v("null")]),t._v(" if "),e("code",[t._v("filter")]),t._v(" was not used for the deletion request.")])]),t._v(" "),e("tr",[e("td",[t._v("deletedDocuments")]),t._v(" "),e("td",[t._v("Number of documents finally deleted.")])])])]),t._v(" "),e("h5",{attrs:{id:"indexcreation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#indexcreation"}},[t._v("#")]),t._v(" indexCreation")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("name")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("primaryKey")]),t._v(" "),e("td",[t._v("Value for the "),e("code",[t._v("primaryKey")]),t._v(" field into the POST index payload. "),e("code",[t._v("null")]),t._v(" if no "),e("code",[t._v("primaryKey")]),t._v(" has been specified at the time of the index creation.")])])])]),t._v(" "),e("h5",{attrs:{id:"indexupdate"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#indexupdate"}},[t._v("#")]),t._v(" indexUpdate")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("name")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("primaryKey")]),t._v(" "),e("td",[t._v("Value for the "),e("code",[t._v("primaryKey")]),t._v(" field into the PUT index payload. "),e("code",[t._v("null")]),t._v(" if no "),e("code",[t._v("primaryKey")]),t._v(" has been specified at the time of the index update.")])])])]),t._v(" "),e("h5",{attrs:{id:"indexdeletion"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#indexdeletion"}},[t._v("#")]),t._v(" indexDeletion")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("name")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("deletedDocuments")]),t._v(" "),e("td",[t._v("Number of deleted documents. Should be all documents contained in the deleted index. "),e("code",[t._v("null")]),t._v(" when the task status is enqueued or processing.")])])])]),t._v(" "),e("h5",{attrs:{id:"indexswap"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#indexswap"}},[t._v("#")]),t._v(" indexSwap")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("name")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("swaps")]),t._v(" "),e("td",[t._v("Object containing the payload originating the "),e("code",[t._v("indexSwap")]),t._v(" task creation")])])])]),t._v(" "),e("h5",{attrs:{id:"settingsupdate"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#settingsupdate"}},[t._v("#")]),t._v(" settingsUpdate")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("name")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("rankingRules")]),t._v(" "),e("td",[e("code",[t._v("rankingRules")]),t._v(" payload array")])]),t._v(" "),e("tr",[e("td",[t._v("searchableAttributes")]),t._v(" "),e("td",[e("code",[t._v("searchableAttributes")]),t._v(" payload array")])]),t._v(" "),e("tr",[e("td",[t._v("filterableAttributes")]),t._v(" "),e("td",[e("code",[t._v("filterableAttributes")]),t._v(" payload array")])]),t._v(" "),e("tr",[e("td",[t._v("sortableAttributes")]),t._v(" "),e("td",[e("code",[t._v("sortableAttributes")]),t._v(" payload array")])]),t._v(" "),e("tr",[e("td",[t._v("stopWords")]),t._v(" "),e("td",[e("code",[t._v("stopWords")]),t._v(" payload array")])]),t._v(" "),e("tr",[e("td",[t._v("synonyms")]),t._v(" "),e("td",[e("code",[t._v("synonyms")]),t._v(" payload object")])]),t._v(" "),e("tr",[e("td",[t._v("distinctAttribute")]),t._v(" "),e("td",[e("code",[t._v("distrinctAttribute")]),t._v(" payload string")])]),t._v(" "),e("tr",[e("td",[t._v("displayedAttributes")]),t._v(" "),e("td",[e("code",[t._v("displayedAttributes")]),t._v(" payload array")])]),t._v(" "),e("tr",[e("td",[t._v("typoTolerance")]),t._v(" "),e("td",[e("code",[t._v("typoTolerance")]),t._v(" payload object")])]),t._v(" "),e("tr",[e("td",[t._v("pagination")]),t._v(" "),e("td",[e("code",[t._v("pagination")]),t._v(" payload object")])]),t._v(" "),e("tr",[e("td",[t._v("faceting")]),t._v(" "),e("td",[e("code",[t._v("faceting")]),t._v(" payload object")])])])]),t._v(" "),e("h5",{attrs:{id:"dumpcreation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#dumpcreation"}},[t._v("#")]),t._v(" dumpCreation")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("name")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("dumpUid")]),t._v(" "),e("td",[t._v("The generated uid of the dump. "),e("code",[t._v("null")]),t._v(" when the task status is enqueued, processing, canceled, or failed.")])])])]),t._v(" "),e("h5",{attrs:{id:"taskcancelation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#taskcancelation"}},[t._v("#")]),t._v(" taskCancelation")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("matchedTasks")]),t._v(" "),e("td",[t._v("The number of tasks that can be canceled based on the request. If the API key doesn’t have access to any of the indexes specified in the request via the "),e("code",[t._v("indexUids")]),t._v(" query parameter, those tasks will not be included in "),e("code",[t._v("matchedTasks")]),t._v(".")])]),t._v(" "),e("tr",[e("td",[t._v("canceledTasks")]),t._v(" "),e("td",[t._v("The number of tasks successfully canceled. If the task fails, "),e("code",[t._v("0")]),t._v(" is displayed. "),e("code",[t._v("null")]),t._v(" when the task status is enqueued or processing.")])]),t._v(" "),e("tr",[e("td",[t._v("originalFilter")]),t._v(" "),e("td",[t._v("The extracted URL query parameters used in the originating task cancelation request.")])])])]),t._v(" "),e("h5",{attrs:{id:"taskdeletion"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#taskdeletion"}},[t._v("#")]),t._v(" taskDeletion")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("matchedTasks")]),t._v(" "),e("td",[t._v("The number of tasks that can be deleted based on the request. If the API key doesn’t have access to any of the indexes specified in the request via the "),e("code",[t._v("indexUid")]),t._v(" query parameter, those tasks will not be included in "),e("code",[t._v("matchedTasks")]),t._v(".")])]),t._v(" "),e("tr",[e("td",[t._v("deletedTasks")]),t._v(" "),e("td",[t._v("The number of tasks successfully deleted. If the task fails, "),e("code",[t._v("0")]),t._v(" is displayed. "),e("code",[t._v("null")]),t._v(" when the task status is enqueud or processing.")])]),t._v(" "),e("tr",[e("td",[t._v("originalFilter")]),t._v(" "),e("td",[t._v("The extracted URL query parameters used in the originating task deletion request.")])])])]),t._v(" "),e("h5",{attrs:{id:"snapshotcreation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#snapshotcreation"}},[t._v("#")]),t._v(" snapshotCreation")]),t._v(" "),e("p",[t._v("N/A")]),t._v(" "),e("p",[t._v("The "),e("code",[t._v("details")]),t._v(" object is specified to "),e("code",[t._v("null")]),t._v(" for a "),e("code",[t._v("snapshotCreation")]),t._v(" task.")]),t._v(" "),e("h4",{attrs:{id:"_5-examples"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_5-examples"}},[t._v("#")]),t._v(" 5. Examples")]),t._v(" "),e("p",[t._v("e.g. A fully qualified "),e("code",[t._v("task")]),t._v(" object in an "),e("code",[t._v("enqueued")]),t._v(" state.")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"enqueued"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"settingsUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"details"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"rankingRules"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"typo"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ranking:desc"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"words"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"proximity"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"attribute"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exactness"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"duration"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-10T14:29:17.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"startedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"finishedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[t._v("e.g. A fully qualified "),e("code",[t._v("task")]),t._v(" object in a "),e("code",[t._v("processing")]),t._v(" state.")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"processing"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"settingsUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"details"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"rankingRules"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"typo"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ranking:desc"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"words"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"proximity"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"attribute"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exactness"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"duration"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-10T14:29:17.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"startedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-10T14:29:18.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"finishedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[t._v("e.g. A fully qualified "),e("code",[t._v("task")]),t._v(" object in a "),e("code",[t._v("succeeded")]),t._v(" state.")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"succeeded"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"settingsUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"details"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"rankingRules"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"typo"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ranking:desc"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"words"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"proximity"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"attribute"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exactness"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"duration"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"PT1S"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-10T14:29:17.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"startedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-10T14:29:18.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"finishedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-10T14:29:19.000000Z"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[t._v("e.g. A fully qualified "),e("code",[t._v("task")]),t._v(" object in a "),e("code",[t._v("failed")]),t._v(" state.")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"failed"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"settingsUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"details"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"rankingRules"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"typo"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ranking:desc"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"words"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"proximity"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"attribute"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wordsPosition"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exactness"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid criterion wordsPosition"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"internal"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"internal_error"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#internal"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"duration"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"PT1S"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-10T14:29:17.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"startedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-10T14:29:18.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"finishedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-10T14:29:19.000000Z"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[t._v("e.g. A fully qualified "),e("code",[t._v("task")]),t._v(" object in a "),e("code",[t._v("canceled")]),t._v(" state.")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"canceled"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"settingsUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"details"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"rankingRules"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"typo"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ranking:desc"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"words"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"proximity"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"attribute"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exactness"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"duration"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"PT1S"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-10T14:29:17.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"startedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-10T14:29:18.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"finishedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-10T14:29:19.000000Z"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[t._v("e.g. A summarized "),e("code",[t._v("task")]),t._v(" object in a "),e("code",[t._v("202 Accepted")]),t._v(" HTTP response returned at index creation.")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"taskUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"enqueued"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"indexCreation"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-11T09:25:53.000000Z"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("hr"),t._v(" "),e("h4",{attrs:{id:"_6-apis-endpoints"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-apis-endpoints"}},[t._v("#")]),t._v(" 6. APIs endpoints")]),t._v(" "),e("h5",{attrs:{id:"_6-1-get-all-tasks-get-tasks"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-1-get-all-tasks-get-tasks"}},[t._v("#")]),t._v(" 6.1. Get all tasks | "),e("code",[t._v("GET")]),t._v(" - "),e("code",[t._v("/tasks")])]),t._v(" "),e("h5",{attrs:{id:"_6-1-1-goals"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-1-1-goals"}},[t._v("#")]),t._v(" 6.1.1. Goals")]),t._v(" "),e("p",[t._v("Allows users to list tasks globally regardless of the indexes involved. Particularly useful to visualize all the tasks.")]),t._v(" "),e("p",[e("code",[t._v("200")]),t._v(" - Response body - "),e("code",[t._v("/tasks")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"results"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies_reviews"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"enqueued"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"details"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"receivedDocuments"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("100")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexedDocuments"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"duration"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-12T10:00:00.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"startedProcessingAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"finishedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"succeeded"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"details"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"receivedDocuments"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("100")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexedDocuments"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("100")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"duration"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"PT16S"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-11T09:25:53.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"startedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-11T10:03:00.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"finishedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-11T10:03:16.000000Z"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("h5",{attrs:{id:"_6-1-2-requirements"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-1-2-requirements"}},[t._v("#")]),t._v(" 6.1.2. Requirements")]),t._v(" "),e("blockquote",[e("p",[t._v("💡 "),e("code",[t._v("task")]),t._v(" objects are contained in a "),e("code",[t._v("results")]),t._v(" array.")]),t._v(" "),e("p",[t._v("💡 "),e("code",[t._v("task")]),t._v(" uid is generated globally. The "),e("code",[t._v("uid")]),t._v(" of the tasks are no longer scoped to an index.")]),t._v(" "),e("p",[t._v("💡 By default, objects are sorted by "),e("code",[t._v("desc")]),t._v(" order on "),e("code",[t._v("uid")]),t._v(" field. So the most recent tasks appear first.")]),t._v(" "),e("p",[t._v("💡 When an index is deleted, its tasks remain accessible on the global "),e("code",[t._v("/tasks")]),t._v(" endpoint.")])]),t._v(" "),e("h5",{attrs:{id:"_6-1-3-errors"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-1-3-errors"}},[t._v("#")]),t._v(" 6.1.3. Errors")]),t._v(" "),e("p",[t._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),t._v(" "),e("ul",[e("li",[t._v("🔴 Accessing this route without the "),e("code",[t._v("Authorization")]),t._v(" header returns a "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),e("li",[t._v("🔴 Accessing this route with a key that does not have the required permissions (i.e. other than the master-key) returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),e("hr"),t._v(" "),e("h5",{attrs:{id:"_6-2-get-a-task-by-uid-get-tasks-uid"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-2-get-a-task-by-uid-get-tasks-uid"}},[t._v("#")]),t._v(" 6.2. Get a task by uid | "),e("code",[t._v("GET")]),t._v(" - "),e("code",[t._v("/tasks/{uid}")])]),t._v(" "),e("h5",{attrs:{id:"_6-2-1-goals"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-2-1-goals"}},[t._v("#")]),t._v(" 6.2.1. Goals")]),t._v(" "),e("p",[t._v("Allows users to get a detailed "),e("code",[t._v("task")]),t._v(" object retrieved by the "),e("code",[t._v("uid")]),t._v(" field regardless of the index involved.")]),t._v(" "),e("p",[e("code",[t._v("200")]),t._v(" - Response body - "),e("code",[t._v("/tasks/1")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"enqueued"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"details"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n ...\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"duration"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-12T10:00:00.000000Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"startedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"finishedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("h5",{attrs:{id:"_6-2-2-errors"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-2-2-errors"}},[t._v("#")]),t._v(" 6.2.2. Errors")]),t._v(" "),e("ul",[e("li",[t._v("🔴 If the task does not exist, the API returns a "),e("code",[t._v("404 Not Found")]),t._v(" - "),e("code",[t._v("task_not_found")]),t._v(" error.")])]),t._v(" "),e("p",[t._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),t._v(" "),e("ul",[e("li",[t._v("🔴 Accessing this route without the "),e("code",[t._v("Authorization")]),t._v(" header returns a "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),e("li",[t._v("🔴 Accessing this route with a key that does not have the required permissions (i.e. other than the master-key) returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),e("hr"),t._v(" "),e("h5",{attrs:{id:"_6-3-cancel-tasks-post-tasks-cancel"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-3-cancel-tasks-post-tasks-cancel"}},[t._v("#")]),t._v(" 6.3. Cancel tasks | "),e("code",[t._v("POST")]),t._v(" - "),e("code",[t._v("/tasks/cancel")])]),t._v(" "),e("h5",{attrs:{id:"_6-3-1-goals"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-3-1-goals"}},[t._v("#")]),t._v(" 6.3.1. Goals")]),t._v(" "),e("p",[t._v("Allows users to cancel an "),e("code",[t._v("enqueued")]),t._v(" or "),e("code",[t._v("processing")]),t._v(" task. Particularly useful if a long or heavy task blocks the queue.")]),t._v(" "),e("p",[e("code",[t._v("202")]),t._v(" - Response body - "),e("code",[t._v("/tasks/cancel")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"taskUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"enqueued"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"taskCancelation"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-12T10:00:00.000000Z"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("h5",{attrs:{id:"_6-3-2-response-definition"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-3-2-response-definition"}},[t._v("#")]),t._v(" 6.3.2. Response Definition")]),t._v(" "),e("p",[t._v("When the request is successful, Meilisearch returns the HTTP code 202 Accepted. The response's content is the summarized representation of the received asynchronous task.")]),t._v(" "),e("h5",{attrs:{id:"_6-3-3-auto-batching"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-3-3-auto-batching"}},[t._v("#")]),t._v(" 6.3.3. Auto-batching")]),t._v(" "),e("p",[t._v("If the task you’re canceling is part of a batch, "),e("strong",[t._v("the whole batch is stopped.")]),t._v(" Once it is stopped, Meilisearch automatically creates a new batch with the remaining tasks. The canceled tasks are not part of the new batch.")]),t._v(" "),e("p",[t._v("This means:")]),t._v(" "),e("ul",[e("li",[t._v("When the new batch is created, it may contain tasks that have been enqueued between the batch cancelation and recreation.")]),t._v(" "),e("li",[t._v("Any progress the batch made before being canceled is lost.")])]),t._v(" "),e("h5",{attrs:{id:"_6-3-4-errors"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-3-4-errors"}},[t._v("#")]),t._v(" 6.3.4. Errors")]),t._v(" "),e("p",[t._v("If a user tries canceling a "),e("code",[t._v("succeeded")]),t._v(", "),e("code",[t._v("failed")]),t._v(", or "),e("code",[t._v("canceled")]),t._v(" task, it won’t throw an error. Task cancelation is an atomic transaction; all tasks are successfully canceled, or none are.")]),t._v(" "),e("ul",[e("li",[t._v("🔴 Sending a task cancelation without filtering query parameters returns a "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_task_filters"}},[t._v("missing_task_filters")]),t._v(" error.")],1)]),t._v(" "),e("p",[t._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),t._v(" "),e("ul",[e("li",[t._v("🔴 Accessing this route without the "),e("code",[t._v("Authorization")]),t._v(" header returns a "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),e("li",[t._v("🔴 Accessing this route with a key that does not have the required permissions (i.e. other than the master-key) returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),e("hr"),t._v(" "),e("h5",{attrs:{id:"_6-4-delete-tasks-delete-tasks"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-4-delete-tasks-delete-tasks"}},[t._v("#")]),t._v(" 6.4 Delete tasks | "),e("code",[t._v("DELETE")]),t._v(" - "),e("code",[t._v("/tasks")])]),t._v(" "),e("h5",{attrs:{id:"_6-4-1-goals"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-4-1-goals"}},[t._v("#")]),t._v(" 6.4.1 Goals")]),t._v(" "),e("p",[t._v("Allows users to delete a finished ("),e("code",[t._v("succeeded")]),t._v(", "),e("code",[t._v("processing")]),t._v(" or "),e("code",[t._v("canceled")]),t._v(") tasks.")]),t._v(" "),e("p",[e("code",[t._v("202")]),t._v(" - Response body - "),e("code",[t._v("/tasks")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"taskUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"enqueued"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"taskDeletion"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-12T10:00:00.000000Z"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("h5",{attrs:{id:"_6-4-2-response-definition"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-4-2-response-definition"}},[t._v("#")]),t._v(" 6.4.2. Response Definition")]),t._v(" "),e("p",[t._v("When the request is successful, Meilisearch returns the HTTP code 202 Accepted. The response's content is the summarized representation of the received asynchronous task.")]),t._v(" "),e("h5",{attrs:{id:"_6-4-3-errors"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_6-4-3-errors"}},[t._v("#")]),t._v(" 6.4.3. Errors")]),t._v(" "),e("p",[t._v("If a user tries deleting an "),e("code",[t._v("enqueued")]),t._v(", or "),e("code",[t._v("processing")]),t._v(" task, it won’t throw an error. Task deletion is an atomic transaction; all tasks are successfully deleted, or none aren't.")]),t._v(" "),e("ul",[e("li",[t._v("🔴 Sending a task deletion without filtering query parameters returns a "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_task_filters"}},[t._v("missing_task_filters")]),t._v(" error.")],1),t._v(" "),e("li",[t._v("🔴 Sending a task once the task queue is full will throw a "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#no_space_left_on_device"}},[e("code",[t._v("no_space_left_on_device")])]),t._v(" error. Once this state is reached, the only possible action is to delete tasks.")],1)]),t._v(" "),e("p",[t._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),t._v(" "),e("ul",[e("li",[t._v("🔴 Accessing this route without the "),e("code",[t._v("Authorization")]),t._v(" header returns a "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),e("li",[t._v("🔴 Accessing this route with a key that does not have the required permissions (i.e. other than the master-key) returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),e("hr"),t._v(" "),e("h4",{attrs:{id:"_7-task-not-found-error"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_7-task-not-found-error"}},[t._v("#")]),t._v(" 7. "),e("code",[t._v("task_not_found")]),t._v(" error")]),t._v(" "),e("h5",{attrs:{id:"context"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#context"}},[t._v("#")]),t._v(" Context")]),t._v(" "),e("p",[t._v("This error happens when a requested task can't be found. Fetching a deleted task returns a "),e("code",[t._v("task_not_found")]),t._v(" error.")]),t._v(" "),e("h5",{attrs:{id:"error-definition"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#error-definition"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),e("p",[t._v("HTTP Code: "),e("code",[t._v("404 Not Found")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Task :taskUid not found."')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"task_not_found"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#task_not_found"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("ul",[e("li",[t._v("The "),e("code",[t._v(":taskUid")]),t._v(" is inferred when the message is generated.")])]),t._v(" "),e("h4",{attrs:{id:"_8-asynchronous-write-operations-on-index-resource"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_8-asynchronous-write-operations-on-index-resource"}},[t._v("#")]),t._v(" 8. Asynchronous Write Operations on Index resource")]),t._v(" "),e("ul",[e("li",[t._v("💡 Automatic index creation using the "),e("code",[t._v("/indexes/:indexToCreate/documents")]),t._v(" route generates a "),e("code",[t._v("documentAdditionOrUpdate")]),t._v(" task that also handles index creation.")])]),t._v(" "),e("h4",{attrs:{id:"_9-paginate-task-resource-lists"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_9-paginate-task-resource-lists"}},[t._v("#")]),t._v(" 9. Paginate "),e("code",[t._v("task")]),t._v(" resource lists")]),t._v(" "),e("p",[t._v("The API endpoint "),e("code",[t._v("GET /tasks")]),t._v(" is browsable using a keyset-based pagination.")]),t._v(" "),e("h5",{attrs:{id:"_9-1-why-a-seek-keyset-based-pagination"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_9-1-why-a-seek-keyset-based-pagination"}},[t._v("#")]),t._v(" 9.1. Why a Seek/Keyset based pagination?")]),t._v(" "),e("p",[t._v("Keyset-based pagination is more appropriate when the data can grow or shrink quickly in terms of magnitude.")]),t._v(" "),e("h6",{attrs:{id:"_9-1-1-pros"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_9-1-1-pros"}},[t._v("#")]),t._v(" 9.1.1. Pros")]),t._v(" "),e("p",[t._v("The performance is better than the not-so-good but old pagination with "),e("code",[t._v("offset")]),t._v("/"),e("code",[t._v("limit")]),t._v(".")]),t._v(" "),e("p",[t._v("Seek/Keyset pagination keeps the results consistent between each page as the data evolves. It avoids the "),e("a",{attrs:{href:"https://use-the-index-luke.com/sql/partial-results/fetch-next-page",target:"_blank",rel:"noopener noreferrer"}},[t._v("Page Drift effect"),e("OutboundLink")],1),t._v(", especially when the data is sorted from the most recent to the oldest.")]),t._v(" "),e("p",[t._v("Moreover, the performance is superior to traditional pagination since the computational complexity remains constant to reach the identifier marking the beginning of the new slice to be returned from a hash table.")]),t._v(" "),e("h6",{attrs:{id:"_9-1-2-cons"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_9-1-2-cons"}},[t._v("#")]),t._v(" 9.1.2. Cons")]),t._v(" "),e("p",[t._v("The main drawback of this type of pagination is that it does not navigate within a finite number of pages. It is also limited to a precise sorting criterion on unique identifiers ordered sequentially.")]),t._v(" "),e("h5",{attrs:{id:"_9-2-response-attributes"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_9-2-response-attributes"}},[t._v("#")]),t._v(" 9.2. Response attributes")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("field")]),t._v(" "),e("th",[t._v("type")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("total")]),t._v(" "),e("td",[t._v("integer")]),t._v(" "),e("td",[t._v("The total number of tasks matching the filter/query")])]),t._v(" "),e("tr",[e("td",[t._v("limit")]),t._v(" "),e("td",[t._v("integer")]),t._v(" "),e("td",[t._v("Default "),e("code",[t._v("20")]),t._v(".")])]),t._v(" "),e("tr",[e("td",[t._v("from")]),t._v(" "),e("td",[t._v("integer")]),t._v(" "),e("td",[t._v("The first task uid returned")])]),t._v(" "),e("tr",[e("td",[t._v("next")]),t._v(" "),e("td",[t._v("integer - nullable")]),t._v(" "),e("td",[t._v("Represents the value to send in "),e("code",[t._v("from")]),t._v(" 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.")])])])]),t._v(" "),e("h5",{attrs:{id:"_9-3-get-query-parameters"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_9-3-get-query-parameters"}},[t._v("#")]),t._v(" 9.3. GET query parameters")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("field")]),t._v(" "),e("th",[t._v("type")]),t._v(" "),e("th",[t._v("required")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("limit")]),t._v(" "),e("td",[t._v("integer")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Default "),e("code",[t._v("20")]),t._v(". Limit on the number of tasks to be returned.")])]),t._v(" "),e("tr",[e("td",[t._v("from")]),t._v(" "),e("td",[t._v("integer")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Limit results to tasks with uids equal to and lower than this uid.")])])])]),t._v(" "),e("h5",{attrs:{id:"_9-4-usage-examples"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_9-4-usage-examples"}},[t._v("#")]),t._v(" 9.4. Usage examples")]),t._v(" "),e("p",[t._v("This part demonstrates keyset paging in action on "),e("code",[t._v("/tasks")]),t._v(". The items "),e("code",[t._v("uid")]),t._v(" remains sorted sequentially and can be used to navigate a list of "),e("code",[t._v("tasks")]),t._v(" objects.")]),t._v(" "),e("hr"),t._v(" "),e("p",[e("strong",[t._v("Initial default slice of "),e("code",[t._v("tasks")])])]),t._v(" "),e("p",[e("code",[t._v("GET")]),t._v(" - "),e("code",[t._v("/tasks")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"results"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1350")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1330")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies_reviews"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"total"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1351")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"limit"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"from"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1350")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"next"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1329")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[e("strong",[t._v("Request the next slice of "),e("code",[t._v("tasks")]),t._v(" items with a limit of "),e("code",[t._v("50")]),t._v(" tasks")])]),t._v(" "),e("p",[e("code",[t._v("GET")]),t._v(" - "),e("code",[t._v("/tasks?from=1329&limit=50")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"results"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1329")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1279")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"settingsUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"total"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1330")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"limit"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("50")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"from"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1329")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"next"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1278")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[e("strong",[t._v("End of seek/keyset pagination")])]),t._v(" "),e("p",[e("code",[t._v("GET")]),t._v(" - "),e("code",[t._v("/tasks?from=20")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"results"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("19")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentsAdditionOrUdpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentsAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"total"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"limit"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"from"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"next"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("ul",[e("li",[t._v("💡 "),e("code",[t._v("next")]),t._v(" response parameter is null because there are no more "),e("code",[t._v("tasks")]),t._v(" to fetch. It means that the response represents the last slice of results for the given resource list.")])]),t._v(" "),e("h5",{attrs:{id:"_9-5-behaviors-for-limit-and-from-query-parameters"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_9-5-behaviors-for-limit-and-from-query-parameters"}},[t._v("#")]),t._v(" 9.5. Behaviors for "),e("code",[t._v("limit")]),t._v(" and "),e("code",[t._v("from")]),t._v(" query parameters")]),t._v(" "),e("h6",{attrs:{id:"_9-5-1-limit"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_9-5-1-limit"}},[t._v("#")]),t._v(" 9.5.1. "),e("code",[t._v("limit")])]),t._v(" "),e("ul",[e("li",[t._v("If "),e("code",[t._v("limit")]),t._v(" is not set, the default value is chosen.")])]),t._v(" "),e("h6",{attrs:{id:"_9-5-2-from"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_9-5-2-from"}},[t._v("#")]),t._v(" 9.5.2. "),e("code",[t._v("from")])]),t._v(" "),e("ul",[e("li",[t._v("If "),e("code",[t._v("from")]),t._v(" is set with an out of bounds task "),e("code",[t._v("uid")]),t._v(", the response returns the tasks that are the nearest to the specified uid, the "),e("code",[t._v("next")]),t._v(" field is set to the next page. It will be equivalent to call the "),e("code",[t._v("/tasks")]),t._v(" route without any parameter.")])]),t._v(" "),e("h6",{attrs:{id:"_9-5-3-errors"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_9-5-3-errors"}},[t._v("#")]),t._v(" 9.5.3. Errors")]),t._v(" "),e("ul",[e("li",[t._v("🔴 Sending a value with a different type than "),e("code",[t._v("Integer")]),t._v(" for "),e("code",[t._v("limit")]),t._v(" returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_limit"}},[t._v("invalid_task_limit")]),t._v(" error.")],1),t._v(" "),e("li",[t._v("🔴 Sending a value with a different type than "),e("code",[t._v("Integer")]),t._v(" for "),e("code",[t._v("from")]),t._v(" returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_from"}},[t._v("invalid_task_from")]),t._v(" error.")],1)]),t._v(" "),e("h4",{attrs:{id:"_10-filtering-task-resources"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-filtering-task-resources"}},[t._v("#")]),t._v(" 10. Filtering task resources")]),t._v(" "),e("p",[t._v("The tasks API endpoints are filterable by "),e("code",[t._v("uids")]),t._v(", "),e("code",[t._v("indexUids")]),t._v(", "),e("code",[t._v("types")]),t._v(", "),e("code",[t._v("statuses")]),t._v(", "),e("code",[t._v("canceledBy")]),t._v(", "),e("code",[t._v("beforeEnqueuedAt")]),t._v(", "),e("code",[t._v("afterEnqueuedAt")]),t._v(", "),e("code",[t._v("beforeStartedAt")]),t._v(", "),e("code",[t._v("afterStartedAt")]),t._v(", "),e("code",[t._v("beforeFinishedAt")]),t._v(", "),e("code",[t._v("afterFinishedAt")]),t._v(" query parameters.")]),t._v(" "),e("h5",{attrs:{id:"_10-1-query-parameters-definition"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-1-query-parameters-definition"}},[t._v("#")]),t._v(" 10.1 Query parameters definition")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("parameter")]),t._v(" "),e("th",[t._v("type")]),t._v(" "),e("th",[t._v("required")]),t._v(" "),e("th",[t._v("description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("uids")]),t._v(" "),e("td",[t._v("integer")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Permits to filter tasks by their related unique identifier. By default, when "),e("code",[t._v("uids")]),t._v(" query parameter is not set or set to "),e("code",[t._v("*")]),t._v(", all the tasks are concerned. It is possible to specify several uid by separating them with the "),e("code",[t._v(",")]),t._v(" character.")])]),t._v(" "),e("tr",[e("td",[t._v("indexUids")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Permits to filter tasks by their related index. By default, when "),e("code",[t._v("indexUids")]),t._v(" query parameter is not set or set to "),e("code",[t._v("*")]),t._v(", the tasks of all the indexes are concerned. It is possible to specify several indexUids by separating them with the "),e("code",[t._v(",")]),t._v(" character.")])]),t._v(" "),e("tr",[e("td",[t._v("statuses")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Permits to filter tasks by their status. By default, when "),e("code",[t._v("statuses")]),t._v(" query parameter is not set or set to "),e("code",[t._v("*")]),t._v(", all task statuses are concerned. It's possible to specify several statuses by separating them with the "),e("code",[t._v(",")]),t._v(" character.")])]),t._v(" "),e("tr",[e("td",[t._v("types")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Permits to filter tasks by their related type. By default, when "),e("code",[t._v("types")]),t._v(" query parameter is not set or set to "),e("code",[t._v("*")]),t._v(", all task types are concerned. It's possible to specify several types by separating them with the "),e("code",[t._v(",")]),t._v(" character.")])]),t._v(" "),e("tr",[e("td",[t._v("canceledBy")]),t._v(" "),e("td",[t._v("integer")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Permits to filter tasks by the "),e("code",[t._v("taskCancelation")]),t._v(" uid that canceled them. It's possible to specify several task uids by separating them with the "),e("code",[t._v(",")]),t._v(" character.")])]),t._v(" "),e("tr",[e("td",[t._v("beforeEnqueuedAt")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Filter tasks based on their enqueuedAt time. Retrieve tasks enqueued before the given filter value. By default, when "),e("code",[t._v("beforeEnqueuedAt")]),t._v(" query parameter is not set or set to "),e("code",[t._v("*")]),t._v(", all task are selected.")])]),t._v(" "),e("tr",[e("td",[t._v("afterEnqueuedAt")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Filter tasks based on their enqueuedAt time. Retrieve tasks enqueued after the given filter value. By default, when "),e("code",[t._v("afterEnqueuedAt")]),t._v(" query parameter is not set or set to "),e("code",[t._v("*")]),t._v(", all task are selected.")])]),t._v(" "),e("tr",[e("td",[t._v("beforeStartedAt")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Filter tasks based on their startedAt time. Retrieve tasks started before the given value. By default, when "),e("code",[t._v("beforeStartedAt")]),t._v(" query parameter is not set or set to "),e("code",[t._v("*")]),t._v(", all task are selected.")])]),t._v(" "),e("tr",[e("td",[t._v("afterStartedAt")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Filter tasks based on their startedAt time. Retrieve tasks started after the given filter value. By default, when "),e("code",[t._v("afterStartedAt")]),t._v(" query parameter is not set or set to "),e("code",[t._v("*")]),t._v(", all task are selected.")])]),t._v(" "),e("tr",[e("td",[t._v("beforeFinishedAt")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Filter tasks based on their finishedAt time. Retrieve tasks finished before the given filter value. By default, when "),e("code",[t._v("beforeFinishedAt")]),t._v(" query parameter is not set or set to "),e("code",[t._v("*")]),t._v(", all task are selected.")])]),t._v(" "),e("tr",[e("td",[t._v("afterFinishedAt")]),t._v(" "),e("td",[t._v("string")]),t._v(" "),e("td",[t._v("No")]),t._v(" "),e("td",[t._v("Filter tasks based on their finishedAt time. Retrieve tasks finished after the given filter value. By default, when "),e("code",[t._v("afterFinishedAt")]),t._v(" query parameter is not set or set to "),e("code",[t._v("*")]),t._v(", all task are selected.")])])])]),t._v(" "),e("h5",{attrs:{id:"_10-2-query-parameters-behaviors"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-2-query-parameters-behaviors"}},[t._v("#")]),t._v(" 10.2. Query Parameters Behaviors")]),t._v(" "),e("h6",{attrs:{id:"_10-2-1-uids"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-2-1-uids"}},[t._v("#")]),t._v(" 10.2.1. "),e("code",[t._v("uids")])]),t._v(" "),e("p",[t._v("Filter tasks by their related unique identifier. By default, when "),e("code",[t._v("uids")]),t._v(" query parameter is not set, all the tasks are concerned. It is possible to specify several uid by separating them with the "),e("code",[t._v(",")]),t._v(" character.")]),t._v(" "),e("ul",[e("li",[t._v("Type: Integer")]),t._v(" "),e("li",[t._v("Required: False")]),t._v(" "),e("li",[t._v("Default: "),e("code",[t._v("*")])])]),t._v(" "),e("p",[e("code",[t._v("uids")]),t._v(" is "),e("strong",[t._v("case-unsensitive")]),t._v(".")]),t._v(" "),e("ul",[e("li",[t._v("🔴 Sending values with a different type than "),e("code",[t._v("Integer")]),t._v(" being separated by "),e("code",[t._v(",")]),t._v(" for the "),e("code",[t._v("uids")]),t._v(" parameter returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_uids"}},[e("code",[t._v("invalid_task_uids")])]),t._v(" error.")],1)]),t._v(" "),e("h6",{attrs:{id:"_10-2-2-indexuids"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-2-2-indexuids"}},[t._v("#")]),t._v(" 10.2.2. "),e("code",[t._v("indexUids")])]),t._v(" "),e("p",[t._v("Filter tasks by their related index. By default, when "),e("code",[t._v("indexUids")]),t._v(" query parameter is not set, the tasks of all the indexes are concerned. It is possible to specify several indexUids by separating them with the "),e("code",[t._v(",")]),t._v(" character.")]),t._v(" "),e("ul",[e("li",[t._v("Type: String")]),t._v(" "),e("li",[t._v("Required: False")]),t._v(" "),e("li",[t._v("Default: "),e("code",[t._v("*")])])]),t._v(" "),e("p",[e("code",[t._v("indexUids")]),t._v(" is "),e("strong",[t._v("case-sensitive")]),t._v(".")]),t._v(" "),e("ul",[e("li",[t._v("🔴 Sending an invalid index uid format returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_uids"}},[e("code",[t._v("invalid_task_index_uids")])]),t._v(" error is returned.")],1)]),t._v(" "),e("h6",{attrs:{id:"_10-2-3-statuses"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-2-3-statuses"}},[t._v("#")]),t._v(" 10.2.3. "),e("code",[t._v("statuses")])]),t._v(" "),e("p",[t._v("Filter tasks by their status. By default, when "),e("code",[t._v("statuses")]),t._v(" query parameter is not set, all task statuses are concerned. It's possible to specify several statuses by separating them with the "),e("code",[t._v(",")]),t._v(" character.")]),t._v(" "),e("ul",[e("li",[t._v("Type: String")]),t._v(" "),e("li",[t._v("Required: False")]),t._v(" "),e("li",[t._v("Default: "),e("code",[t._v("*")])])]),t._v(" "),e("p",[e("code",[t._v("statuses")]),t._v(" is "),e("strong",[t._v("case-insensitive")]),t._v(".")]),t._v(" "),e("ul",[e("li",[t._v("🔴 If the "),e("code",[t._v("statuses")]),t._v(" parameter value is not consistent with one of the task statuses, an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_statuses"}},[e("code",[t._v("invalid_task_statuses")])]),t._v(" error is returned.")],1)]),t._v(" "),e("h6",{attrs:{id:"_10-2-4-types"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-2-4-types"}},[t._v("#")]),t._v(" 10.2.4. "),e("code",[t._v("types")])]),t._v(" "),e("p",[t._v("Filter tasks by their related type. By default, when "),e("code",[t._v("types")]),t._v(" query parameter is not set, all task types are concerned. It's possible to specify several types by separating them with the "),e("code",[t._v(",")]),t._v(" character.")]),t._v(" "),e("ul",[e("li",[t._v("Type: String")]),t._v(" "),e("li",[t._v("Required: False")]),t._v(" "),e("li",[t._v("Default: "),e("code",[t._v("*")])])]),t._v(" "),e("p",[e("code",[t._v("types")]),t._v(" is "),e("strong",[t._v("case-insensitive")]),t._v(".")]),t._v(" "),e("ul",[e("li",[t._v("🔴 If the "),e("code",[t._v("types")]),t._v(" parameter value is not consistent with one of the task types, an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_types"}},[e("code",[t._v("invalid_task_types")])]),t._v(" error is returned.")],1)]),t._v(" "),e("h6",{attrs:{id:"_10-2-5-canceledby"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-2-5-canceledby"}},[t._v("#")]),t._v(" 10.2.5. "),e("code",[t._v("canceledBy")])]),t._v(" "),e("p",[t._v("Filter tasks by the "),e("code",[t._v("taskCancelation")]),t._v(" uid that canceled them. It's possible to specify several task uids by separating them with the "),e("code",[t._v(",")]),t._v(" character.")]),t._v(" "),e("ul",[e("li",[t._v("Type: Integer")]),t._v(" "),e("li",[t._v("Required: False")]),t._v(" "),e("li",[t._v("Default: "),e("code",[t._v("null")])])]),t._v(" "),e("p",[e("code",[t._v("canceledBy")]),t._v(" is "),e("strong",[t._v("case-insensitive")]),t._v(".")]),t._v(" "),e("ul",[e("li",[t._v("🔴 Sending a value with a different type than "),e("code",[t._v("Integer")]),t._v(" for the "),e("code",[t._v("canceledBy")]),t._v(" parameter returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_canceled_by"}},[e("code",[t._v("invalid_task_canceled_by")])]),t._v(" error.")],1)]),t._v(" "),e("h6",{attrs:{id:"_10-2-6-date-parameters"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-2-6-date-parameters"}},[t._v("#")]),t._v(" 10.2.6. Date Parameters")]),t._v(" "),e("p",[t._v("Date filters accepts the RFC 3339 format. The following syntaxes are valid:")]),t._v(" "),e("ul",[e("li",[e("code",[t._v("YYYY-MM-DD")])]),t._v(" "),e("li",[e("code",[t._v("YYYY-MM-DDTHH:MM:SSZ")])]),t._v(" "),e("li",[e("code",[t._v("YYYY-MM-DDTHH:MM:SS+01:00")])])]),t._v(" "),e("h6",{attrs:{id:"_10-2-6-1-beforeenqueuedat-and-afterenqueuedat"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-2-6-1-beforeenqueuedat-and-afterenqueuedat"}},[t._v("#")]),t._v(" 10.2.6.1. "),e("code",[t._v("beforeEnqueuedAt")]),t._v(" and "),e("code",[t._v("afterEnqueuedAt")])]),t._v(" "),e("p",[t._v("Filter tasks based on their enqueuedAt time. Retrieve tasks enqueued before/after the given filter value.")]),t._v(" "),e("ul",[e("li",[e("p",[t._v("Type: String")])]),t._v(" "),e("li",[e("p",[t._v("Required: False")])]),t._v(" "),e("li",[e("p",[t._v("Default: "),e("code",[t._v("*")])])]),t._v(" "),e("li",[e("p",[t._v("🔴 The date filters are exclusive. It means the given value will not be included.")])]),t._v(" "),e("li",[e("p",[t._v("🔴 Sending an invalid value for "),e("code",[t._v("beforeEnqueuedAt")]),t._v(" parameter returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_before_enqueued_at"}},[e("code",[t._v("invalid_task_before_enqueued_at")])]),t._v(" error.")],1)]),t._v(" "),e("li",[e("p",[t._v("🔴 Sending an invalid value for "),e("code",[t._v("afterEnqueuedAt")]),t._v(" parameter returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_after_enqueued_at"}},[e("code",[t._v("invalid_task_after_enqueued_at")])]),t._v(" error.")],1)])]),t._v(" "),e("h6",{attrs:{id:"_10-2-6-2-beforestartedat-and-afterstartedat"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-2-6-2-beforestartedat-and-afterstartedat"}},[t._v("#")]),t._v(" 10.2.6.2. "),e("code",[t._v("beforeStartedAt")]),t._v(" and "),e("code",[t._v("afterStartedAt")])]),t._v(" "),e("p",[t._v("Filter tasks based on their startedAt time. Retrieve tasks started before/after the given filter value.")]),t._v(" "),e("ul",[e("li",[e("p",[t._v("Type: String")])]),t._v(" "),e("li",[e("p",[t._v("Required: False")])]),t._v(" "),e("li",[e("p",[t._v("Default: "),e("code",[t._v("*")])])]),t._v(" "),e("li",[e("p",[t._v("🔴 The date filters are exclusive. It means the given value will not be included.")])]),t._v(" "),e("li",[e("p",[t._v("🔴 Sending an invalid value for "),e("code",[t._v("beforeStartedAt")]),t._v(" parameter returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_before_started_at"}},[e("code",[t._v("invalid_task_before_started_at")])]),t._v(" error.")],1)]),t._v(" "),e("li",[e("p",[t._v("🔴 Sending an invalid value for "),e("code",[t._v("afterStartedAt")]),t._v(" parameter returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_after_started_at"}},[e("code",[t._v("invalid_task_after_started_at")])]),t._v(" error.")],1)])]),t._v(" "),e("h6",{attrs:{id:"_10-2-6-3-beforefinishedat-and-afterfinishedat"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-2-6-3-beforefinishedat-and-afterfinishedat"}},[t._v("#")]),t._v(" 10.2.6.3. "),e("code",[t._v("beforeFinishedAt")]),t._v(" and "),e("code",[t._v("afterFinishedAt")])]),t._v(" "),e("p",[t._v("Filter tasks based on their finishedAt time. Retrieve tasks finished before/after the given filter value.")]),t._v(" "),e("ul",[e("li",[e("p",[t._v("Type: String")])]),t._v(" "),e("li",[e("p",[t._v("Required: False")])]),t._v(" "),e("li",[e("p",[t._v("Default: "),e("code",[t._v("*")])])]),t._v(" "),e("li",[e("p",[t._v("🔴 The date filters are exclusive. It means the given value will not be included.")])]),t._v(" "),e("li",[e("p",[t._v("🔴 Sending an invalid value for "),e("code",[t._v("beforeFinishedAt")]),t._v(" parameter returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_before_finished_at"}},[e("code",[t._v("invalid_task_before_finished_at")])]),t._v(" error.")],1)]),t._v(" "),e("li",[e("p",[t._v("🔴 Sending an invalid value for "),e("code",[t._v("afterFinishedAt")]),t._v(" parameter returns an "),e("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_task_after_finished_at"}},[e("code",[t._v("invalid_task_after_finished_at")])]),t._v(" error.")],1)])]),t._v(" "),e("h6",{attrs:{id:"_10-2-7-select-multiple-values-for-the-same-filter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-2-7-select-multiple-values-for-the-same-filter"}},[t._v("#")]),t._v(" 10.2.7. Select multiple values for the same filter")]),t._v(" "),e("p",[t._v("It is possible to specify multiple values for a filter using the "),e("code",[t._v(",")]),t._v(" character.")]),t._v(" "),e("p",[t._v("For example, to select the "),e("code",[t._v("enqueued")]),t._v(" and "),e("code",[t._v("processing")]),t._v(" tasks of the "),e("code",[t._v("movies")]),t._v(" and "),e("code",[t._v("movie_reviews")]),t._v(" indexes, it is possible to express it like this: "),e("code",[t._v("/tasks?indexUids=movies,movie_reviews&statuses=enqueued,processing")])]),t._v(" "),e("hr"),t._v(" "),e("h5",{attrs:{id:"_10-3-usages-examples"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-3-usages-examples"}},[t._v("#")]),t._v(" 10.3. Usages examples")]),t._v(" "),e("p",[t._v("This part demonstrates filtering on "),e("code",[t._v("/tasks")]),t._v(".")]),t._v(" "),e("hr"),t._v(" "),e("p",[e("strong",[t._v("No filtering")])]),t._v(" "),e("p",[e("code",[t._v("GET")]),t._v(" - "),e("code",[t._v("/tasks")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"results"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1350")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"failed"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1330")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies_reviews"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"succeeded"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentDeletion"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[e("strong",[t._v("Filter "),e("code",[t._v("tasks")]),t._v(" that have a "),e("code",[t._v("failed")]),t._v(" "),e("code",[t._v("status")])])]),t._v(" "),e("p",[e("code",[t._v("GET")]),t._v(" - "),e("code",[t._v("/tasks?statuses=failed")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"results"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1350")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"failed"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1279")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"failed"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"settingsUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[e("strong",[t._v("Filter "),e("code",[t._v("tasks")]),t._v(" that are of "),e("code",[t._v("documentAdditionOrUpdate")]),t._v(" type")])]),t._v(" "),e("p",[e("code",[t._v("GET")]),t._v(" - "),e("code",[t._v("/tasks?types=documentAdditionOrUpdate")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"results"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1350")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"failed"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1343")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"succeeded"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[e("strong",[t._v("Filter "),e("code",[t._v("canceled")]),t._v(" tasks by "),e("code",[t._v("canceledBy")]),t._v(" parameter")])]),t._v(" "),e("p",[e("code",[t._v("GET")]),t._v(" "),e("code",[t._v("tasks?canceledBy=1")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"results"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1350")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"canceled"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1343")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"canceled"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[e("strong",[t._v("Filter "),e("code",[t._v("tasks")]),t._v(" that are of "),e("code",[t._v("documentAdditionOrUpdate")]),t._v(" type and have a "),e("code",[t._v("failed")]),t._v(" status")])]),t._v(" "),e("p",[e("code",[t._v("GET")]),t._v(" - "),e("code",[t._v("/tasks?types=documentAdditionOrUpdate&statuses=failed")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"results"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1350")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"failed"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1346")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movies"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"failed"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"documentAdditionOrUpdate"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ..."),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("ul",[e("li",[t._v("💡 Filters can be used together. The two parameters are cumulated and a "),e("code",[t._v("AND")]),t._v(" operation is performed between the two filters. An OR operation between filters is not supported.")]),t._v(" "),e("li",[e("code",[t._v("types")]),t._v(" and "),e("code",[t._v("statuses")]),t._v(" query parameters can be read as is "),e("code",[t._v("types=documentsAdditionOrUpdate AND statuses=failed")]),t._v(".")])]),t._v(" "),e("p",[e("strong",[t._v("Filter "),e("code",[t._v("tasks")]),t._v(" by an non-existent "),e("code",[t._v("indexUid")])])]),t._v(" "),e("p",[e("code",[t._v("GET")]),t._v(" - "),e("code",[t._v("/tasks?indexUids=aaaaa")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"results"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("ul",[e("li",[t._v("If the "),e("code",[t._v("indexUids")]),t._v(" query parameter value contains an inexistent index, it returns an empty "),e("code",[t._v("results")]),t._v(" array.")])]),t._v(" "),e("p",[e("strong",[t._v("Cancel all the tasks with filter")])]),t._v(" "),e("p",[e("code",[t._v("POST")]),t._v(" - "),e("code",[t._v("/tasks/cancel?statuses=processing,enqueued")])]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"taskUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"enqueued"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"taskCancelation"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-08-12T10:00:00.000000Z"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("hr"),t._v(" "),e("h5",{attrs:{id:"_10-4-empty-results"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_10-4-empty-results"}},[t._v("#")]),t._v(" 10.4. Empty "),e("code",[t._v("results")])]),t._v(" "),e("p",[t._v("If no results match the filters. A response is returned with an empty "),e("code",[t._v("results")]),t._v(" array.")]),t._v(" "),e("hr"),t._v(" "),e("h2",{attrs:{id:"_2-technical-details"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-details"}},[t._v("#")]),t._v(" 2. Technical details")]),t._v(" "),e("h3",{attrs:{id:"_2-1-tasks-priority"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-tasks-priority"}},[t._v("#")]),t._v(" 2.1. Tasks Priority")]),t._v(" "),e("p",[t._v("The tasks are processed given a order of priority. That is, if a task "),e("code",[t._v("B")]),t._v(" of a higher priority is enqueued after an enqueued "),e("code",[t._v("task A")]),t._v(", "),e("code",[t._v("task B")]),t._v(" will be processed first.")]),t._v(" "),e("p",[t._v("The task types are listed in decreasing order of priority:")]),t._v(" "),e("ol",[e("li",[e("code",[t._v("taskCancelation")])]),t._v(" "),e("li",[e("code",[t._v("taskDeletion")])]),t._v(" "),e("li",[e("code",[t._v("snapshotCreation")])]),t._v(" "),e("li",[e("code",[t._v("dumpCreation")])]),t._v(" "),e("li",[t._v("All other task types with by their enqueued at order.")])]),t._v(" "),e("h3",{attrs:{id:"_2-2-auto-deletion-of-tasks"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_2-2-auto-deletion-of-tasks"}},[t._v("#")]),t._v(" 2.2. Auto deletion of tasks")]),t._v(" "),e("p",[t._v("Since Meilisearch can't store tasks forever, at some point, it needs to free up some space in its queue. The engine will try to delete the 100k last finished tasks upon reaching 1M total tasks stored.")]),t._v(" "),e("p",[t._v("That means after a batch finishes processing and right before processing the following enqueued tasks, Meilisearch will check the number of tasks currently written in its queue. If this number is more than 1M, the engine will enqueue a new task that automatically deletes the last 100k "),e("strong",[t._v("finished")]),t._v(" tasks. That means if there are only 2k finished tasks, only these ones will be deleted. And if all the tasks in the queue are still enqueued, then nothing will be deleted, and the engine will continue to process the next enqueued tasks.")]),t._v(" "),e("h2",{attrs:{id:"_3-future-possibilities"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[t._v("#")]),t._v(" 3. Future Possibilities")]),t._v(" "),e("ul",[e("li",[t._v("Use Hateoas capability to give direct access to a "),e("code",[t._v("task")]),t._v(" resource.")]),t._v(" "),e("li",[t._v("Add dedicated task type names modifying a sub-setting. e.g. "),e("code",[t._v("SearchableAttributesUpdate")]),t._v(".")]),t._v(" "),e("li",[t._v("Add the "),e("code",[t._v("API Key")]),t._v(" identity that added a "),e("code",[t._v("task")]),t._v(".")]),t._v(" "),e("li",[t._v("Make dump import visible as a task.")])])])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/27.178e5c36.js b/docs/assets/js/27.5e7527f3.js similarity index 99% rename from docs/assets/js/27.178e5c36.js rename to docs/assets/js/27.5e7527f3.js index 43229726b..afdfb2f1d 100644 --- a/docs/assets/js/27.178e5c36.js +++ b/docs/assets/js/27.5e7527f3.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[27],{451:function(t,s,a){"use strict";a.r(s);var e=a(62),r=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"error-format-and-definitions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-format-and-definitions"}},[t._v("#")]),t._v(" Error Format and Definitions")]),t._v(" "),a("h2",{attrs:{id:"_1-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-functional-specification"}},[t._v("#")]),t._v(" 1. Functional Specification")]),t._v(" "),a("h3",{attrs:{id:"i-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#i-summary"}},[t._v("#")]),t._v(" I. Summary")]),t._v(" "),a("p",[t._v("This specification serves as a reference point for the complete list of API errors that the user may encounter.")]),t._v(" "),a("h3",{attrs:{id:"ii-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ii-motivation"}},[t._v("#")]),t._v(" II. Motivation")]),t._v(" "),a("p",[t._v("The motivation is to stabilize the current "),a("code",[t._v("error")]),t._v(" resource to a version that conforms to our API convention and thus allows future evolutions on a more solid base.")]),t._v(" "),a("p",[t._v("The second motivation is to describe in an exhaustive way all the errors that the user may encounter during his use of the API. This list will be kept up to date.")]),t._v(" "),a("h3",{attrs:{id:"iii-explanation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#iii-explanation"}},[t._v("#")]),t._v(" III. Explanation")]),t._v(" "),a("h4",{attrs:{id:"error-format"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-format"}},[t._v("#")]),t._v(" Error Format")]),t._v(" "),a("h5",{attrs:{id:"attributes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#attributes"}},[t._v("#")]),t._v(" Attributes")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Field name")]),t._v(" "),a("th",[t._v("type")]),t._v(" "),a("th",[t._v("Description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("message")]),t._v(" "),a("td",[t._v("string")]),t._v(" "),a("td",[t._v("A human-readable message providing context and details about the error.")])]),t._v(" "),a("tr",[a("td",[t._v("code")]),t._v(" "),a("td",[t._v("string")]),t._v(" "),a("td",[t._v("A string indicating the error code reported.")])]),t._v(" "),a("tr",[a("td",[t._v("type")]),t._v(" "),a("td",[t._v("string")]),t._v(" "),a("td",[t._v("The type of error returned. "),a("code",[t._v("invalid_request")]),t._v(", "),a("code",[t._v("internal")]),t._v(", "),a("code",[t._v("system")]),t._v(", and "),a("code",[t._v("auth")]),t._v(".")])]),t._v(" "),a("tr",[a("td",[t._v("link")]),t._v(" "),a("td",[t._v("string")]),t._v(" "),a("td",[t._v("An URL to the related error-page details for further information.")])])])]),t._v(" "),a("h5",{attrs:{id:"json-response-example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#json-response-example"}},[t._v("#")]),t._v(" Json Response Example")]),t._v(" "),a("p",[t._v("e.g. 401 Unauthorized Response example")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Authorization header is missing. It must use the bearer authorization method."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_authorization_header"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"auth"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_authorization_header"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[t._v("💡 The error object fields order must conform to the example.")])]),t._v(" "),a("h5",{attrs:{id:"type-enum"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#type-enum"}},[t._v("#")]),t._v(" type enum")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("type")]),t._v(" "),a("th",[t._v("description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("invalid_request")]),t._v(" "),a("td",[t._v("This type of error is used to indicate an input error. It is accompanied by an HTTP code "),a("code",[t._v("4xx")]),t._v(".")])]),t._v(" "),a("tr",[a("td",[t._v("internal")]),t._v(" "),a("td",[t._v("This type of error is returned when the search engine can't operate under normal condition. Most of the time, it's indicating an unexpected error. It is accompanied by an HTTP code "),a("code",[t._v("5xx")]),t._v(".")])]),t._v(" "),a("tr",[a("td",[t._v("system")]),t._v(" "),a("td",[t._v("This type of error is used to indicate a system limits being reached, such as the size of the disk, the size limit of an index, etc. It is accompanied by an HTTP code "),a("code",[t._v("5xx")]),t._v(".")])]),t._v(" "),a("tr",[a("td",[t._v("auth")]),t._v(" "),a("td",[t._v("This type of error is returned when it comes to authentication and authorization. It is accompanied by an HTTP code "),a("code",[t._v("4xx")]),t._v(".")])])])]),t._v(" "),a("hr"),t._v(" "),a("h4",{attrs:{id:"error-list"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-list"}},[t._v("#")]),t._v(" Error list")]),t._v(" "),a("p",[t._v("Following this format, here is the exhaustive list of errors that MeiliSearch can return to an API consumer. This list is updated as MeiliSearch evolves.")]),t._v(" "),a("p",[t._v("Errors can be returned in two different ways: "),a("code",[t._v("Synchronous")]),t._v(" or "),a("code",[t._v("Asynchronous")]),t._v(".")]),t._v(" "),a("p",[t._v("💡 "),a("code",[t._v("Synchronous")]),t._v(" errors are returned directly by the API in response to a user's request.")]),t._v(" "),a("p",[t._v("💡 Errors returned asynchronously in a "),a("code",[t._v("task")]),t._v(" object do not include a definition of the HTTP code. An asynchronous error is returned in the payload of a "),a("code",[t._v("task")]),t._v(" under the "),a("code",[t._v("error")]),t._v(" object.")]),t._v(" "),a("h1",{attrs:{id:"invalid-request-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-request-type"}},[t._v("#")]),t._v(" invalid_request type")]),t._v(" "),a("h2",{attrs:{id:"bad-request"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bad-request"}},[t._v("#")]),t._v(" bad_request")]),t._v(" "),a("h3",{attrs:{id:"context"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error code is generic. Whenever an error is thrown for a resource field, a clear and precise error code should be determined to guide the user efficiently.")]),t._v(" "),a("p",[t._v("E.g. Sending an unknown field for a resource raises a generic "),a("code",[t._v("bad_request")]),t._v(" error.")]),t._v(" "),a("h3",{attrs:{id:"error-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP code "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bad_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#bad_request"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"immutable-api-key-uid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#immutable-api-key-uid"}},[t._v("#")]),t._v(" immutable_api_key_uid")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-2"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("uid")]),t._v(" field is given in a payload dedicated to modify an API Key.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-2"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `uid` field cannot be modified for the given resource."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"immutable_api_key_uid"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#immutable_api_key_uid"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("--")]),t._v(" "),a("h2",{attrs:{id:"immutable-api-key-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#immutable-api-key-key"}},[t._v("#")]),t._v(" immutable_api_key_key")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-3"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("key")]),t._v(" field is given in a payload dedicated to modify an API Key.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-3"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `key` field cannot be modified for the given resource."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"immutable_api_key_uid"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#immutable_api_key_key"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"immutable-api-key-actions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#immutable-api-key-actions"}},[t._v("#")]),t._v(" immutable_api_key_actions")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-4"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("actions")]),t._v(" field is given in a payload dedicated to modify an API Key.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-4"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `actions` field cannot be modified for the given resource."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"immutable_api_key_actions"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#immutable_api_key_actions"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"immutable-api-key-indexes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#immutable-api-key-indexes"}},[t._v("#")]),t._v(" immutable_api_key_indexes")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-5"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-5"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("indexes")]),t._v(" field is given in a payload dedicated to modify an API Key.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-5"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-5"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `indexes` field cannot be modified for the given resource."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"immutable_api_key_indexes"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#immutable_api_key_indexes"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"immutable-api-key-expires-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#immutable-api-key-expires-at"}},[t._v("#")]),t._v(" immutable_api_key_expires_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-6"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-6"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("expiresAt")]),t._v(" field is given in a payload dedicated to modify an API Key.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-6"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-6"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `expiresAt` field cannot be modified for the given resource."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"immutable_api_key_expires_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#immutable_api_key_expires_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"immutable-api-key-created-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#immutable-api-key-created-at"}},[t._v("#")]),t._v(" immutable_api_key_created_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-7"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-7"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("createdAt")]),t._v(" field is given in a payload dedicated to modify an API Key.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-7"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-7"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `createdAt` field cannot be modified for the given resource."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"immutable_api_key_created_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#immutable_api_key_created_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"immutable-api-key-updated-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#immutable-api-key-updated-at"}},[t._v("#")]),t._v(" immutable_api_key_updated_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-8"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-8"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("updatedAt")]),t._v(" field is given in a payload dedicated to modify an API Key.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-8"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-8"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `updatedAt` field cannot be modified for the given resource."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"immutable_api_key_updated_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#immutable_api_key_updated_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"api-key-already-exists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#api-key-already-exists"}},[t._v("#")]),t._v(" api_key_already_exists")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-9"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-9"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when a user tries to create an API Key that already exists for the given "),a("code",[t._v("uid")]),t._v(".")]),t._v(" "),a("h3",{attrs:{id:"error-definition-9"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-9"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("409 Conflict")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`uid` field value `:value` is already an existing API key."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"api_key_already_exists"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#api_key_already_exists"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-api-key-actions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-api-key-actions"}},[t._v("#")]),t._v(" missing_api_key_actions")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-10"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-10"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when "),a("code",[t._v("actions")]),t._v(" is missing from the post api key resource payload.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-10"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-10"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`actions` field is mandatory."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_api_key_actions"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_api_key_actions"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-api-key-indexes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-api-key-indexes"}},[t._v("#")]),t._v(" missing_api_key_indexes")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-11"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-11"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when "),a("code",[t._v("indexes")]),t._v(" is missing from the post api key resource payload.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-11"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-11"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`indexes` field is mandatory."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_api_key_indexes"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_api_key_indexes"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-api-key-expires-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-api-key-expires-at"}},[t._v("#")]),t._v(" missing_api_key_expires_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-12"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-12"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when "),a("code",[t._v("expiresAt")]),t._v(" is missing from the post api key resource payload.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-12"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-12"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`expiresAt` field is mandatory."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_api_key_expires_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_api_key_expires_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-api-key-uid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-api-key-uid"}},[t._v("#")]),t._v(" invalid_api_key_uid")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-13"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-13"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("uid")]),t._v(" field for an "),a("code",[t._v("API Key")]),t._v(" resource is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-13"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-13"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`uid` field value `:value` is invalid. It should be a valid UUID v4 string or omitted."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_api_key_uid"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_api_key_uid"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-api-key-name"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-api-key-name"}},[t._v("#")]),t._v(" invalid_api_key_name")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-14"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-14"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("name")]),t._v(" field for an "),a("code",[t._v("API Key")]),t._v(" resource is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-14"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-14"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`name` field value `:value` is invalid. It should be a string or specified as a null value."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_api_key_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_api_key_name"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-api-key-description"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-api-key-description"}},[t._v("#")]),t._v(" invalid_api_key_description")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-15"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-15"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("description")]),t._v(" field for an "),a("code",[t._v("API Key")]),t._v(" resource is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-15"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-15"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`description` field value `:value` is invalid. It should be a string or specified as a null value."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_api_key_description"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_api_key_description"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-api-key-actions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-api-key-actions"}},[t._v("#")]),t._v(" invalid_api_key_actions")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-16"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-16"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("actions")]),t._v(" field for an "),a("code",[t._v("API Key")]),t._v(" resource is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-16"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-16"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`actions` field value `:value` is invalid. It should be an array of string representing action names."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_api_key_actions"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_api_key_actions"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-api-key-indexes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-api-key-indexes"}},[t._v("#")]),t._v(" invalid_api_key_indexes")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-17"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-17"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("indexes")]),t._v(" field for an "),a("code",[t._v("API Key")]),t._v(" resource is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-17"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-17"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`indexes` field value `:value` is invalid. It should be an array of string representing index names."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_api_key_indexes"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_api_key_indexes"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-sending-an-invalid-index-uid-format-in-the-indexes-field"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-sending-an-invalid-index-uid-format-in-the-indexes-field"}},[t._v("#")]),t._v(" Variant: Sending an invalid index uid format in the "),a("code",[t._v("indexes")]),t._v(" field.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`uid` is not a valid index uid pattern. Index uid patterns can be an integer or a string containing only alphanumeric characters, hyphens (-), underscores (_), and optionally end with a star (*)."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-api-key-expires-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-api-key-expires-at"}},[t._v("#")]),t._v(" invalid_api_key_expires_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-18"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-18"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("expiresAt")]),t._v(" field for an "),a("code",[t._v("API Key")]),t._v(" resource is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-18"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-18"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"`expiresAt` field value `:value` is invalid. It should follow the RFC 3339 format to represents a date or datetime in the future or specified as a null value. e.g. 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS'.\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_api_key_expires_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_api_key_expires_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-api-key-offset"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-api-key-offset"}},[t._v("#")]),t._v(" invalid_api_key_offset")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-19"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-19"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("offset")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-19"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-19"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_api_key_offset"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_api_key_offset"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-api-key-limit"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-api-key-limit"}},[t._v("#")]),t._v(" invalid_api_key_limit")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-20"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-20"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("limit")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-20"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-20"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_api_key_limit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_api_key_limit"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"index-already-exists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#index-already-exists"}},[t._v("#")]),t._v(" index_already_exists")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-21"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-21"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when a user tries to create an index that already exists.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-21"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-21"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Index `:uid` already exists."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"index_already_exists"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#index_already_exists"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-index-uid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-index-uid"}},[t._v("#")]),t._v(" missing_index_uid")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-22"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-22"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when "),a("code",[t._v("uid")]),t._v(" is missing from the post index resource payload.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-22"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-22"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_index_uid"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_index_uid"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-index-uid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-index-uid"}},[t._v("#")]),t._v(" invalid_index_uid")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-23"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-23"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when:")]),t._v(" "),a("ul",[a("li",[t._v("a value with a different type than "),a("code",[t._v("String")]),t._v(" for "),a("code",[t._v("uid")]),t._v(" is specified")]),t._v(" "),a("li",[t._v("an invalid index uid format is specified in the "),a("code",[t._v(":indexUid")]),t._v(" path parameter")])]),t._v(" "),a("h3",{attrs:{id:"error-definition-23"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-23"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("h4",{attrs:{id:"variant-sending-a-different-type-than-string-for-uid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-sending-a-different-type-than-string-for-uid"}},[t._v("#")]),t._v(" Variant: Sending a different type than "),a("code",[t._v("String")]),t._v(" for "),a("code",[t._v("uid")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_index_uid"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_index_uid"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-sending-an-invalid-string-for-uid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-sending-an-invalid-string-for-uid"}},[t._v("#")]),t._v(" Variant: Sending an invalid "),a("code",[t._v("String")]),t._v(" for "),a("code",[t._v("uid")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:uid` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_)."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"immutable-index-uid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#immutable-index-uid"}},[t._v("#")]),t._v(" immutable_index_uid")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-24"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-24"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("uid")]),t._v(" field is given in a payload dedicated to modify an index.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-24"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-24"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `uid` field cannot be modified for the given resource."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"immutable_index_uid"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#immutable_index_uid"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"immutable-index-created-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#immutable-index-created-at"}},[t._v("#")]),t._v(" immutable_index_created_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-25"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-25"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("createdAt")]),t._v(" field is given in a payload dedicated to modify an index.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-25"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-25"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `createdAt` field cannot be modified for the given resource."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"immutable_index_created_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#immutable_index_created_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"immutable-index-updated-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#immutable-index-updated-at"}},[t._v("#")]),t._v(" immutable_index_updated_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-26"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-26"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("updatedAt")]),t._v(" field is given in a payload dedicated to modify an index.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-26"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-26"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `updatedAt` field cannot be modified for the given resource."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"immutable_index_updated_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#immutable_index_updated_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-index-limit"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-index-limit"}},[t._v("#")]),t._v(" invalid_index_limit")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-27"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-27"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("limit")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-27"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-27"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_index_limit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_index_limit"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-index-offset"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-index-offset"}},[t._v("#")]),t._v(" invalid_index_offset")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-28"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-28"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("offset")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-28"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-28"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_index_offset"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_index_offset"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-index-primary-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-index-primary-key"}},[t._v("#")]),t._v(" invalid_index_primary_key")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-29"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-29"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when a value with a different type than "),a("code",[t._v("string")]),t._v(" or "),a("code",[t._v("null")]),t._v(" is specified for the "),a("code",[t._v("primaryKey")]),t._v(" field.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-29"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-29"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_index_primary_key"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_index_primary_key"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"index-primary-key-already-exists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#index-primary-key-already-exists"}},[t._v("#")]),t._v(" index_primary_key_already_exists")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-30"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-30"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when a user tries to update an index primary key while the index already has one primary key.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-30"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-30"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Index already has a primary key: `:primaryKey`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"index_primary_key_already_exists"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#index_primary_key_already_exists"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"index-primary-key-no-candidate-found"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#index-primary-key-no-candidate-found"}},[t._v("#")]),t._v(" index_primary_key_no_candidate_found")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-31"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-31"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the engine does not find an identifier in the payload documents to define it as the primary key of the index during the inference process when no document has already been inserted.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-31"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-31"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The primary key inference failed as the engine did not find any field ending with `id` in its name. Please specify the primary key manually using the `primaryKey` query parameter."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"index_primary_key_no_candidate_found"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#index_primary_key_no_candidate_found"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"index-primary-key-multiple-candidates-found"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#index-primary-key-multiple-candidates-found"}},[t._v("#")]),t._v(" index_primary_key_multiple_candidates_found")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")])]),t._v(" "),a("h3",{attrs:{id:"error-definition-32"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-32"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"The primary key inference failed as the engine found `:numCandidates` fields ending with `id` in their names: '`:firstCandidate`' and '`:secondCandidate`'. Please specify the primary key manually using the `primaryKey` query parameter.\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"index_primary_key_multiple_candidates_found"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#index_primary_key_multiple_candidates_found"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[t._v("The "),a("code",[t._v(":numCandidates")]),t._v(" is inferred when the message is generated. It is the number of fields that could serve as a primary key according to the engine's inference rules.")]),t._v(" "),a("li",[t._v("The "),a("code",[t._v(":firstCandidate")]),t._v(" and "),a("code",[t._v(":secondCandidate")]),t._v(" are inferred when the message is generated. They are the name of two of the fields that could serve as a primary key according to the engine's inference rules.")])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-document-id"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-document-id"}},[t._v("#")]),t._v(" missing_document_id")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-32"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-32"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the engine does not find the primary key previously defined for the index in the document payload.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-33"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-33"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Document doesn\'t have a `:primaryKey` attribute: `:documentRepresentation`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_document_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_document_id"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-document-id"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-document-id"}},[t._v("#")]),t._v(" invalid_document_id")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-33"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-33"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the value of a document identifier does not meet the requirements of the engine.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-34"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-34"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Document identifier `:documentId` is invalid. A document identifier can be of type integer or string, only composed of alphanumeric characters (a-z A-Z 0-9), hyphens (-) and underscores (_)."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_document_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_document_id"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-document-fields"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-document-fields"}},[t._v("#")]),t._v(" invalid_document_fields")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-34"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-34"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("String")]),t._v(" for "),a("code",[t._v("fields")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-35"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-35"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_document_fields"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_document_fields"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-document-filter"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-document-filter"}},[t._v("#")]),t._v(" invalid_document_filter")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")]),t._v(" / "),a("code",[t._v("Asynchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-35"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-35"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("String")]),t._v(", "),a("code",[t._v("Array of String")]),t._v(" or "),a("code",[t._v("Array of array of String")]),t._v(" for "),a("code",[t._v("filter")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-36"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-36"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_document_filter"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_document_filter"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-document-filter"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-document-filter"}},[t._v("#")]),t._v(" missing_document_filter")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-36"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-36"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when "),a("code",[t._v("filter")]),t._v(" is missing from a delete documents by filter operation.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-37"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-37"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("In the first case:")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`filter` field is mandatory."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_document_filter"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_document_filter"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-document-limit"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-document-limit"}},[t._v("#")]),t._v(" invalid_document_limit")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-37"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-37"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("limit")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-38"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-38"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_document_limit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_document_limit"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-document-offset"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-document-offset"}},[t._v("#")]),t._v(" invalid_document_offset")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-38"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-38"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("offset")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-39"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-39"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_document_offset"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_document_offset"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"document-fields-limit-reached"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#document-fields-limit-reached"}},[t._v("#")]),t._v(" document_fields_limit_reached")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")]),t._v(" — The error can be synchronous if a document with a number higher than the allowed field limit is sent.")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")]),t._v(" — The error can be asynchronous if the limit is reached when adding one or many fields during a document update.")]),t._v(" "),a("h3",{attrs:{id:"context-39"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-39"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("The maximum number of fields for a document is "),a("code",[t._v("65,535")]),t._v(". When this number is exceeded, this error is returned. This error is returned within a "),a("code",[t._v("task")]),t._v(" for a "),a("code",[t._v("documentAdditionOrUpdate")]),t._v(" operation.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-40"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-40"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")]),t._v(" when "),a("code",[t._v("Synchronous")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"A document cannot contain more than 65,535 fields."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"document_fields_limit_reached"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#documents_fields_limit_reached"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-settings-displayed-attributes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-settings-displayed-attributes"}},[t._v("#")]),t._v(" invalid_settings_displayed_attributes")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-40"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-40"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when a value type different of "),a("code",[t._v("Array of String")]),t._v(", "),a("code",[t._v("[]")]),t._v(", or "),a("code",[t._v("null")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-41"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-41"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_settings_displayed_attributes"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_settings_displayed_attributes"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-settings-searchable-attributes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-settings-searchable-attributes"}},[t._v("#")]),t._v(" invalid_settings_searchable_attributes")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-41"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-41"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when a value type different of "),a("code",[t._v("Array of String")]),t._v(", "),a("code",[t._v("[]")]),t._v(", or "),a("code",[t._v("null")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-42"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-42"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_settings_searchable_attributes"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_settings_searchable_attributes"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-settings-filterable-attributes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-settings-filterable-attributes"}},[t._v("#")]),t._v(" invalid_settings_filterable_attributes")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-42"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-42"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when a value type different of "),a("code",[t._v("Array of String")]),t._v(", "),a("code",[t._v("[]")]),t._v(", or "),a("code",[t._v("null")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-43"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-43"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_settings_filterable_attributes"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_settings_filterable_attributes"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-settings-sortable-attributes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-settings-sortable-attributes"}},[t._v("#")]),t._v(" invalid_settings_sortable_attributes")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-43"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-43"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when a value type different of "),a("code",[t._v("Array of String")]),t._v(", "),a("code",[t._v("[]")]),t._v(", or "),a("code",[t._v("null")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-44"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-44"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_settings_sortable_attributes"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_settings_sortable_attributes"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-settings-ranking-rules"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-settings-ranking-rules"}},[t._v("#")]),t._v(" invalid_settings_ranking_rules")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-44"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-44"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when:")]),t._v(" "),a("ul",[a("li",[t._v("an invalid format for the settings payload is specified")]),t._v(" "),a("li",[t._v("a non-existent ranking rule is specified")]),t._v(" "),a("li",[t._v("a malformed custom ranking rule is specified")]),t._v(" "),a("li",[t._v("a custom ranking rule is specified for a reserved keyword")])]),t._v(" "),a("h3",{attrs:{id:"error-definition-45"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-45"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")]),t._v(" when "),a("code",[t._v("Synchronous")])]),t._v(" "),a("h4",{attrs:{id:"variant-sending-an-invalid-format"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-sending-an-invalid-format"}},[t._v("#")]),t._v(" Variant: Sending an invalid format")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_settings_ranking_rules"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_settings_ranking_rules"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-sending-an-inexistent-ranking-rule-or-an-invalid-custom-ranking-rule-syntax"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-sending-an-inexistent-ranking-rule-or-an-invalid-custom-ranking-rule-syntax"}},[t._v("#")]),t._v(" Variant: Sending an inexistent ranking rule or an invalid custom ranking rule syntax.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:rankingRule` ranking rule is invalid. Valid ranking rules are words, typo, sort, proximity, attribute, exactness and custom ranking rules."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-specifying-a-custom-ranking-rule-on-reserved-fields-geo-or-geodistance"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-specifying-a-custom-ranking-rule-on-reserved-fields-geo-or-geodistance"}},[t._v("#")]),t._v(" Variant: Specifying a custom ranking rule on reserved fields "),a("code",[t._v("_geo")]),t._v(" or "),a("code",[t._v("_geoDistance")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:reservedKeyword` is a reserved keyword and thus can\'t be used as a ranking rule."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-specifying-a-custom-ranking-rule-on-reserved-expression-geopoint"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-specifying-a-custom-ranking-rule-on-reserved-expression-geopoint"}},[t._v("#")]),t._v(" Variant: Specifying a custom ranking rule on reserved expression "),a("code",[t._v("_geoPoint")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:reservedKeyword` is a reserved keyword and thus can\'t be used as a ranking rule. `:reservedKeyword` can only be used for sorting at search time."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-specifying-a-custom-ranking-rule-on-reserved-expressions-georadius-geoboundingbox"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-specifying-a-custom-ranking-rule-on-reserved-expressions-georadius-geoboundingbox"}},[t._v("#")]),t._v(" Variant: Specifying a custom ranking rule on reserved expressions "),a("code",[t._v("_geoRadius")]),t._v(" / "),a("code",[t._v("_geoBoundingBox")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:reservedKeyword` is a reserved keyword and thus can\'t be used as a ranking rule. `:reservedKeyword` can only be used for filtering at search time."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-settings-stop-words"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-settings-stop-words"}},[t._v("#")]),t._v(" invalid_settings_stop_words")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-45"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-45"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when a value type different of "),a("code",[t._v("Array of String")]),t._v(", "),a("code",[t._v("[]")]),t._v(", or "),a("code",[t._v("null")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-46"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-46"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_settings_stop_words"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_settings_stop_words"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-settings-synonyms"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-settings-synonyms"}},[t._v("#")]),t._v(" invalid_settings_synonyms")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-46"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-46"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when a value type different of "),a("code",[t._v("Object")]),t._v(", or "),a("code",[t._v("null")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-47"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-47"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_settings_synonyms"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_settings_synonyms"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-settings-distinct-attribute"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-settings-distinct-attribute"}},[t._v("#")]),t._v(" invalid_settings_distinct_attribute")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-47"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-47"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when a value type different of "),a("code",[t._v("String")]),t._v(" or "),a("code",[t._v("null")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-48"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-48"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_settings_distinct_attribute"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_settings_distinct_attribute"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-settings-typo-tolerance"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-settings-typo-tolerance"}},[t._v("#")]),t._v(" invalid_settings_typo_tolerance")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")]),t._v(" / "),a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-48"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-48"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error when:")]),t._v(" "),a("ul",[a("li",[t._v("a value different from "),a("code",[t._v("null")]),t._v(" or with a different type than "),a("code",[t._v("Boolean")]),t._v(" is specified for the "),a("code",[t._v("enabled")]),t._v(" field")]),t._v(" "),a("li",[t._v("a value different from "),a("code",[t._v("null")]),t._v(" or with a different type than "),a("code",[t._v("Array of String")]),t._v(" is specified for the "),a("code",[t._v("disableOnAttributes")]),t._v(" field")]),t._v(" "),a("li",[t._v("a value different from "),a("code",[t._v("null")]),t._v(" or with a different type than "),a("code",[t._v("Array of String")]),t._v(" is specified for the "),a("code",[t._v("disableOnWords")]),t._v(" field")]),t._v(" "),a("li",[t._v("a value different from "),a("code",[t._v("null")]),t._v(" or with a different type than "),a("code",[t._v("Integer")]),t._v(" is specified for the "),a("code",[t._v("minWordSizeForTypos")]),t._v(" object fields.")]),t._v(" "),a("li",[t._v("only one of the fields "),a("code",[t._v("oneTypo")]),t._v(" or "),a("code",[t._v("twoTypos")]),t._v(" for the "),a("code",[t._v("minWordSizeForTypos")]),t._v(" is specified and the value provided is invalid. ("),a("code",[t._v("Asynchronous")]),t._v(")")]),t._v(" "),a("li",[t._v("both "),a("code",[t._v("oneTypo")]),t._v(" and "),a("code",[t._v("twoTypos")]),t._v(" fields are specified for the "),a("code",[t._v("minWordSizeForTypos")]),t._v(" and the values provided are invalid. ("),a("code",[t._v("Synchronous")]),t._v(")")])]),t._v(" "),a("h3",{attrs:{id:"error-definition-49"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-49"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")]),t._v(" when "),a("code",[t._v("Synchronous")])]),t._v(" "),a("h4",{attrs:{id:"variant-enabled-disableonattributes-disableonwords-properties-are-invalid-regarding-their-expected-format"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-enabled-disableonattributes-disableonwords-properties-are-invalid-regarding-their-expected-format"}},[t._v("#")]),t._v(" Variant: "),a("code",[t._v("enabled")]),t._v(", "),a("code",[t._v("disableOnAttributes")]),t._v(", "),a("code",[t._v("disableOnWords")]),t._v(" properties are invalid regarding their expected format.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_settings_typo_tolerance"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_settings_typo_tolerance"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-minwordsizefortypos-object-is-invalid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-minwordsizefortypos-object-is-invalid"}},[t._v("#")]),t._v(" Variant: "),a("code",[t._v("minWordSizeForTypos")]),t._v(" object is invalid.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`minWordSizeForTypos` setting is invalid. `oneTypo` and `twoTypos` fields should be between `0` and `255`, and `twoTypos` should be greater or equals to `oneTypo` but found oneTypo: `:oneTypo` and twoTypos: `:twoTypos`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-settings-faceting"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-settings-faceting"}},[t._v("#")]),t._v(" invalid_settings_faceting")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-49"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-49"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when a value different from "),a("code",[t._v("null")]),t._v(" or with a different type than "),a("code",[t._v("Integer")]),t._v(" is specified for the "),a("code",[t._v("maxValuesPerFacet")]),t._v(" field.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-50"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-50"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_settings_faceting"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_settings_faceting"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-settings-pagination"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-settings-pagination"}},[t._v("#")]),t._v(" invalid_settings_pagination")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-50"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-50"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when a value different from "),a("code",[t._v("null")]),t._v(" or with a different type than "),a("code",[t._v("Integer")]),t._v(" is specified for the "),a("code",[t._v("maxTotalHits")]),t._v(" field.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-51"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-51"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_settings_pagination"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_settings_pagination"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-filter"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-filter"}},[t._v("#")]),t._v(" invalid_search_filter")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-51"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-51"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when:")]),t._v(" "),a("ul",[a("li",[t._v("there is a syntax error in the "),a("code",[t._v("filter")]),t._v(" parameter")]),t._v(" "),a("li",[t._v("an attribute expressed in the filter is not defined in the "),a("code",[t._v("filterableAttributes")]),t._v(" list")]),t._v(" "),a("li",[t._v("a reserved keyword like "),a("code",[t._v("_geo")]),t._v(", "),a("code",[t._v("_geoDistance")]),t._v(" and "),a("code",[t._v("_geoPoint")]),t._v(" is used as a filter")])]),t._v(" "),a("h3",{attrs:{id:"error-definition-52"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-52"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("h4",{attrs:{id:"variant-filtering-on-a-non-filterable-attribute"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-filtering-on-a-non-filterable-attribute"}},[t._v("#")]),t._v(" Variant: Filtering on a non filterable attribute")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Attribute `:attribute` is not filterable. Available filterable attributes are: `:filterableAttributes`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_filter"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_filter"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v(":filterableAttributes")]),t._v(" contains the list of filterable attributes separated by a comma. "),a("code",[t._v("filterableAttribute1, filterableAttribute2, ...")])])]),t._v(" "),a("h4",{attrs:{id:"variant-filtering-on-a-non-filterable-attribute-when-filterableattributes-is-empty"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-filtering-on-a-non-filterable-attribute-when-filterableattributes-is-empty"}},[t._v("#")]),t._v(" Variant: Filtering on a non filterable attribute when "),a("code",[t._v("filterableAttributes")]),t._v(" is empty")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Attribute `:attribute` is not filterable. This index does not have configured filterable attributes."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-using-geodistance-as-a-filter-expression"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-using-geodistance-as-a-filter-expression"}},[t._v("#")]),t._v(" Variant: Using "),a("code",[t._v("_geoDistance")]),t._v(" as a filter expression")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:reservedKeyword` is a reserved keyword and thus can\'t be used as a filter expression."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-using-geo-or-geopoint-as-a-filter-expression"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-using-geo-or-geopoint-as-a-filter-expression"}},[t._v("#")]),t._v(" Variant: Using "),a("code",[t._v("_geo")]),t._v(" or "),a("code",[t._v("_geoPoint")]),t._v(" as a filter expression")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:reservedKeyword` is a reserved keyword and thus can\'t be used as a filter expression. Use the _geoRadius(latitude, longitude, distance) built-in rule to filter on _geo field coordinates."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-invalid-syntax-for-the-filter-parameter"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-invalid-syntax-for-the-filter-parameter"}},[t._v("#")]),t._v(" Variant: Invalid syntax for the "),a("code",[t._v("filter")]),t._v(" parameter")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Invalid syntax for the filter parameter: `:syntaxErrorHelper`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-sort"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-sort"}},[t._v("#")]),t._v(" invalid_search_sort")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-52"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-52"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when:")]),t._v(" "),a("ul",[a("li",[t._v("there is a syntax error in the "),a("code",[t._v("sort")]),t._v(" parameter")]),t._v(" "),a("li",[t._v("an attribute expressed in the sort is not defined in the "),a("code",[t._v("sortableAttributes")]),t._v(" list, sort at search time while the "),a("code",[t._v("sort")]),t._v(" ranking rule is missing from the settings")]),t._v(" "),a("li",[t._v("a reserved keyword like "),a("code",[t._v("_geo")]),t._v(", "),a("code",[t._v("_geoDistance")]),t._v(" and "),a("code",[t._v("_geoRadius")]),t._v(" is used as a sort expression")])]),t._v(" "),a("h3",{attrs:{id:"error-definition-53"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-53"}},[t._v("#")]),t._v(" Error Definition:")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("h4",{attrs:{id:"variant-sorting-on-a-non-sortable-attribute"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-sorting-on-a-non-sortable-attribute"}},[t._v("#")]),t._v(" Variant: Sorting on a non sortable attribute")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Attribute `:attribute` is not sortable. Available sortable attributes are: `:sortableAttributes`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_sort"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_sort"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v(":sortableAttributes")]),t._v(" contains the list of sortable attributes separated by a comma. "),a("code",[t._v("sortableAttribute1, sortableAttribute2, ...")])])]),t._v(" "),a("h4",{attrs:{id:"variant-sorting-on-a-non-sortable-attribute-when-sortableattributes-is-empty"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-sorting-on-a-non-sortable-attribute-when-sortableattributes-is-empty"}},[t._v("#")]),t._v(" Variant: Sorting on a non sortable attribute when "),a("code",[t._v("sortableAttributes")]),t._v(" is empty")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Attribute `:attribute` is not sortable. This index does not have configured sortable attributes."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-using-geodistance-as-a-sort-expression"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-using-geodistance-as-a-sort-expression"}},[t._v("#")]),t._v(" Variant: Using "),a("code",[t._v("_geoDistance")]),t._v(" as a sort expression")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:reservedKeyword` is a reserved keyword and thus can\'t be used as a sort expression."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-using-geo-or-georadius-as-a-sort-expression"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-using-geo-or-georadius-as-a-sort-expression"}},[t._v("#")]),t._v(" Variant: Using "),a("code",[t._v("_geo")]),t._v(" or "),a("code",[t._v("_geoRadius")]),t._v(" as a sort expression")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:reservedKeyword` is a reserved keyword and thus can\'t be used as a sort expression. Use the _geoPoint(latitude, longitude) built-in rule to sort on _geo field coordinates."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-invalid-syntax-for-the-sortparameter"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-invalid-syntax-for-the-sortparameter"}},[t._v("#")]),t._v(" Variant: Invalid syntax for the "),a("code",[t._v("sort")]),t._v("parameter")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Invalid syntax for the sort parameter: `:syntaxErrorHelper`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-specifying-sort-at-search-time-while-the-sort-ranking-rule-isn-t-set-in-the-ranking-rules-settings"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-specifying-sort-at-search-time-while-the-sort-ranking-rule-isn-t-set-in-the-ranking-rules-settings"}},[t._v("#")]),t._v(" Variant: Specifying "),a("code",[t._v("sort")]),t._v(" at search time while the sort ranking rule isn't set in the ranking rules settings")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The sort ranking rule must be specified in the ranking rules settings to use the sort parameter at search time."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-q"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-q"}},[t._v("#")]),t._v(" invalid_search_q")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-53"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-53"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("String")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("q")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-54"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-54"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_q"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_q"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-vector"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-vector"}},[t._v("#")]),t._v(" invalid_search_vector")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-54"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-54"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs for the listed reasons:")]),t._v(" "),a("ul",[a("li",[t._v("if a value with a different type than "),a("code",[t._v("Array of Float")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("vector")]),t._v(" is specified.")]),t._v(" "),a("li",[t._v("if the vector length differs from the documents "),a("code",[t._v("_vectors")]),t._v(" length.")])]),t._v(" "),a("h3",{attrs:{id:"error-definition-55"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-55"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_vector"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_vector"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-offset"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-offset"}},[t._v("#")]),t._v(" invalid_search_offset")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-55"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-55"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("offset")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-56"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-56"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_offset"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_offset"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-limit"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-limit"}},[t._v("#")]),t._v(" invalid_search_limit")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-56"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-56"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("limit")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-57"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-57"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_limit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_limit"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-page"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-page"}},[t._v("#")]),t._v(" invalid_search_page")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-57"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-57"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("page")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-58"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-58"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_page"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_page"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-hits-per-page"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-hits-per-page"}},[t._v("#")]),t._v(" invalid_search_hits_per_page")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-58"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-58"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("hitsPerPage")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-59"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-59"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_hits_per_page"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_hits_per_page"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-attributes-to-retrieve"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-attributes-to-retrieve"}},[t._v("#")]),t._v(" invalid_search_attributes_to_retrieve")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-59"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-59"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Array of String")]),t._v(", "),a("code",[t._v("String")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("attributesToRetrieve")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-60"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-60"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_attributes_to_retrieve"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_attributes_to_retrieve"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-attributes-to-crop"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-attributes-to-crop"}},[t._v("#")]),t._v(" invalid_search_attributes_to_crop")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-60"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-60"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Array[String]")]),t._v(", "),a("code",[t._v("String")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("attributesToCrop")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-61"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-61"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_attributes_to_crop"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_attributes_to_crop"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-crop-length"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-crop-length"}},[t._v("#")]),t._v(" invalid_search_crop_length")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-61"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-61"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("cropLength")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-62"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-62"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_crop_length"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_crop_length"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-attributes-to-highlight"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-attributes-to-highlight"}},[t._v("#")]),t._v(" invalid_search_attributes_to_highlight")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-62"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-62"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Array[String]")]),t._v(", "),a("code",[t._v("String")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("attributesToHighlight")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-63"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-63"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_attributes_to_highlight"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_attributes_to_highlight"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-show-matches-position"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-show-matches-position"}},[t._v("#")]),t._v(" invalid_search_show_matches_position")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-63"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-63"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Boolean")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("showMatchesPosition")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-64"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-64"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_show_matches_position"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_show_matches_position"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-facets"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-facets"}},[t._v("#")]),t._v(" invalid_search_facets")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-64"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-64"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when:")]),t._v(" "),a("ul",[a("li",[t._v("A value with a different type than "),a("code",[t._v("Array of String")]),t._v(", "),a("code",[t._v("String")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("facets")]),t._v(" is specified.")]),t._v(" "),a("li",[t._v("A field not defined as a "),a("code",[t._v("filterableAttributes")]),t._v(" for "),a("code",[t._v("facets")]),t._v(" is specified.")])]),t._v(" "),a("h3",{attrs:{id:"error-definition-65"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-65"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("h4",{attrs:{id:"variant-an-type-is-given-for-facets"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-an-type-is-given-for-facets"}},[t._v("#")]),t._v(" Variant: An type is given for "),a("code",[t._v("facets")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_facets"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_facets"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-a-given-field-for-facets-is-not-specified-as-a-filterableattributes-settings"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-a-given-field-for-facets-is-not-specified-as-a-filterableattributes-settings"}},[t._v("#")]),t._v(" Variant: A given field for "),a("code",[t._v("facets")]),t._v(" is not specified as a "),a("code",[t._v("filterableAttributes")]),t._v(" settings")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Invalid facet distribution, the fields `:fieldName` are not set as filterable."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-highlight-pre-tag"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-highlight-pre-tag"}},[t._v("#")]),t._v(" invalid_search_highlight_pre_tag")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-65"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-65"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("String")]),t._v(" for "),a("code",[t._v("highlightPreTag")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-66"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-66"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_highlight_pre_tag"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_highlight_pre_tag"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-highlight-post-tag"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-highlight-post-tag"}},[t._v("#")]),t._v(" invalid_search_highlight_post_tag")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-66"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-66"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("String")]),t._v(" for "),a("code",[t._v("highlightPostTag")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-67"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-67"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_highlight_post_tag"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_highlight_post_tag"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-crop-marker"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-crop-marker"}},[t._v("#")]),t._v(" invalid_search_crop_marker")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-67"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-67"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("String")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("cropMarker")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-68"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-68"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_crop_marker"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_crop_marker"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-matching-strategy"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-matching-strategy"}},[t._v("#")]),t._v(" invalid_search_matching_strategy")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-68"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-68"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("String")]),t._v(" and other than "),a("code",[t._v("last")]),t._v(" or "),a("code",[t._v("all")]),t._v(" as a value for "),a("code",[t._v("matchingStrategy")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-69"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-69"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_matching_strategy"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_matching_strategy"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h2",{attrs:{id:"invalid-search-attributes-to-search-on"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-attributes-to-search-on"}},[t._v("#")]),t._v(" invalid_search_attributes_to_search_on")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-69"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-69"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Array of String")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" and other than attributes names contained in the settings "),a("code",[t._v("searchableAttributes")]),t._v(" as a value for "),a("code",[t._v("attributesToSearchOn")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-70"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-70"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_attributes_to_search_on"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_attributes_to_search_on"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-one-of-the-values-is-not-part-of-the-settings-searchableattributes-list"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-one-of-the-values-is-not-part-of-the-settings-searchableattributes-list"}},[t._v("#")]),t._v(" Variant: one of the values is not part of the settings "),a("code",[t._v("searchableAttributes")]),t._v(" list")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Attribute `:value` is not searchable. Available searchable attributes are: `:searchableAttributes`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_attributes_to_search_on"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_attributes_to_search_on"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-one-of-the-values-is-not-part-of-the-settings-searchableattributes-list-and-not-all-of-the-searchableattributes-are-displayable"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-one-of-the-values-is-not-part-of-the-settings-searchableattributes-list-and-not-all-of-the-searchableattributes-are-displayable"}},[t._v("#")]),t._v(" Variant: one of the values is not part of the settings "),a("code",[t._v("searchableAttributes")]),t._v(" list and not all of the "),a("code",[t._v("searchableAttributes")]),t._v(" are displayable")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Attribute `:value` is not searchable. Available searchable attributes are: `:DisplayableSearchableAttributes, <..hidden-attributes>`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_attributes_to_search_on"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_attributes_to_search_on"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-facet-search-facet-name"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-facet-search-facet-name"}},[t._v("#")]),t._v(" missing_facet_search_facet_name")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-70"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-70"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if "),a("code",[t._v("facetName")]),t._v(" isn't specified when making a facet search call.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-71"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-71"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_facet_search_facet_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_facet_search_facet_name"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-facet-search-facet-name"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-facet-search-facet-name"}},[t._v("#")]),t._v(" invalid_facet_search_facet_name")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-71"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-71"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This errors occurs when the provided value for "),a("code",[t._v("facetName")]),t._v(":")]),t._v(" "),a("ul",[a("li",[t._v("Is not a string")]),t._v(" "),a("li",[t._v("Is not defined in the "),a("code",[t._v("filterableAttributes")]),t._v(" index setting")])]),t._v(" "),a("h3",{attrs:{id:"error-definition-72"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-72"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_facet_search_facet_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_facet_search_facet_name"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-facet-search-facet-query"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-facet-search-facet-query"}},[t._v("#")]),t._v(" invalid_facet_search_facet_query")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-72"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-72"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This errors occurs when the provided value for "),a("code",[t._v("facetQuery")]),t._v(":")]),t._v(" "),a("ul",[a("li",[t._v("Is not a string or null")])]),t._v(" "),a("h3",{attrs:{id:"error-definition-73"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-73"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_facet_search_facet_query"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_facet_search_facet_query"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-document-geo-field"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-document-geo-field"}},[t._v("#")]),t._v(" invalid_document_geo_field")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-73"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-73"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("These errors occurs when the "),a("code",[t._v("_geo")]),t._v(" field of a document payload is not valid. Either the latitude / longitude is missing or is not a number.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-74"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-74"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("h4",{attrs:{id:"variant-geo-field-is-not-an-object"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-geo-field-is-not-an-object"}},[t._v("#")]),t._v(" Variant: "),a("code",[t._v("_geo")]),t._v(" field is not an object.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `_geo` field in the document with the id: `:documentId` is not an object. Was expecting an object with the `_geo.lat` and `_geo.lng` fields but instead got `:field`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_document_geo_field"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_document_geo_field"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-missing-geo-lat-and-geo-lng-field"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-missing-geo-lat-and-geo-lng-field"}},[t._v("#")]),t._v(" Variant: Missing "),a("code",[t._v("_geo.lat")]),t._v(" "),a("strong",[t._v("and")]),t._v(" "),a("code",[t._v("_geo.lng")]),t._v(" field.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Could not find latitude nor longitude in the document with the id: `:documentId`. Was expecting `_geo.lat` and `_geo.lng` fields."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-missing-geo-lat-or-geo-lng-field"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-missing-geo-lat-or-geo-lng-field"}},[t._v("#")]),t._v(" Variant: Missing "),a("code",[t._v("_geo.lat")]),t._v(" "),a("strong",[t._v("or")]),t._v(" "),a("code",[t._v("_geo.lng")]),t._v(" field.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Could not find :coord in the document with the id: `:documentId`. Was expecting a `:field` field."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-coordinate-can-t-be-parsed"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-coordinate-can-t-be-parsed"}},[t._v("#")]),t._v(" Variant: Coordinate can't be parsed.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Could not parse :coord in the document with the id: `:documentId`. Was expecting a finite number but instead got `:value`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[t._v("The "),a("code",[t._v(":coord")]),t._v(" is either "),a("code",[t._v("latitude")]),t._v(" or "),a("code",[t._v("longitude")]),t._v(" depending on what's wrong.")]),t._v(" "),a("li",[t._v("The "),a("code",[t._v(":field")]),t._v(" is either "),a("code",[t._v("_geo.lat")]),t._v(" or "),a("code",[t._v("_geo.lng")]),t._v(" depending on what's wrong.")])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-document-vectors-field"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-document-vectors-field"}},[t._v("#")]),t._v(" invalid_document_vectors_field")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-74"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-74"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the "),a("code",[t._v("_vectors")]),t._v(" field of a document payload is not valid either due to the type of it or the number of dimensions.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-75"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-75"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("h4",{attrs:{id:"variant-vectors-field-value-type-is-invalid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-vectors-field-value-type-is-invalid"}},[t._v("#")]),t._v(" Variant: "),a("code",[t._v("_vectors")]),t._v(" field value type is invalid")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `_vectors` field in the document with the id: `:documentId` is not an array. Was expecting an array of floats or an array of arrays of floats but instead got `:field`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_document_vectors_type"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_document_vectors_type"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-number-of-dimensions-is-not-correct"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-number-of-dimensions-is-not-correct"}},[t._v("#")]),t._v(" Variant: Number of dimensions is not correct")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Invalid vector dimensions: expected: `:expected`, found: `:found`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"payload-too-large"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#payload-too-large"}},[t._v("#")]),t._v(" payload_too_large")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-75"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-75"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the size of the payload sent exceeds the limit set by the server. The user can correct this error by reducing the payload size or increasing the limit with "),a("a",{attrs:{href:"https://docs.meilisearch.com/reference/features/configuration.html#payload-limit-size",target:"_blank",rel:"noopener noreferrer"}},[t._v("this configuration variable"),a("OutboundLink")],1)]),t._v(" "),a("h3",{attrs:{id:"error-definition-76"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-76"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("413 Payload Too Large")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The provided payload reached the size limit. The maximum accepted payload size is :playloadSizeLimit."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"payload_too_large"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#payload_too_large"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"not-found"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#not-found"}},[t._v("#")]),t._v(" not_found")]),t._v(" "),a("h3",{attrs:{id:"context-76"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-76"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error code is generic. It should not be used. Instead, a clear and precise error code should be determined.")]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"index-not-found"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#index-not-found"}},[t._v("#")]),t._v(" index_not_found")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")]),t._v(" / "),a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-77"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-77"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when a requested index can't be found.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-77"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-77"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code when "),a("code",[t._v("Synchronous")]),t._v(":")]),t._v(" "),a("ul",[a("li",[t._v("if the index uid was specified as part of the URL, "),a("code",[t._v("404 Not Found")])]),t._v(" "),a("li",[t._v("if the index uid was specified as part of the POST body, "),a("code",[t._v("400 Bad Request")])])]),t._v(" "),a("h4",{attrs:{id:"variant-multiples-indexuids-can-t-be-found"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-multiples-indexuids-can-t-be-found"}},[t._v("#")]),t._v(" Variant: Multiples indexUids can't be found")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Indexes `:indexUids` not found."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"index_not_found"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#index_not_found"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v(":indexUids")]),t._v(" values are separated by "),a("code",[t._v(",")]),t._v(".")])]),t._v(" "),a("h4",{attrs:{id:"variant-an-index-can-t-be-found"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-an-index-can-t-be-found"}},[t._v("#")]),t._v(" Variant: An index can't be found")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Index `:indexUid` not found."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-swap-indexes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-swap-indexes"}},[t._v("#")]),t._v(" missing_swap_indexes")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-78"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-78"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when "),a("code",[t._v("indexes")]),t._v(" is missing from a swap operation object.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-78"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-78"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`indexes` field is mandatory."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_swap_indexes"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_swap_indexes"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-swap-indexes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-swap-indexes"}},[t._v("#")]),t._v(" invalid_swap_indexes")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-79"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-79"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when:")]),t._v(" "),a("ul",[a("li",[t._v("an "),a("code",[t._v("indexes")]),t._v(" array not containing "),a("strong",[t._v("exactly")]),t._v(" 2 index uids for a swap operation object is specified in the payload")]),t._v(" "),a("li",[t._v("An index name is invalid in the "),a("code",[t._v("indexes")]),t._v(" array.")])]),t._v(" "),a("h3",{attrs:{id:"error-definition-79"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-79"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("h4",{attrs:{id:"variant-indexes-does-not-contains-exactly-2-index-uids"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-indexes-does-not-contains-exactly-2-index-uids"}},[t._v("#")]),t._v(" Variant: "),a("code",[t._v("indexes")]),t._v(" does not contains "),a("strong",[t._v("exactly")]),t._v(" 2 index uids")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Two indexes must be given for each swap. The list `:indexesList` contains `:indexesNumber` indexes."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_swap_indexes"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_swap_indexes"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-indexes-contains-one-index-uid-being-invalid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-indexes-contains-one-index-uid-being-invalid"}},[t._v("#")]),t._v(" Variant: "),a("code",[t._v("indexes")]),t._v(" contains one index uid being invalid")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:uid` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_)."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-swap-duplicate-index-found"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-swap-duplicate-index-found"}},[t._v("#")]),t._v(" invalid_swap_duplicate_index_found")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-80"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-80"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the same indexUid is used twice in the "),a("code",[t._v("POST")]),t._v("- "),a("code",[t._v("swap-indexes")]),t._v(" payload.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-80"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-80"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("h4",{attrs:{id:"variant-a-single-indexuid-is-found-twice-in-the-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-a-single-indexuid-is-found-twice-in-the-payload"}},[t._v("#")]),t._v(" Variant: A single indexUid is found twice in the payload")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Indexes must be declared only once during a swap. `:indexUid` was specified several times."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_swap_duplicate_index_found"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_swap_duplicate_index_found"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-several-indexuids-are-found-twice-in-the-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-several-indexuids-are-found-twice-in-the-payload"}},[t._v("#")]),t._v(" Variant: Several indexUids are found twice in the payload")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Indexes must be declared only once during a swap. `:indexUids` were specified several times."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v(":indexUids")]),t._v(" values are separated by "),a("code",[t._v(",")]),t._v(".")])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"document-not-found"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#document-not-found"}},[t._v("#")]),t._v(" document_not_found")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h2",{attrs:{id:"context-81"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-81"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when a requested document can't be found.")]),t._v(" "),a("h2",{attrs:{id:"error-definition-81"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-81"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("404 Not Found")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Document `:documentId` not found."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"document_not_found"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#document_not_found"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"task-not-found"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#task-not-found"}},[t._v("#")]),t._v(" task_not_found")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h4",{attrs:{id:"context-82"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-82"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when a requested task can't be found.")]),t._v(" "),a("h4",{attrs:{id:"error-definition-82"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-82"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("404 Not Found")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Task `:taskUid` not found."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"task_not_found"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#task_not_found"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-uids"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-uids"}},[t._v("#")]),t._v(" invalid_task_uids")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-83"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-83"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the "),a("code",[t._v("uids")]),t._v(" query parameter filter is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-83"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-83"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Task uid `:uid` is invalid. It should only contains numeric characters separated by `,` character."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_uids"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_uids"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-index-uids"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-index-uids"}},[t._v("#")]),t._v(" invalid_task_index_uids")]),t._v(" "),a("h3",{attrs:{id:"context-84"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-84"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the "),a("code",[t._v("indexUids")]),t._v(" query parameter contains an invalid index uid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-84"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-84"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:uid` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_)."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_index_uids"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_index_uids"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-before-enqueued-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-before-enqueued-at"}},[t._v("#")]),t._v(" invalid_task_before_enqueued_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-85"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-85"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the "),a("code",[t._v("beforeEnqueuedAt")]),t._v(" query parameter filter is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-85"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-85"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"Task `beforeEnqueuedAt` `:value` is invalid. It should follow the RFC 3339 format. e.g. 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS'.\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_before_enqueued_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_before_enqueued_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-after-enqueued-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-after-enqueued-at"}},[t._v("#")]),t._v(" invalid_task_after_enqueued_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-86"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-86"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the "),a("code",[t._v("afterEnqueuedAt")]),t._v(" query parameter filter is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-86"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-86"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"Task `afterEnqueuedAt` `:value` is invalid. It should follow the RFC 3339 format. e.g. 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS'.\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_after_enqueued_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_after_enqueued_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-before-started-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-before-started-at"}},[t._v("#")]),t._v(" invalid_task_before_started_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-87"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-87"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the "),a("code",[t._v("beforeStartedAt")]),t._v(" query parameter filter is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-87"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-87"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"Task `beforeStartedAt` `:value` is invalid. It should follow the RFC 3339 format. e.g. 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS'.\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_before_started_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_before_started_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-after-started-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-after-started-at"}},[t._v("#")]),t._v(" invalid_task_after_started_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-88"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-88"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the "),a("code",[t._v("afterStartedAt")]),t._v(" query parameter filter is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-88"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-88"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"Task `afterStartedAt` `:value` is invalid. It should follow the RFC 3339 format. e.g. 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS'.\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_after_started_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_after_started_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-before-finished-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-before-finished-at"}},[t._v("#")]),t._v(" invalid_task_before_finished_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-89"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-89"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the "),a("code",[t._v("beforeFinishedAt")]),t._v(" query parameter filter is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-89"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-89"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"Task `beforeFinishedAt` `:value` is invalid. It should follow the RFC 3339 format. e.g. 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS'.\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_before_finished_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_before_finished_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-after-finished-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-after-finished-at"}},[t._v("#")]),t._v(" invalid_task_after_finished_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-90"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-90"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the "),a("code",[t._v("afterFinishedAt")]),t._v(" query parameter filter is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-90"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-90"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"Task `afterFinishedAt` `:value` is invalid. It should follow the RFC 3339 format. e.g. 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS'.\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_after_finished_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_after_finished_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-statuses"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-statuses"}},[t._v("#")]),t._v(" invalid_task_statuses")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-91"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-91"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("status")]),t._v(" query parameter filter is invalid.")]),t._v(" "),a("h4",{attrs:{id:"error-definition-91"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-91"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Task status `:status` is invalid. Available task statuses are: `:taskStatuses`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_statuses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_statuses"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-types"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-types"}},[t._v("#")]),t._v(" invalid_task_types")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-92"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-92"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("types")]),t._v(" query parameter filter is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-92"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-92"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Task type `:type` is invalid. Available task types are: `:taskTypes`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_types"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_types"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-canceled-by"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-canceled-by"}},[t._v("#")]),t._v(" invalid_task_canceled_by")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-93"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-93"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("canceledBy")]),t._v(" query parameter filter is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-93"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-93"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Task canceledBy `:canceledBy` is invalid. It should only contains numeric characters separated by `,` character."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_canceled_by"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_canceled_by"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-task-filters"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-task-filters"}},[t._v("#")]),t._v(" missing_task_filters")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-94"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-94"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when no query parameters are given when a task cancelation or a task deletion request is sent.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-94"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-94"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Query parameters to filter the tasks to `:operation` are missing. Available query parameters are: `queryParametersNames`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_task_filters"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_task_filters"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-limit"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-limit"}},[t._v("#")]),t._v(" invalid_task_limit")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-95"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-95"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("limit")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-95"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-95"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_limit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_limit"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-from"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-from"}},[t._v("#")]),t._v(" invalid_task_from")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-96"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-96"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("from")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-96"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-96"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_from"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_from"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"api-key-not-found"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#api-key-not-found"}},[t._v("#")]),t._v(" api_key_not_found")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-97"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-97"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when a requested api key can't be found.")]),t._v(" "),a("h4",{attrs:{id:"error-definition-97"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-97"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("404 Not Found")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"API key `:apiKey` not found."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"api_key_not_found"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#api_key_not_found"')]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-content-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-content-type"}},[t._v("#")]),t._v(" invalid_content_type")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-98"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-98"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the provided content-type is not handled by the API method.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-98"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-98"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("415 Unsupported Media Type")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Content-Type `:contentType` is invalid. Accepted values for the Content-Type header are: `:contentTypeList`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_content_type"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_content_type"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v(":contentTypeList")]),t._v(" values are separated by a "),a("code",[t._v(",")]),t._v(" char. e.g. "),a("code",[t._v("application/json")]),t._v(", "),a("code",[t._v("text/csv")]),t._v(".")])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-content-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-content-type"}},[t._v("#")]),t._v(" missing_content_type")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-99"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-99"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the Content-Type header is missing.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-99"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-99"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("415 Unsupported Media Type")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"A Content-Type header is missing. Accepted values for the Content-Type header are: `:contentTypeList`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_content_type"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_content_type"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v(":contentTypeList")]),t._v(" values are separated by a "),a("code",[t._v(",")]),t._v(" char. e.g. "),a("code",[t._v("application/json")]),t._v(", "),a("code",[t._v("text/csv")]),t._v(".")])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-payload"}},[t._v("#")]),t._v(" missing_payload")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-100"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-100"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the client does not provide a mandatory payload to the request.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-100"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-100"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"A `:payloadType` payload is missing."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_payload"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_payload"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v(":payloadType")]),t._v(" is e.g. "),a("code",[t._v("json")]),t._v(", "),a("code",[t._v("ndjson")]),t._v(", "),a("code",[t._v("csv")])])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"malformed-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#malformed-payload"}},[t._v("#")]),t._v(" malformed_payload")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-101"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-101"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the format sent in the payload is malformed. The payload contains a syntax error.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-101"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-101"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("h4",{attrs:{id:"variant-syntax-error"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-syntax-error"}},[t._v("#")]),t._v(" Variant: Syntax error")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `:payloadType` payload provided is malformed. `:syntaxErrorHelper`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"malformed_payload"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#malformed_payload"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v(":payloadType")]),t._v(" is e.g. "),a("code",[t._v("json")]),t._v(", "),a("code",[t._v("ndjson")]),t._v(", "),a("code",[t._v("csv")])])]),t._v(" "),a("h2",{attrs:{id:"feature-not-enabled"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#feature-not-enabled"}},[t._v("#")]),t._v(" feature_not_enabled")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-102"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-102"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when a request was made using an "),a("RouterLink",{attrs:{to:"/specifications/text/0193-experimental-features.html"}},[t._v("experimental feature")]),t._v(" that wasn't enabled.")],1),t._v(" "),a("h3",{attrs:{id:"error-definition-102"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-102"}},[t._v("#")]),t._v(" Error definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{:action} requires enabling the `{:featureName}` experimental feature. See {:productDiscussion}"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"feature_not_enabled"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#feature_not_enabled"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v(":action")]),t._v(' is the action that is not permitted without enabling the feature, e.g. "Getting the metrics"')]),t._v(" "),a("li",[a("code",[t._v(":featureName")]),t._v(' is the name of the feature that needs enabling, e.g. "Prometheus Metrics"')]),t._v(" "),a("li",[a("code",[t._v(":productDiscussion")]),t._v(" is the link to the product discussion that is tracking the feature")])]),t._v(" "),a("hr"),t._v(" "),a("h1",{attrs:{id:"internal-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#internal-type"}},[t._v("#")]),t._v(" internal type")]),t._v(" "),a("h2",{attrs:{id:"internal"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#internal"}},[t._v("#")]),t._v(" internal")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")]),t._v(" / "),a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-103"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-103"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error code occurs when an unknown and undetermined error has occurred at the server. This is a error that should not happen.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-103"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-103"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("500 Internal Server Error")]),t._v(" when "),a("code",[t._v("Synchronous")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"An internal error has occurred. `:reason`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"internal"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"internal"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#internal"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"index-creation-failed"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#index-creation-failed"}},[t._v("#")]),t._v(" index_creation_failed")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-104"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-104"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when an index creation could not be completed for various reasons.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-104"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-104"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The creation of the `:uid` index has failed due to `:reason`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"index_creation_failed"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"internal"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#index_creation_failed"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"unretrievable-document"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#unretrievable-document"}},[t._v("#")]),t._v(" unretrievable_document")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")]),t._v(" / "),a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-105"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-105"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when a document cannot be found in the system due to an inconsistent state that can occur for several reasons.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-105"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-105"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("500 Internal Server Error")]),t._v(" when "),a("code",[t._v("Synchronous")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The document `:documentId` is unretrievable due to `:reason`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"unretrievable_document"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"internal"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#unretrievable_document"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-state"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-state"}},[t._v("#")]),t._v(" invalid_state")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")]),t._v(" / "),a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-106"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-106"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the database is in an inconsistent state due to an uncontrolled internal error.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-106"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-106"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("500 Internal Server Error")]),t._v(" when "),a("code",[t._v("Synchronous")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The database is in an invalid state."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_state"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"internal"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_state"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"dump-process-failed"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#dump-process-failed"}},[t._v("#")]),t._v(" dump_process_failed")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-107"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-107"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs during the dump creation process. The dump creation was interrupted for various reasons.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-107"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-107"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The creation of the dump `:dumpId` failed due to `:reason`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"dump_process_failed"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"internal"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#dump_process_failed"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"database-size-limit-reached"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#database-size-limit-reached"}},[t._v("#")]),t._v(" database_size_limit_reached")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-108"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-108"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the user tries to add documents and the maximum size of the database reaches the limit. The user can correct this error by increasing the database size limit.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-108"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-108"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Maximum database size of `:databaseSizeLimit` has been reached."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"database_size_limit_reached"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"internal"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#database_size_limit_reached"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v(":databaseSizeLimit")]),t._v(" is e.g. "),a("code",[t._v("100GiB")])])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-store-file"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-store-file"}},[t._v("#")]),t._v(" invalid_store_file")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")]),t._v(" / "),a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-109"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-109"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the "),a("code",[t._v("data.ms")]),t._v(" folder is in an inconsistent state. It can happen for various reasons. An .mdb file can be corrupted, the data.ms folder has been replaced by a file, etc.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-109"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-109"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("500 Internal Server Error")]),t._v(" when "),a("code",[t._v("Synchronous")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The database file is in an invalid state."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_store_file"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"internal"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_store_file"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h1",{attrs:{id:"system-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#system-type"}},[t._v("#")]),t._v(" system type")]),t._v(" "),a("h2",{attrs:{id:"no-space-left-on-device"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#no-space-left-on-device"}},[t._v("#")]),t._v(" no_space_left_on_device")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")]),t._v(" / "),a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-110"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-110"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the host system partition has reached its maximum capacity and no longer accepts writes.\nIt can also happens when the task queue reaches its limit of ~10GiB of tasks (~10M tasks).")]),t._v(" "),a("h3",{attrs:{id:"error-definition-110"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-110"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("500 Internal Server Error")]),t._v(" when "),a("code",[t._v("Synchronous")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:kernelMessage`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"no_space_left_on_device"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"system"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#no_space_left_on_device"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("In the case of the task queue being full the HTTP Code returned is "),a("code",[t._v("422 Unprocessable Entity")]),t._v(" when "),a("code",[t._v("Synchronous")]),t._v(".")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Meilisearch cannot receive write operations because the limit of the task database has been reached. Please delete tasks to continue performing write operations."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"no_space_left_on_device"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"system"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#no_space_left_on_device"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"too-many-open-files"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#too-many-open-files"}},[t._v("#")]),t._v(" too_many_open_files")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")]),t._v(" / "),a("code",[t._v("Synchronous")]),t._v(" when "),a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-111"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-111"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the host system can't open more files.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-111"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-111"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("500 Internal Server Error")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:kernelMessage`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"too_many_open_files"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"system"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#too_many_open_files"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"io-error"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#io-error"}},[t._v("#")]),t._v(" io_error")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")]),t._v(" / "),a("code",[t._v("Synchronous")]),t._v(" when "),a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-112"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-112"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error generally occurs when the host system have no space left on device or when the database doesn't have read or write right.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-112"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-112"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("500 Internal Server Error")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:kernelMessage`. This error generally happens when you have no space left on device or when your database doesn\'t have read or write right."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"io_error"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"system"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#io_error"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h1",{attrs:{id:"auth-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#auth-type"}},[t._v("#")]),t._v(" auth type")]),t._v(" "),a("h2",{attrs:{id:"missing-authorization-header"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-authorization-header"}},[t._v("#")]),t._v(" missing_authorization_header")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-113"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-113"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the route is protected, and the "),a("code",[t._v("Authorization")]),t._v(" header is not provided.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-113"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-113"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("401 Unauthorized")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Authorization header is missing. It must use the bearer authorization method."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_authorization_header"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"auth"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_authorization_header"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-api-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-api-key"}},[t._v("#")]),t._v(" invalid_api_key")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-114"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-114"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the route is protected, and the value of the "),a("code",[t._v("Authorization")]),t._v(" header does not allow access to the resource.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-114"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-114"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("403 Forbidden")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The provided API key is invalid."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_api_key"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"auth"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_api_key"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-master-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-master-key"}},[t._v("#")]),t._v(" missing_master_key")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-115"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-115"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("For some specific protected routes (i.e. "),a("code",[t._v("/keys")]),t._v(") the master key must be defined before accessing it. This error indicates to the user that he must first define a master key when launching Meilisearch.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-115"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-115"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("401 Forbidden")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Meilisearch is running without a master key. To access this API endpoint, you must have set a master key at launch."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_master_key"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"auth"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_master_key"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-document-csv-delimiter"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-document-csv-delimiter"}},[t._v("#")]),t._v(" invalid_document_csv_delimiter")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-116"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-116"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("The csv delimiter must be exactly one char long, and this char must be an ASCII character.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-116"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-116"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Invalid value in parameter `csvDelimiter`: expected a string of one character, but found the following string of 5 characters: `doggo`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_document_csv_delimiter"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_document_csv_delimiter"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("```\n\n---\n\n## "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),t._v(". Technical details\nn/a\n\n## "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),t._v(". Future Possibilities\nn/a\n")])])])])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[27],{450:function(t,s,a){"use strict";a.r(s);var e=a(62),r=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"error-format-and-definitions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-format-and-definitions"}},[t._v("#")]),t._v(" Error Format and Definitions")]),t._v(" "),a("h2",{attrs:{id:"_1-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-functional-specification"}},[t._v("#")]),t._v(" 1. Functional Specification")]),t._v(" "),a("h3",{attrs:{id:"i-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#i-summary"}},[t._v("#")]),t._v(" I. Summary")]),t._v(" "),a("p",[t._v("This specification serves as a reference point for the complete list of API errors that the user may encounter.")]),t._v(" "),a("h3",{attrs:{id:"ii-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ii-motivation"}},[t._v("#")]),t._v(" II. Motivation")]),t._v(" "),a("p",[t._v("The motivation is to stabilize the current "),a("code",[t._v("error")]),t._v(" resource to a version that conforms to our API convention and thus allows future evolutions on a more solid base.")]),t._v(" "),a("p",[t._v("The second motivation is to describe in an exhaustive way all the errors that the user may encounter during his use of the API. This list will be kept up to date.")]),t._v(" "),a("h3",{attrs:{id:"iii-explanation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#iii-explanation"}},[t._v("#")]),t._v(" III. Explanation")]),t._v(" "),a("h4",{attrs:{id:"error-format"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-format"}},[t._v("#")]),t._v(" Error Format")]),t._v(" "),a("h5",{attrs:{id:"attributes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#attributes"}},[t._v("#")]),t._v(" Attributes")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Field name")]),t._v(" "),a("th",[t._v("type")]),t._v(" "),a("th",[t._v("Description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("message")]),t._v(" "),a("td",[t._v("string")]),t._v(" "),a("td",[t._v("A human-readable message providing context and details about the error.")])]),t._v(" "),a("tr",[a("td",[t._v("code")]),t._v(" "),a("td",[t._v("string")]),t._v(" "),a("td",[t._v("A string indicating the error code reported.")])]),t._v(" "),a("tr",[a("td",[t._v("type")]),t._v(" "),a("td",[t._v("string")]),t._v(" "),a("td",[t._v("The type of error returned. "),a("code",[t._v("invalid_request")]),t._v(", "),a("code",[t._v("internal")]),t._v(", "),a("code",[t._v("system")]),t._v(", and "),a("code",[t._v("auth")]),t._v(".")])]),t._v(" "),a("tr",[a("td",[t._v("link")]),t._v(" "),a("td",[t._v("string")]),t._v(" "),a("td",[t._v("An URL to the related error-page details for further information.")])])])]),t._v(" "),a("h5",{attrs:{id:"json-response-example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#json-response-example"}},[t._v("#")]),t._v(" Json Response Example")]),t._v(" "),a("p",[t._v("e.g. 401 Unauthorized Response example")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Authorization header is missing. It must use the bearer authorization method."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_authorization_header"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"auth"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_authorization_header"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[t._v("💡 The error object fields order must conform to the example.")])]),t._v(" "),a("h5",{attrs:{id:"type-enum"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#type-enum"}},[t._v("#")]),t._v(" type enum")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("type")]),t._v(" "),a("th",[t._v("description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("invalid_request")]),t._v(" "),a("td",[t._v("This type of error is used to indicate an input error. It is accompanied by an HTTP code "),a("code",[t._v("4xx")]),t._v(".")])]),t._v(" "),a("tr",[a("td",[t._v("internal")]),t._v(" "),a("td",[t._v("This type of error is returned when the search engine can't operate under normal condition. Most of the time, it's indicating an unexpected error. It is accompanied by an HTTP code "),a("code",[t._v("5xx")]),t._v(".")])]),t._v(" "),a("tr",[a("td",[t._v("system")]),t._v(" "),a("td",[t._v("This type of error is used to indicate a system limits being reached, such as the size of the disk, the size limit of an index, etc. It is accompanied by an HTTP code "),a("code",[t._v("5xx")]),t._v(".")])]),t._v(" "),a("tr",[a("td",[t._v("auth")]),t._v(" "),a("td",[t._v("This type of error is returned when it comes to authentication and authorization. It is accompanied by an HTTP code "),a("code",[t._v("4xx")]),t._v(".")])])])]),t._v(" "),a("hr"),t._v(" "),a("h4",{attrs:{id:"error-list"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-list"}},[t._v("#")]),t._v(" Error list")]),t._v(" "),a("p",[t._v("Following this format, here is the exhaustive list of errors that MeiliSearch can return to an API consumer. This list is updated as MeiliSearch evolves.")]),t._v(" "),a("p",[t._v("Errors can be returned in two different ways: "),a("code",[t._v("Synchronous")]),t._v(" or "),a("code",[t._v("Asynchronous")]),t._v(".")]),t._v(" "),a("p",[t._v("💡 "),a("code",[t._v("Synchronous")]),t._v(" errors are returned directly by the API in response to a user's request.")]),t._v(" "),a("p",[t._v("💡 Errors returned asynchronously in a "),a("code",[t._v("task")]),t._v(" object do not include a definition of the HTTP code. An asynchronous error is returned in the payload of a "),a("code",[t._v("task")]),t._v(" under the "),a("code",[t._v("error")]),t._v(" object.")]),t._v(" "),a("h1",{attrs:{id:"invalid-request-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-request-type"}},[t._v("#")]),t._v(" invalid_request type")]),t._v(" "),a("h2",{attrs:{id:"bad-request"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bad-request"}},[t._v("#")]),t._v(" bad_request")]),t._v(" "),a("h3",{attrs:{id:"context"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error code is generic. Whenever an error is thrown for a resource field, a clear and precise error code should be determined to guide the user efficiently.")]),t._v(" "),a("p",[t._v("E.g. Sending an unknown field for a resource raises a generic "),a("code",[t._v("bad_request")]),t._v(" error.")]),t._v(" "),a("h3",{attrs:{id:"error-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP code "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bad_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#bad_request"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"immutable-api-key-uid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#immutable-api-key-uid"}},[t._v("#")]),t._v(" immutable_api_key_uid")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-2"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("uid")]),t._v(" field is given in a payload dedicated to modify an API Key.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-2"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `uid` field cannot be modified for the given resource."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"immutable_api_key_uid"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#immutable_api_key_uid"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("--")]),t._v(" "),a("h2",{attrs:{id:"immutable-api-key-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#immutable-api-key-key"}},[t._v("#")]),t._v(" immutable_api_key_key")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-3"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("key")]),t._v(" field is given in a payload dedicated to modify an API Key.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-3"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `key` field cannot be modified for the given resource."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"immutable_api_key_uid"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#immutable_api_key_key"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"immutable-api-key-actions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#immutable-api-key-actions"}},[t._v("#")]),t._v(" immutable_api_key_actions")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-4"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("actions")]),t._v(" field is given in a payload dedicated to modify an API Key.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-4"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `actions` field cannot be modified for the given resource."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"immutable_api_key_actions"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#immutable_api_key_actions"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"immutable-api-key-indexes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#immutable-api-key-indexes"}},[t._v("#")]),t._v(" immutable_api_key_indexes")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-5"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-5"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("indexes")]),t._v(" field is given in a payload dedicated to modify an API Key.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-5"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-5"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `indexes` field cannot be modified for the given resource."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"immutable_api_key_indexes"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#immutable_api_key_indexes"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"immutable-api-key-expires-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#immutable-api-key-expires-at"}},[t._v("#")]),t._v(" immutable_api_key_expires_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-6"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-6"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("expiresAt")]),t._v(" field is given in a payload dedicated to modify an API Key.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-6"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-6"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `expiresAt` field cannot be modified for the given resource."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"immutable_api_key_expires_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#immutable_api_key_expires_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"immutable-api-key-created-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#immutable-api-key-created-at"}},[t._v("#")]),t._v(" immutable_api_key_created_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-7"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-7"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("createdAt")]),t._v(" field is given in a payload dedicated to modify an API Key.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-7"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-7"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `createdAt` field cannot be modified for the given resource."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"immutable_api_key_created_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#immutable_api_key_created_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"immutable-api-key-updated-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#immutable-api-key-updated-at"}},[t._v("#")]),t._v(" immutable_api_key_updated_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-8"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-8"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("updatedAt")]),t._v(" field is given in a payload dedicated to modify an API Key.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-8"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-8"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `updatedAt` field cannot be modified for the given resource."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"immutable_api_key_updated_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#immutable_api_key_updated_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"api-key-already-exists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#api-key-already-exists"}},[t._v("#")]),t._v(" api_key_already_exists")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-9"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-9"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when a user tries to create an API Key that already exists for the given "),a("code",[t._v("uid")]),t._v(".")]),t._v(" "),a("h3",{attrs:{id:"error-definition-9"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-9"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("409 Conflict")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`uid` field value `:value` is already an existing API key."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"api_key_already_exists"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#api_key_already_exists"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-api-key-actions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-api-key-actions"}},[t._v("#")]),t._v(" missing_api_key_actions")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-10"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-10"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when "),a("code",[t._v("actions")]),t._v(" is missing from the post api key resource payload.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-10"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-10"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`actions` field is mandatory."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_api_key_actions"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_api_key_actions"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-api-key-indexes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-api-key-indexes"}},[t._v("#")]),t._v(" missing_api_key_indexes")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-11"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-11"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when "),a("code",[t._v("indexes")]),t._v(" is missing from the post api key resource payload.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-11"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-11"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`indexes` field is mandatory."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_api_key_indexes"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_api_key_indexes"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-api-key-expires-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-api-key-expires-at"}},[t._v("#")]),t._v(" missing_api_key_expires_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-12"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-12"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when "),a("code",[t._v("expiresAt")]),t._v(" is missing from the post api key resource payload.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-12"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-12"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`expiresAt` field is mandatory."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_api_key_expires_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_api_key_expires_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-api-key-uid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-api-key-uid"}},[t._v("#")]),t._v(" invalid_api_key_uid")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-13"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-13"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("uid")]),t._v(" field for an "),a("code",[t._v("API Key")]),t._v(" resource is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-13"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-13"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`uid` field value `:value` is invalid. It should be a valid UUID v4 string or omitted."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_api_key_uid"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_api_key_uid"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-api-key-name"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-api-key-name"}},[t._v("#")]),t._v(" invalid_api_key_name")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-14"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-14"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("name")]),t._v(" field for an "),a("code",[t._v("API Key")]),t._v(" resource is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-14"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-14"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`name` field value `:value` is invalid. It should be a string or specified as a null value."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_api_key_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_api_key_name"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-api-key-description"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-api-key-description"}},[t._v("#")]),t._v(" invalid_api_key_description")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-15"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-15"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("description")]),t._v(" field for an "),a("code",[t._v("API Key")]),t._v(" resource is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-15"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-15"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`description` field value `:value` is invalid. It should be a string or specified as a null value."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_api_key_description"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_api_key_description"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-api-key-actions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-api-key-actions"}},[t._v("#")]),t._v(" invalid_api_key_actions")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-16"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-16"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("actions")]),t._v(" field for an "),a("code",[t._v("API Key")]),t._v(" resource is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-16"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-16"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`actions` field value `:value` is invalid. It should be an array of string representing action names."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_api_key_actions"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_api_key_actions"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-api-key-indexes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-api-key-indexes"}},[t._v("#")]),t._v(" invalid_api_key_indexes")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-17"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-17"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("indexes")]),t._v(" field for an "),a("code",[t._v("API Key")]),t._v(" resource is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-17"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-17"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`indexes` field value `:value` is invalid. It should be an array of string representing index names."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_api_key_indexes"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_api_key_indexes"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-sending-an-invalid-index-uid-format-in-the-indexes-field"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-sending-an-invalid-index-uid-format-in-the-indexes-field"}},[t._v("#")]),t._v(" Variant: Sending an invalid index uid format in the "),a("code",[t._v("indexes")]),t._v(" field.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`uid` is not a valid index uid pattern. Index uid patterns can be an integer or a string containing only alphanumeric characters, hyphens (-), underscores (_), and optionally end with a star (*)."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-api-key-expires-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-api-key-expires-at"}},[t._v("#")]),t._v(" invalid_api_key_expires_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-18"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-18"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("expiresAt")]),t._v(" field for an "),a("code",[t._v("API Key")]),t._v(" resource is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-18"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-18"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"`expiresAt` field value `:value` is invalid. It should follow the RFC 3339 format to represents a date or datetime in the future or specified as a null value. e.g. 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS'.\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_api_key_expires_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_api_key_expires_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-api-key-offset"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-api-key-offset"}},[t._v("#")]),t._v(" invalid_api_key_offset")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-19"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-19"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("offset")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-19"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-19"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_api_key_offset"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_api_key_offset"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-api-key-limit"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-api-key-limit"}},[t._v("#")]),t._v(" invalid_api_key_limit")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-20"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-20"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("limit")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-20"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-20"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_api_key_limit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_api_key_limit"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"index-already-exists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#index-already-exists"}},[t._v("#")]),t._v(" index_already_exists")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-21"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-21"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when a user tries to create an index that already exists.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-21"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-21"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Index `:uid` already exists."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"index_already_exists"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#index_already_exists"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-index-uid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-index-uid"}},[t._v("#")]),t._v(" missing_index_uid")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-22"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-22"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when "),a("code",[t._v("uid")]),t._v(" is missing from the post index resource payload.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-22"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-22"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_index_uid"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_index_uid"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-index-uid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-index-uid"}},[t._v("#")]),t._v(" invalid_index_uid")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-23"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-23"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when:")]),t._v(" "),a("ul",[a("li",[t._v("a value with a different type than "),a("code",[t._v("String")]),t._v(" for "),a("code",[t._v("uid")]),t._v(" is specified")]),t._v(" "),a("li",[t._v("an invalid index uid format is specified in the "),a("code",[t._v(":indexUid")]),t._v(" path parameter")])]),t._v(" "),a("h3",{attrs:{id:"error-definition-23"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-23"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("h4",{attrs:{id:"variant-sending-a-different-type-than-string-for-uid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-sending-a-different-type-than-string-for-uid"}},[t._v("#")]),t._v(" Variant: Sending a different type than "),a("code",[t._v("String")]),t._v(" for "),a("code",[t._v("uid")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_index_uid"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_index_uid"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-sending-an-invalid-string-for-uid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-sending-an-invalid-string-for-uid"}},[t._v("#")]),t._v(" Variant: Sending an invalid "),a("code",[t._v("String")]),t._v(" for "),a("code",[t._v("uid")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:uid` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_)."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"immutable-index-uid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#immutable-index-uid"}},[t._v("#")]),t._v(" immutable_index_uid")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-24"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-24"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("uid")]),t._v(" field is given in a payload dedicated to modify an index.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-24"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-24"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `uid` field cannot be modified for the given resource."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"immutable_index_uid"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#immutable_index_uid"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"immutable-index-created-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#immutable-index-created-at"}},[t._v("#")]),t._v(" immutable_index_created_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-25"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-25"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("createdAt")]),t._v(" field is given in a payload dedicated to modify an index.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-25"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-25"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `createdAt` field cannot be modified for the given resource."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"immutable_index_created_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#immutable_index_created_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"immutable-index-updated-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#immutable-index-updated-at"}},[t._v("#")]),t._v(" immutable_index_updated_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-26"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-26"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("updatedAt")]),t._v(" field is given in a payload dedicated to modify an index.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-26"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-26"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `updatedAt` field cannot be modified for the given resource."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"immutable_index_updated_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#immutable_index_updated_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-index-limit"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-index-limit"}},[t._v("#")]),t._v(" invalid_index_limit")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-27"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-27"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("limit")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-27"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-27"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_index_limit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_index_limit"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-index-offset"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-index-offset"}},[t._v("#")]),t._v(" invalid_index_offset")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-28"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-28"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("offset")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-28"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-28"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_index_offset"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_index_offset"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-index-primary-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-index-primary-key"}},[t._v("#")]),t._v(" invalid_index_primary_key")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-29"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-29"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when a value with a different type than "),a("code",[t._v("string")]),t._v(" or "),a("code",[t._v("null")]),t._v(" is specified for the "),a("code",[t._v("primaryKey")]),t._v(" field.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-29"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-29"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_index_primary_key"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_index_primary_key"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"index-primary-key-already-exists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#index-primary-key-already-exists"}},[t._v("#")]),t._v(" index_primary_key_already_exists")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-30"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-30"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when a user tries to update an index primary key while the index already has one primary key.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-30"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-30"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Index already has a primary key: `:primaryKey`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"index_primary_key_already_exists"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#index_primary_key_already_exists"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"index-primary-key-no-candidate-found"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#index-primary-key-no-candidate-found"}},[t._v("#")]),t._v(" index_primary_key_no_candidate_found")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-31"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-31"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the engine does not find an identifier in the payload documents to define it as the primary key of the index during the inference process when no document has already been inserted.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-31"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-31"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The primary key inference failed as the engine did not find any field ending with `id` in its name. Please specify the primary key manually using the `primaryKey` query parameter."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"index_primary_key_no_candidate_found"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#index_primary_key_no_candidate_found"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"index-primary-key-multiple-candidates-found"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#index-primary-key-multiple-candidates-found"}},[t._v("#")]),t._v(" index_primary_key_multiple_candidates_found")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")])]),t._v(" "),a("h3",{attrs:{id:"error-definition-32"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-32"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"The primary key inference failed as the engine found `:numCandidates` fields ending with `id` in their names: '`:firstCandidate`' and '`:secondCandidate`'. Please specify the primary key manually using the `primaryKey` query parameter.\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"index_primary_key_multiple_candidates_found"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#index_primary_key_multiple_candidates_found"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[t._v("The "),a("code",[t._v(":numCandidates")]),t._v(" is inferred when the message is generated. It is the number of fields that could serve as a primary key according to the engine's inference rules.")]),t._v(" "),a("li",[t._v("The "),a("code",[t._v(":firstCandidate")]),t._v(" and "),a("code",[t._v(":secondCandidate")]),t._v(" are inferred when the message is generated. They are the name of two of the fields that could serve as a primary key according to the engine's inference rules.")])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-document-id"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-document-id"}},[t._v("#")]),t._v(" missing_document_id")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-32"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-32"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the engine does not find the primary key previously defined for the index in the document payload.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-33"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-33"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Document doesn\'t have a `:primaryKey` attribute: `:documentRepresentation`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_document_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_document_id"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-document-id"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-document-id"}},[t._v("#")]),t._v(" invalid_document_id")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-33"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-33"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the value of a document identifier does not meet the requirements of the engine.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-34"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-34"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Document identifier `:documentId` is invalid. A document identifier can be of type integer or string, only composed of alphanumeric characters (a-z A-Z 0-9), hyphens (-) and underscores (_)."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_document_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_document_id"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-document-fields"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-document-fields"}},[t._v("#")]),t._v(" invalid_document_fields")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-34"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-34"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("String")]),t._v(" for "),a("code",[t._v("fields")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-35"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-35"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_document_fields"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_document_fields"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-document-filter"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-document-filter"}},[t._v("#")]),t._v(" invalid_document_filter")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")]),t._v(" / "),a("code",[t._v("Asynchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-35"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-35"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("String")]),t._v(", "),a("code",[t._v("Array of String")]),t._v(" or "),a("code",[t._v("Array of array of String")]),t._v(" for "),a("code",[t._v("filter")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-36"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-36"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_document_filter"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_document_filter"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-document-filter"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-document-filter"}},[t._v("#")]),t._v(" missing_document_filter")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-36"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-36"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when "),a("code",[t._v("filter")]),t._v(" is missing from a delete documents by filter operation.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-37"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-37"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("In the first case:")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`filter` field is mandatory."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_document_filter"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_document_filter"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-document-limit"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-document-limit"}},[t._v("#")]),t._v(" invalid_document_limit")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-37"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-37"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("limit")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-38"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-38"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_document_limit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_document_limit"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-document-offset"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-document-offset"}},[t._v("#")]),t._v(" invalid_document_offset")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-38"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-38"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("offset")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-39"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-39"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_document_offset"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_document_offset"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"document-fields-limit-reached"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#document-fields-limit-reached"}},[t._v("#")]),t._v(" document_fields_limit_reached")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")]),t._v(" — The error can be synchronous if a document with a number higher than the allowed field limit is sent.")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")]),t._v(" — The error can be asynchronous if the limit is reached when adding one or many fields during a document update.")]),t._v(" "),a("h3",{attrs:{id:"context-39"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-39"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("The maximum number of fields for a document is "),a("code",[t._v("65,535")]),t._v(". When this number is exceeded, this error is returned. This error is returned within a "),a("code",[t._v("task")]),t._v(" for a "),a("code",[t._v("documentAdditionOrUpdate")]),t._v(" operation.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-40"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-40"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")]),t._v(" when "),a("code",[t._v("Synchronous")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"A document cannot contain more than 65,535 fields."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"document_fields_limit_reached"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#documents_fields_limit_reached"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-settings-displayed-attributes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-settings-displayed-attributes"}},[t._v("#")]),t._v(" invalid_settings_displayed_attributes")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-40"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-40"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when a value type different of "),a("code",[t._v("Array of String")]),t._v(", "),a("code",[t._v("[]")]),t._v(", or "),a("code",[t._v("null")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-41"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-41"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_settings_displayed_attributes"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_settings_displayed_attributes"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-settings-searchable-attributes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-settings-searchable-attributes"}},[t._v("#")]),t._v(" invalid_settings_searchable_attributes")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-41"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-41"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when a value type different of "),a("code",[t._v("Array of String")]),t._v(", "),a("code",[t._v("[]")]),t._v(", or "),a("code",[t._v("null")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-42"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-42"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_settings_searchable_attributes"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_settings_searchable_attributes"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-settings-filterable-attributes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-settings-filterable-attributes"}},[t._v("#")]),t._v(" invalid_settings_filterable_attributes")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-42"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-42"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when a value type different of "),a("code",[t._v("Array of String")]),t._v(", "),a("code",[t._v("[]")]),t._v(", or "),a("code",[t._v("null")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-43"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-43"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_settings_filterable_attributes"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_settings_filterable_attributes"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-settings-sortable-attributes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-settings-sortable-attributes"}},[t._v("#")]),t._v(" invalid_settings_sortable_attributes")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-43"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-43"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when a value type different of "),a("code",[t._v("Array of String")]),t._v(", "),a("code",[t._v("[]")]),t._v(", or "),a("code",[t._v("null")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-44"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-44"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_settings_sortable_attributes"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_settings_sortable_attributes"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-settings-ranking-rules"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-settings-ranking-rules"}},[t._v("#")]),t._v(" invalid_settings_ranking_rules")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-44"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-44"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when:")]),t._v(" "),a("ul",[a("li",[t._v("an invalid format for the settings payload is specified")]),t._v(" "),a("li",[t._v("a non-existent ranking rule is specified")]),t._v(" "),a("li",[t._v("a malformed custom ranking rule is specified")]),t._v(" "),a("li",[t._v("a custom ranking rule is specified for a reserved keyword")])]),t._v(" "),a("h3",{attrs:{id:"error-definition-45"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-45"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")]),t._v(" when "),a("code",[t._v("Synchronous")])]),t._v(" "),a("h4",{attrs:{id:"variant-sending-an-invalid-format"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-sending-an-invalid-format"}},[t._v("#")]),t._v(" Variant: Sending an invalid format")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_settings_ranking_rules"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_settings_ranking_rules"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-sending-an-inexistent-ranking-rule-or-an-invalid-custom-ranking-rule-syntax"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-sending-an-inexistent-ranking-rule-or-an-invalid-custom-ranking-rule-syntax"}},[t._v("#")]),t._v(" Variant: Sending an inexistent ranking rule or an invalid custom ranking rule syntax.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:rankingRule` ranking rule is invalid. Valid ranking rules are words, typo, sort, proximity, attribute, exactness and custom ranking rules."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-specifying-a-custom-ranking-rule-on-reserved-fields-geo-or-geodistance"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-specifying-a-custom-ranking-rule-on-reserved-fields-geo-or-geodistance"}},[t._v("#")]),t._v(" Variant: Specifying a custom ranking rule on reserved fields "),a("code",[t._v("_geo")]),t._v(" or "),a("code",[t._v("_geoDistance")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:reservedKeyword` is a reserved keyword and thus can\'t be used as a ranking rule."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-specifying-a-custom-ranking-rule-on-reserved-expression-geopoint"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-specifying-a-custom-ranking-rule-on-reserved-expression-geopoint"}},[t._v("#")]),t._v(" Variant: Specifying a custom ranking rule on reserved expression "),a("code",[t._v("_geoPoint")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:reservedKeyword` is a reserved keyword and thus can\'t be used as a ranking rule. `:reservedKeyword` can only be used for sorting at search time."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-specifying-a-custom-ranking-rule-on-reserved-expressions-georadius-geoboundingbox"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-specifying-a-custom-ranking-rule-on-reserved-expressions-georadius-geoboundingbox"}},[t._v("#")]),t._v(" Variant: Specifying a custom ranking rule on reserved expressions "),a("code",[t._v("_geoRadius")]),t._v(" / "),a("code",[t._v("_geoBoundingBox")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:reservedKeyword` is a reserved keyword and thus can\'t be used as a ranking rule. `:reservedKeyword` can only be used for filtering at search time."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-settings-stop-words"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-settings-stop-words"}},[t._v("#")]),t._v(" invalid_settings_stop_words")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-45"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-45"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when a value type different of "),a("code",[t._v("Array of String")]),t._v(", "),a("code",[t._v("[]")]),t._v(", or "),a("code",[t._v("null")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-46"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-46"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_settings_stop_words"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_settings_stop_words"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-settings-synonyms"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-settings-synonyms"}},[t._v("#")]),t._v(" invalid_settings_synonyms")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-46"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-46"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when a value type different of "),a("code",[t._v("Object")]),t._v(", or "),a("code",[t._v("null")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-47"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-47"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_settings_synonyms"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_settings_synonyms"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-settings-distinct-attribute"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-settings-distinct-attribute"}},[t._v("#")]),t._v(" invalid_settings_distinct_attribute")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-47"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-47"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when a value type different of "),a("code",[t._v("String")]),t._v(" or "),a("code",[t._v("null")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-48"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-48"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_settings_distinct_attribute"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_settings_distinct_attribute"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-settings-typo-tolerance"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-settings-typo-tolerance"}},[t._v("#")]),t._v(" invalid_settings_typo_tolerance")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")]),t._v(" / "),a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-48"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-48"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error when:")]),t._v(" "),a("ul",[a("li",[t._v("a value different from "),a("code",[t._v("null")]),t._v(" or with a different type than "),a("code",[t._v("Boolean")]),t._v(" is specified for the "),a("code",[t._v("enabled")]),t._v(" field")]),t._v(" "),a("li",[t._v("a value different from "),a("code",[t._v("null")]),t._v(" or with a different type than "),a("code",[t._v("Array of String")]),t._v(" is specified for the "),a("code",[t._v("disableOnAttributes")]),t._v(" field")]),t._v(" "),a("li",[t._v("a value different from "),a("code",[t._v("null")]),t._v(" or with a different type than "),a("code",[t._v("Array of String")]),t._v(" is specified for the "),a("code",[t._v("disableOnWords")]),t._v(" field")]),t._v(" "),a("li",[t._v("a value different from "),a("code",[t._v("null")]),t._v(" or with a different type than "),a("code",[t._v("Integer")]),t._v(" is specified for the "),a("code",[t._v("minWordSizeForTypos")]),t._v(" object fields.")]),t._v(" "),a("li",[t._v("only one of the fields "),a("code",[t._v("oneTypo")]),t._v(" or "),a("code",[t._v("twoTypos")]),t._v(" for the "),a("code",[t._v("minWordSizeForTypos")]),t._v(" is specified and the value provided is invalid. ("),a("code",[t._v("Asynchronous")]),t._v(")")]),t._v(" "),a("li",[t._v("both "),a("code",[t._v("oneTypo")]),t._v(" and "),a("code",[t._v("twoTypos")]),t._v(" fields are specified for the "),a("code",[t._v("minWordSizeForTypos")]),t._v(" and the values provided are invalid. ("),a("code",[t._v("Synchronous")]),t._v(")")])]),t._v(" "),a("h3",{attrs:{id:"error-definition-49"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-49"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")]),t._v(" when "),a("code",[t._v("Synchronous")])]),t._v(" "),a("h4",{attrs:{id:"variant-enabled-disableonattributes-disableonwords-properties-are-invalid-regarding-their-expected-format"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-enabled-disableonattributes-disableonwords-properties-are-invalid-regarding-their-expected-format"}},[t._v("#")]),t._v(" Variant: "),a("code",[t._v("enabled")]),t._v(", "),a("code",[t._v("disableOnAttributes")]),t._v(", "),a("code",[t._v("disableOnWords")]),t._v(" properties are invalid regarding their expected format.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_settings_typo_tolerance"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_settings_typo_tolerance"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-minwordsizefortypos-object-is-invalid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-minwordsizefortypos-object-is-invalid"}},[t._v("#")]),t._v(" Variant: "),a("code",[t._v("minWordSizeForTypos")]),t._v(" object is invalid.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`minWordSizeForTypos` setting is invalid. `oneTypo` and `twoTypos` fields should be between `0` and `255`, and `twoTypos` should be greater or equals to `oneTypo` but found oneTypo: `:oneTypo` and twoTypos: `:twoTypos`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-settings-faceting"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-settings-faceting"}},[t._v("#")]),t._v(" invalid_settings_faceting")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-49"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-49"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when a value different from "),a("code",[t._v("null")]),t._v(" or with a different type than "),a("code",[t._v("Integer")]),t._v(" is specified for the "),a("code",[t._v("maxValuesPerFacet")]),t._v(" field.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-50"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-50"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_settings_faceting"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_settings_faceting"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-settings-pagination"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-settings-pagination"}},[t._v("#")]),t._v(" invalid_settings_pagination")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-50"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-50"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when a value different from "),a("code",[t._v("null")]),t._v(" or with a different type than "),a("code",[t._v("Integer")]),t._v(" is specified for the "),a("code",[t._v("maxTotalHits")]),t._v(" field.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-51"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-51"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_settings_pagination"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_settings_pagination"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-filter"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-filter"}},[t._v("#")]),t._v(" invalid_search_filter")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-51"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-51"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when:")]),t._v(" "),a("ul",[a("li",[t._v("there is a syntax error in the "),a("code",[t._v("filter")]),t._v(" parameter")]),t._v(" "),a("li",[t._v("an attribute expressed in the filter is not defined in the "),a("code",[t._v("filterableAttributes")]),t._v(" list")]),t._v(" "),a("li",[t._v("a reserved keyword like "),a("code",[t._v("_geo")]),t._v(", "),a("code",[t._v("_geoDistance")]),t._v(" and "),a("code",[t._v("_geoPoint")]),t._v(" is used as a filter")])]),t._v(" "),a("h3",{attrs:{id:"error-definition-52"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-52"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("h4",{attrs:{id:"variant-filtering-on-a-non-filterable-attribute"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-filtering-on-a-non-filterable-attribute"}},[t._v("#")]),t._v(" Variant: Filtering on a non filterable attribute")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Attribute `:attribute` is not filterable. Available filterable attributes are: `:filterableAttributes`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_filter"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_filter"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v(":filterableAttributes")]),t._v(" contains the list of filterable attributes separated by a comma. "),a("code",[t._v("filterableAttribute1, filterableAttribute2, ...")])])]),t._v(" "),a("h4",{attrs:{id:"variant-filtering-on-a-non-filterable-attribute-when-filterableattributes-is-empty"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-filtering-on-a-non-filterable-attribute-when-filterableattributes-is-empty"}},[t._v("#")]),t._v(" Variant: Filtering on a non filterable attribute when "),a("code",[t._v("filterableAttributes")]),t._v(" is empty")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Attribute `:attribute` is not filterable. This index does not have configured filterable attributes."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-using-geodistance-as-a-filter-expression"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-using-geodistance-as-a-filter-expression"}},[t._v("#")]),t._v(" Variant: Using "),a("code",[t._v("_geoDistance")]),t._v(" as a filter expression")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:reservedKeyword` is a reserved keyword and thus can\'t be used as a filter expression."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-using-geo-or-geopoint-as-a-filter-expression"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-using-geo-or-geopoint-as-a-filter-expression"}},[t._v("#")]),t._v(" Variant: Using "),a("code",[t._v("_geo")]),t._v(" or "),a("code",[t._v("_geoPoint")]),t._v(" as a filter expression")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:reservedKeyword` is a reserved keyword and thus can\'t be used as a filter expression. Use the _geoRadius(latitude, longitude, distance) built-in rule to filter on _geo field coordinates."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-invalid-syntax-for-the-filter-parameter"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-invalid-syntax-for-the-filter-parameter"}},[t._v("#")]),t._v(" Variant: Invalid syntax for the "),a("code",[t._v("filter")]),t._v(" parameter")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Invalid syntax for the filter parameter: `:syntaxErrorHelper`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-sort"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-sort"}},[t._v("#")]),t._v(" invalid_search_sort")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-52"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-52"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when:")]),t._v(" "),a("ul",[a("li",[t._v("there is a syntax error in the "),a("code",[t._v("sort")]),t._v(" parameter")]),t._v(" "),a("li",[t._v("an attribute expressed in the sort is not defined in the "),a("code",[t._v("sortableAttributes")]),t._v(" list, sort at search time while the "),a("code",[t._v("sort")]),t._v(" ranking rule is missing from the settings")]),t._v(" "),a("li",[t._v("a reserved keyword like "),a("code",[t._v("_geo")]),t._v(", "),a("code",[t._v("_geoDistance")]),t._v(" and "),a("code",[t._v("_geoRadius")]),t._v(" is used as a sort expression")])]),t._v(" "),a("h3",{attrs:{id:"error-definition-53"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-53"}},[t._v("#")]),t._v(" Error Definition:")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("h4",{attrs:{id:"variant-sorting-on-a-non-sortable-attribute"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-sorting-on-a-non-sortable-attribute"}},[t._v("#")]),t._v(" Variant: Sorting on a non sortable attribute")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Attribute `:attribute` is not sortable. Available sortable attributes are: `:sortableAttributes`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_sort"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_sort"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v(":sortableAttributes")]),t._v(" contains the list of sortable attributes separated by a comma. "),a("code",[t._v("sortableAttribute1, sortableAttribute2, ...")])])]),t._v(" "),a("h4",{attrs:{id:"variant-sorting-on-a-non-sortable-attribute-when-sortableattributes-is-empty"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-sorting-on-a-non-sortable-attribute-when-sortableattributes-is-empty"}},[t._v("#")]),t._v(" Variant: Sorting on a non sortable attribute when "),a("code",[t._v("sortableAttributes")]),t._v(" is empty")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Attribute `:attribute` is not sortable. This index does not have configured sortable attributes."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-using-geodistance-as-a-sort-expression"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-using-geodistance-as-a-sort-expression"}},[t._v("#")]),t._v(" Variant: Using "),a("code",[t._v("_geoDistance")]),t._v(" as a sort expression")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:reservedKeyword` is a reserved keyword and thus can\'t be used as a sort expression."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-using-geo-or-georadius-as-a-sort-expression"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-using-geo-or-georadius-as-a-sort-expression"}},[t._v("#")]),t._v(" Variant: Using "),a("code",[t._v("_geo")]),t._v(" or "),a("code",[t._v("_geoRadius")]),t._v(" as a sort expression")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:reservedKeyword` is a reserved keyword and thus can\'t be used as a sort expression. Use the _geoPoint(latitude, longitude) built-in rule to sort on _geo field coordinates."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-invalid-syntax-for-the-sortparameter"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-invalid-syntax-for-the-sortparameter"}},[t._v("#")]),t._v(" Variant: Invalid syntax for the "),a("code",[t._v("sort")]),t._v("parameter")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Invalid syntax for the sort parameter: `:syntaxErrorHelper`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-specifying-sort-at-search-time-while-the-sort-ranking-rule-isn-t-set-in-the-ranking-rules-settings"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-specifying-sort-at-search-time-while-the-sort-ranking-rule-isn-t-set-in-the-ranking-rules-settings"}},[t._v("#")]),t._v(" Variant: Specifying "),a("code",[t._v("sort")]),t._v(" at search time while the sort ranking rule isn't set in the ranking rules settings")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The sort ranking rule must be specified in the ranking rules settings to use the sort parameter at search time."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-q"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-q"}},[t._v("#")]),t._v(" invalid_search_q")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-53"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-53"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("String")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("q")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-54"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-54"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_q"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_q"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-vector"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-vector"}},[t._v("#")]),t._v(" invalid_search_vector")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-54"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-54"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs for the listed reasons:")]),t._v(" "),a("ul",[a("li",[t._v("if a value with a different type than "),a("code",[t._v("Array of Float")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("vector")]),t._v(" is specified.")]),t._v(" "),a("li",[t._v("if the vector length differs from the documents "),a("code",[t._v("_vectors")]),t._v(" length.")])]),t._v(" "),a("h3",{attrs:{id:"error-definition-55"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-55"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_vector"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_vector"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-offset"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-offset"}},[t._v("#")]),t._v(" invalid_search_offset")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-55"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-55"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("offset")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-56"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-56"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_offset"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_offset"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-limit"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-limit"}},[t._v("#")]),t._v(" invalid_search_limit")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-56"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-56"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("limit")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-57"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-57"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_limit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_limit"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-page"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-page"}},[t._v("#")]),t._v(" invalid_search_page")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-57"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-57"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("page")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-58"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-58"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_page"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_page"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-hits-per-page"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-hits-per-page"}},[t._v("#")]),t._v(" invalid_search_hits_per_page")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-58"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-58"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("hitsPerPage")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-59"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-59"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_hits_per_page"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_hits_per_page"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-attributes-to-retrieve"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-attributes-to-retrieve"}},[t._v("#")]),t._v(" invalid_search_attributes_to_retrieve")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-59"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-59"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Array of String")]),t._v(", "),a("code",[t._v("String")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("attributesToRetrieve")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-60"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-60"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_attributes_to_retrieve"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_attributes_to_retrieve"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-attributes-to-crop"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-attributes-to-crop"}},[t._v("#")]),t._v(" invalid_search_attributes_to_crop")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-60"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-60"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Array[String]")]),t._v(", "),a("code",[t._v("String")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("attributesToCrop")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-61"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-61"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_attributes_to_crop"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_attributes_to_crop"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-crop-length"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-crop-length"}},[t._v("#")]),t._v(" invalid_search_crop_length")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-61"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-61"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("cropLength")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-62"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-62"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_crop_length"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_crop_length"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-attributes-to-highlight"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-attributes-to-highlight"}},[t._v("#")]),t._v(" invalid_search_attributes_to_highlight")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-62"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-62"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Array[String]")]),t._v(", "),a("code",[t._v("String")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("attributesToHighlight")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-63"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-63"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_attributes_to_highlight"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_attributes_to_highlight"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-show-matches-position"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-show-matches-position"}},[t._v("#")]),t._v(" invalid_search_show_matches_position")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-63"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-63"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Boolean")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("showMatchesPosition")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-64"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-64"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_show_matches_position"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_show_matches_position"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-facets"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-facets"}},[t._v("#")]),t._v(" invalid_search_facets")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-64"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-64"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when:")]),t._v(" "),a("ul",[a("li",[t._v("A value with a different type than "),a("code",[t._v("Array of String")]),t._v(", "),a("code",[t._v("String")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("facets")]),t._v(" is specified.")]),t._v(" "),a("li",[t._v("A field not defined as a "),a("code",[t._v("filterableAttributes")]),t._v(" for "),a("code",[t._v("facets")]),t._v(" is specified.")])]),t._v(" "),a("h3",{attrs:{id:"error-definition-65"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-65"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("h4",{attrs:{id:"variant-an-type-is-given-for-facets"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-an-type-is-given-for-facets"}},[t._v("#")]),t._v(" Variant: An type is given for "),a("code",[t._v("facets")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_facets"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_facets"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-a-given-field-for-facets-is-not-specified-as-a-filterableattributes-settings"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-a-given-field-for-facets-is-not-specified-as-a-filterableattributes-settings"}},[t._v("#")]),t._v(" Variant: A given field for "),a("code",[t._v("facets")]),t._v(" is not specified as a "),a("code",[t._v("filterableAttributes")]),t._v(" settings")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Invalid facet distribution, the fields `:fieldName` are not set as filterable."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-highlight-pre-tag"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-highlight-pre-tag"}},[t._v("#")]),t._v(" invalid_search_highlight_pre_tag")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-65"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-65"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("String")]),t._v(" for "),a("code",[t._v("highlightPreTag")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-66"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-66"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_highlight_pre_tag"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_highlight_pre_tag"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-highlight-post-tag"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-highlight-post-tag"}},[t._v("#")]),t._v(" invalid_search_highlight_post_tag")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-66"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-66"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("String")]),t._v(" for "),a("code",[t._v("highlightPostTag")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-67"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-67"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_highlight_post_tag"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_highlight_post_tag"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-crop-marker"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-crop-marker"}},[t._v("#")]),t._v(" invalid_search_crop_marker")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-67"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-67"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("String")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("cropMarker")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-68"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-68"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_crop_marker"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_crop_marker"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-search-matching-strategy"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-matching-strategy"}},[t._v("#")]),t._v(" invalid_search_matching_strategy")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-68"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-68"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("String")]),t._v(" and other than "),a("code",[t._v("last")]),t._v(" or "),a("code",[t._v("all")]),t._v(" as a value for "),a("code",[t._v("matchingStrategy")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-69"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-69"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_matching_strategy"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_matching_strategy"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h2",{attrs:{id:"invalid-search-attributes-to-search-on"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-search-attributes-to-search-on"}},[t._v("#")]),t._v(" invalid_search_attributes_to_search_on")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-69"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-69"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Array of String")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" and other than attributes names contained in the settings "),a("code",[t._v("searchableAttributes")]),t._v(" as a value for "),a("code",[t._v("attributesToSearchOn")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-70"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-70"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_attributes_to_search_on"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_attributes_to_search_on"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-one-of-the-values-is-not-part-of-the-settings-searchableattributes-list"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-one-of-the-values-is-not-part-of-the-settings-searchableattributes-list"}},[t._v("#")]),t._v(" Variant: one of the values is not part of the settings "),a("code",[t._v("searchableAttributes")]),t._v(" list")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Attribute `:value` is not searchable. Available searchable attributes are: `:searchableAttributes`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_attributes_to_search_on"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_attributes_to_search_on"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-one-of-the-values-is-not-part-of-the-settings-searchableattributes-list-and-not-all-of-the-searchableattributes-are-displayable"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-one-of-the-values-is-not-part-of-the-settings-searchableattributes-list-and-not-all-of-the-searchableattributes-are-displayable"}},[t._v("#")]),t._v(" Variant: one of the values is not part of the settings "),a("code",[t._v("searchableAttributes")]),t._v(" list and not all of the "),a("code",[t._v("searchableAttributes")]),t._v(" are displayable")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Attribute `:value` is not searchable. Available searchable attributes are: `:DisplayableSearchableAttributes, <..hidden-attributes>`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_search_attributes_to_search_on"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_search_attributes_to_search_on"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-facet-search-facet-name"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-facet-search-facet-name"}},[t._v("#")]),t._v(" missing_facet_search_facet_name")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-70"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-70"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if "),a("code",[t._v("facetName")]),t._v(" isn't specified when making a facet search call.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-71"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-71"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_facet_search_facet_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_facet_search_facet_name"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-facet-search-facet-name"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-facet-search-facet-name"}},[t._v("#")]),t._v(" invalid_facet_search_facet_name")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-71"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-71"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This errors occurs when the provided value for "),a("code",[t._v("facetName")]),t._v(":")]),t._v(" "),a("ul",[a("li",[t._v("Is not a string")]),t._v(" "),a("li",[t._v("Is not defined in the "),a("code",[t._v("filterableAttributes")]),t._v(" index setting")])]),t._v(" "),a("h3",{attrs:{id:"error-definition-72"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-72"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_facet_search_facet_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_facet_search_facet_name"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-facet-search-facet-query"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-facet-search-facet-query"}},[t._v("#")]),t._v(" invalid_facet_search_facet_query")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-72"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-72"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This errors occurs when the provided value for "),a("code",[t._v("facetQuery")]),t._v(":")]),t._v(" "),a("ul",[a("li",[t._v("Is not a string or null")])]),t._v(" "),a("h3",{attrs:{id:"error-definition-73"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-73"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_facet_search_facet_query"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_facet_search_facet_query"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-document-geo-field"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-document-geo-field"}},[t._v("#")]),t._v(" invalid_document_geo_field")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-73"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-73"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("These errors occurs when the "),a("code",[t._v("_geo")]),t._v(" field of a document payload is not valid. Either the latitude / longitude is missing or is not a number.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-74"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-74"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("h4",{attrs:{id:"variant-geo-field-is-not-an-object"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-geo-field-is-not-an-object"}},[t._v("#")]),t._v(" Variant: "),a("code",[t._v("_geo")]),t._v(" field is not an object.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `_geo` field in the document with the id: `:documentId` is not an object. Was expecting an object with the `_geo.lat` and `_geo.lng` fields but instead got `:field`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_document_geo_field"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_document_geo_field"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-missing-geo-lat-and-geo-lng-field"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-missing-geo-lat-and-geo-lng-field"}},[t._v("#")]),t._v(" Variant: Missing "),a("code",[t._v("_geo.lat")]),t._v(" "),a("strong",[t._v("and")]),t._v(" "),a("code",[t._v("_geo.lng")]),t._v(" field.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Could not find latitude nor longitude in the document with the id: `:documentId`. Was expecting `_geo.lat` and `_geo.lng` fields."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-missing-geo-lat-or-geo-lng-field"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-missing-geo-lat-or-geo-lng-field"}},[t._v("#")]),t._v(" Variant: Missing "),a("code",[t._v("_geo.lat")]),t._v(" "),a("strong",[t._v("or")]),t._v(" "),a("code",[t._v("_geo.lng")]),t._v(" field.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Could not find :coord in the document with the id: `:documentId`. Was expecting a `:field` field."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-coordinate-can-t-be-parsed"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-coordinate-can-t-be-parsed"}},[t._v("#")]),t._v(" Variant: Coordinate can't be parsed.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Could not parse :coord in the document with the id: `:documentId`. Was expecting a finite number but instead got `:value`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[t._v("The "),a("code",[t._v(":coord")]),t._v(" is either "),a("code",[t._v("latitude")]),t._v(" or "),a("code",[t._v("longitude")]),t._v(" depending on what's wrong.")]),t._v(" "),a("li",[t._v("The "),a("code",[t._v(":field")]),t._v(" is either "),a("code",[t._v("_geo.lat")]),t._v(" or "),a("code",[t._v("_geo.lng")]),t._v(" depending on what's wrong.")])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-document-vectors-field"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-document-vectors-field"}},[t._v("#")]),t._v(" invalid_document_vectors_field")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-74"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-74"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the "),a("code",[t._v("_vectors")]),t._v(" field of a document payload is not valid either due to the type of it or the number of dimensions.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-75"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-75"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("h4",{attrs:{id:"variant-vectors-field-value-type-is-invalid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-vectors-field-value-type-is-invalid"}},[t._v("#")]),t._v(" Variant: "),a("code",[t._v("_vectors")]),t._v(" field value type is invalid")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `_vectors` field in the document with the id: `:documentId` is not an array. Was expecting an array of floats or an array of arrays of floats but instead got `:field`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_document_vectors_type"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_document_vectors_type"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-number-of-dimensions-is-not-correct"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-number-of-dimensions-is-not-correct"}},[t._v("#")]),t._v(" Variant: Number of dimensions is not correct")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Invalid vector dimensions: expected: `:expected`, found: `:found`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"payload-too-large"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#payload-too-large"}},[t._v("#")]),t._v(" payload_too_large")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-75"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-75"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the size of the payload sent exceeds the limit set by the server. The user can correct this error by reducing the payload size or increasing the limit with "),a("a",{attrs:{href:"https://docs.meilisearch.com/reference/features/configuration.html#payload-limit-size",target:"_blank",rel:"noopener noreferrer"}},[t._v("this configuration variable"),a("OutboundLink")],1)]),t._v(" "),a("h3",{attrs:{id:"error-definition-76"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-76"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("413 Payload Too Large")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The provided payload reached the size limit. The maximum accepted payload size is :playloadSizeLimit."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"payload_too_large"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#payload_too_large"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"not-found"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#not-found"}},[t._v("#")]),t._v(" not_found")]),t._v(" "),a("h3",{attrs:{id:"context-76"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-76"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error code is generic. It should not be used. Instead, a clear and precise error code should be determined.")]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"index-not-found"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#index-not-found"}},[t._v("#")]),t._v(" index_not_found")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")]),t._v(" / "),a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-77"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-77"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when a requested index can't be found.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-77"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-77"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code when "),a("code",[t._v("Synchronous")]),t._v(":")]),t._v(" "),a("ul",[a("li",[t._v("if the index uid was specified as part of the URL, "),a("code",[t._v("404 Not Found")])]),t._v(" "),a("li",[t._v("if the index uid was specified as part of the POST body, "),a("code",[t._v("400 Bad Request")])])]),t._v(" "),a("h4",{attrs:{id:"variant-multiples-indexuids-can-t-be-found"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-multiples-indexuids-can-t-be-found"}},[t._v("#")]),t._v(" Variant: Multiples indexUids can't be found")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Indexes `:indexUids` not found."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"index_not_found"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#index_not_found"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v(":indexUids")]),t._v(" values are separated by "),a("code",[t._v(",")]),t._v(".")])]),t._v(" "),a("h4",{attrs:{id:"variant-an-index-can-t-be-found"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-an-index-can-t-be-found"}},[t._v("#")]),t._v(" Variant: An index can't be found")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Index `:indexUid` not found."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-swap-indexes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-swap-indexes"}},[t._v("#")]),t._v(" missing_swap_indexes")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-78"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-78"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when "),a("code",[t._v("indexes")]),t._v(" is missing from a swap operation object.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-78"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-78"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`indexes` field is mandatory."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_swap_indexes"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_swap_indexes"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-swap-indexes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-swap-indexes"}},[t._v("#")]),t._v(" invalid_swap_indexes")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-79"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-79"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when:")]),t._v(" "),a("ul",[a("li",[t._v("an "),a("code",[t._v("indexes")]),t._v(" array not containing "),a("strong",[t._v("exactly")]),t._v(" 2 index uids for a swap operation object is specified in the payload")]),t._v(" "),a("li",[t._v("An index name is invalid in the "),a("code",[t._v("indexes")]),t._v(" array.")])]),t._v(" "),a("h3",{attrs:{id:"error-definition-79"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-79"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("h4",{attrs:{id:"variant-indexes-does-not-contains-exactly-2-index-uids"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-indexes-does-not-contains-exactly-2-index-uids"}},[t._v("#")]),t._v(" Variant: "),a("code",[t._v("indexes")]),t._v(" does not contains "),a("strong",[t._v("exactly")]),t._v(" 2 index uids")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Two indexes must be given for each swap. The list `:indexesList` contains `:indexesNumber` indexes."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_swap_indexes"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_swap_indexes"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-indexes-contains-one-index-uid-being-invalid"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-indexes-contains-one-index-uid-being-invalid"}},[t._v("#")]),t._v(" Variant: "),a("code",[t._v("indexes")]),t._v(" contains one index uid being invalid")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:uid` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_)."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-swap-duplicate-index-found"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-swap-duplicate-index-found"}},[t._v("#")]),t._v(" invalid_swap_duplicate_index_found")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-80"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-80"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the same indexUid is used twice in the "),a("code",[t._v("POST")]),t._v("- "),a("code",[t._v("swap-indexes")]),t._v(" payload.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-80"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-80"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("h4",{attrs:{id:"variant-a-single-indexuid-is-found-twice-in-the-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-a-single-indexuid-is-found-twice-in-the-payload"}},[t._v("#")]),t._v(" Variant: A single indexUid is found twice in the payload")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Indexes must be declared only once during a swap. `:indexUid` was specified several times."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_swap_duplicate_index_found"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_swap_duplicate_index_found"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"variant-several-indexuids-are-found-twice-in-the-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-several-indexuids-are-found-twice-in-the-payload"}},[t._v("#")]),t._v(" Variant: Several indexUids are found twice in the payload")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Indexes must be declared only once during a swap. `:indexUids` were specified several times."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v(":indexUids")]),t._v(" values are separated by "),a("code",[t._v(",")]),t._v(".")])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"document-not-found"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#document-not-found"}},[t._v("#")]),t._v(" document_not_found")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h2",{attrs:{id:"context-81"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-81"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when a requested document can't be found.")]),t._v(" "),a("h2",{attrs:{id:"error-definition-81"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-81"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("404 Not Found")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Document `:documentId` not found."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"document_not_found"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#document_not_found"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"task-not-found"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#task-not-found"}},[t._v("#")]),t._v(" task_not_found")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h4",{attrs:{id:"context-82"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-82"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when a requested task can't be found.")]),t._v(" "),a("h4",{attrs:{id:"error-definition-82"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-82"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("404 Not Found")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Task `:taskUid` not found."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"task_not_found"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#task_not_found"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-uids"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-uids"}},[t._v("#")]),t._v(" invalid_task_uids")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-83"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-83"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the "),a("code",[t._v("uids")]),t._v(" query parameter filter is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-83"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-83"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Task uid `:uid` is invalid. It should only contains numeric characters separated by `,` character."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_uids"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_uids"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-index-uids"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-index-uids"}},[t._v("#")]),t._v(" invalid_task_index_uids")]),t._v(" "),a("h3",{attrs:{id:"context-84"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-84"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the "),a("code",[t._v("indexUids")]),t._v(" query parameter contains an invalid index uid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-84"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-84"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:uid` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_)."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_index_uids"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_index_uids"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-before-enqueued-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-before-enqueued-at"}},[t._v("#")]),t._v(" invalid_task_before_enqueued_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-85"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-85"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the "),a("code",[t._v("beforeEnqueuedAt")]),t._v(" query parameter filter is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-85"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-85"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"Task `beforeEnqueuedAt` `:value` is invalid. It should follow the RFC 3339 format. e.g. 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS'.\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_before_enqueued_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_before_enqueued_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-after-enqueued-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-after-enqueued-at"}},[t._v("#")]),t._v(" invalid_task_after_enqueued_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-86"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-86"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the "),a("code",[t._v("afterEnqueuedAt")]),t._v(" query parameter filter is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-86"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-86"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"Task `afterEnqueuedAt` `:value` is invalid. It should follow the RFC 3339 format. e.g. 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS'.\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_after_enqueued_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_after_enqueued_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-before-started-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-before-started-at"}},[t._v("#")]),t._v(" invalid_task_before_started_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-87"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-87"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the "),a("code",[t._v("beforeStartedAt")]),t._v(" query parameter filter is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-87"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-87"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"Task `beforeStartedAt` `:value` is invalid. It should follow the RFC 3339 format. e.g. 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS'.\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_before_started_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_before_started_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-after-started-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-after-started-at"}},[t._v("#")]),t._v(" invalid_task_after_started_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-88"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-88"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the "),a("code",[t._v("afterStartedAt")]),t._v(" query parameter filter is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-88"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-88"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"Task `afterStartedAt` `:value` is invalid. It should follow the RFC 3339 format. e.g. 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS'.\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_after_started_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_after_started_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-before-finished-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-before-finished-at"}},[t._v("#")]),t._v(" invalid_task_before_finished_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-89"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-89"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the "),a("code",[t._v("beforeFinishedAt")]),t._v(" query parameter filter is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-89"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-89"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"Task `beforeFinishedAt` `:value` is invalid. It should follow the RFC 3339 format. e.g. 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS'.\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_before_finished_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_before_finished_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-after-finished-at"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-after-finished-at"}},[t._v("#")]),t._v(" invalid_task_after_finished_at")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-90"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-90"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the "),a("code",[t._v("afterFinishedAt")]),t._v(" query parameter filter is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-90"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-90"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"Task `afterFinishedAt` `:value` is invalid. It should follow the RFC 3339 format. e.g. 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS'.\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_after_finished_at"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_after_finished_at"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-statuses"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-statuses"}},[t._v("#")]),t._v(" invalid_task_statuses")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-91"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-91"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("status")]),t._v(" query parameter filter is invalid.")]),t._v(" "),a("h4",{attrs:{id:"error-definition-91"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-91"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Task status `:status` is invalid. Available task statuses are: `:taskStatuses`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_statuses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_statuses"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-types"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-types"}},[t._v("#")]),t._v(" invalid_task_types")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-92"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-92"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("types")]),t._v(" query parameter filter is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-92"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-92"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Task type `:type` is invalid. Available task types are: `:taskTypes`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_types"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_types"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-canceled-by"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-canceled-by"}},[t._v("#")]),t._v(" invalid_task_canceled_by")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-93"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-93"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when the "),a("code",[t._v("canceledBy")]),t._v(" query parameter filter is invalid.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-93"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-93"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Task canceledBy `:canceledBy` is invalid. It should only contains numeric characters separated by `,` character."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_canceled_by"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_canceled_by"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-task-filters"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-task-filters"}},[t._v("#")]),t._v(" missing_task_filters")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-94"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-94"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when no query parameters are given when a task cancelation or a task deletion request is sent.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-94"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-94"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Query parameters to filter the tasks to `:operation` are missing. Available query parameters are: `queryParametersNames`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_task_filters"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_task_filters"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-limit"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-limit"}},[t._v("#")]),t._v(" invalid_task_limit")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-95"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-95"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("limit")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-95"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-95"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_limit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_limit"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-task-from"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-task-from"}},[t._v("#")]),t._v(" invalid_task_from")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-96"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-96"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs if a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("from")]),t._v(" is specified.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-96"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-96"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:deserr_helper`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_task_from"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_task_from"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"api-key-not-found"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#api-key-not-found"}},[t._v("#")]),t._v(" api_key_not_found")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-97"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-97"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error happens when a requested api key can't be found.")]),t._v(" "),a("h4",{attrs:{id:"error-definition-97"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-97"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("404 Not Found")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"API key `:apiKey` not found."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"api_key_not_found"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#api_key_not_found"')]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-content-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-content-type"}},[t._v("#")]),t._v(" invalid_content_type")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-98"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-98"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the provided content-type is not handled by the API method.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-98"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-98"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("415 Unsupported Media Type")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Content-Type `:contentType` is invalid. Accepted values for the Content-Type header are: `:contentTypeList`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_content_type"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_content_type"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v(":contentTypeList")]),t._v(" values are separated by a "),a("code",[t._v(",")]),t._v(" char. e.g. "),a("code",[t._v("application/json")]),t._v(", "),a("code",[t._v("text/csv")]),t._v(".")])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-content-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-content-type"}},[t._v("#")]),t._v(" missing_content_type")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-99"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-99"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the Content-Type header is missing.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-99"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-99"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("415 Unsupported Media Type")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"A Content-Type header is missing. Accepted values for the Content-Type header are: `:contentTypeList`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_content_type"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_content_type"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v(":contentTypeList")]),t._v(" values are separated by a "),a("code",[t._v(",")]),t._v(" char. e.g. "),a("code",[t._v("application/json")]),t._v(", "),a("code",[t._v("text/csv")]),t._v(".")])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-payload"}},[t._v("#")]),t._v(" missing_payload")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-100"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-100"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the client does not provide a mandatory payload to the request.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-100"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-100"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"A `:payloadType` payload is missing."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_payload"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_payload"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v(":payloadType")]),t._v(" is e.g. "),a("code",[t._v("json")]),t._v(", "),a("code",[t._v("ndjson")]),t._v(", "),a("code",[t._v("csv")])])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"malformed-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#malformed-payload"}},[t._v("#")]),t._v(" malformed_payload")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-101"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-101"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the format sent in the payload is malformed. The payload contains a syntax error.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-101"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-101"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("h4",{attrs:{id:"variant-syntax-error"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#variant-syntax-error"}},[t._v("#")]),t._v(" Variant: Syntax error")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The `:payloadType` payload provided is malformed. `:syntaxErrorHelper`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"malformed_payload"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#malformed_payload"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v(":payloadType")]),t._v(" is e.g. "),a("code",[t._v("json")]),t._v(", "),a("code",[t._v("ndjson")]),t._v(", "),a("code",[t._v("csv")])])]),t._v(" "),a("h2",{attrs:{id:"feature-not-enabled"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#feature-not-enabled"}},[t._v("#")]),t._v(" feature_not_enabled")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-102"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-102"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when a request was made using an "),a("RouterLink",{attrs:{to:"/specifications/text/0193-experimental-features.html"}},[t._v("experimental feature")]),t._v(" that wasn't enabled.")],1),t._v(" "),a("h3",{attrs:{id:"error-definition-102"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-102"}},[t._v("#")]),t._v(" Error definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{:action} requires enabling the `{:featureName}` experimental feature. See {:productDiscussion}"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"feature_not_enabled"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#feature_not_enabled"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v(":action")]),t._v(' is the action that is not permitted without enabling the feature, e.g. "Getting the metrics"')]),t._v(" "),a("li",[a("code",[t._v(":featureName")]),t._v(' is the name of the feature that needs enabling, e.g. "Prometheus Metrics"')]),t._v(" "),a("li",[a("code",[t._v(":productDiscussion")]),t._v(" is the link to the product discussion that is tracking the feature")])]),t._v(" "),a("hr"),t._v(" "),a("h1",{attrs:{id:"internal-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#internal-type"}},[t._v("#")]),t._v(" internal type")]),t._v(" "),a("h2",{attrs:{id:"internal"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#internal"}},[t._v("#")]),t._v(" internal")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")]),t._v(" / "),a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-103"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-103"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error code occurs when an unknown and undetermined error has occurred at the server. This is a error that should not happen.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-103"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-103"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("500 Internal Server Error")]),t._v(" when "),a("code",[t._v("Synchronous")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"An internal error has occurred. `:reason`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"internal"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"internal"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#internal"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"index-creation-failed"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#index-creation-failed"}},[t._v("#")]),t._v(" index_creation_failed")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-104"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-104"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when an index creation could not be completed for various reasons.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-104"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-104"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The creation of the `:uid` index has failed due to `:reason`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"index_creation_failed"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"internal"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#index_creation_failed"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"unretrievable-document"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#unretrievable-document"}},[t._v("#")]),t._v(" unretrievable_document")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")]),t._v(" / "),a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-105"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-105"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when a document cannot be found in the system due to an inconsistent state that can occur for several reasons.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-105"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-105"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("500 Internal Server Error")]),t._v(" when "),a("code",[t._v("Synchronous")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The document `:documentId` is unretrievable due to `:reason`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"unretrievable_document"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"internal"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#unretrievable_document"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-state"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-state"}},[t._v("#")]),t._v(" invalid_state")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")]),t._v(" / "),a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-106"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-106"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the database is in an inconsistent state due to an uncontrolled internal error.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-106"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-106"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("500 Internal Server Error")]),t._v(" when "),a("code",[t._v("Synchronous")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The database is in an invalid state."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_state"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"internal"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_state"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"dump-process-failed"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#dump-process-failed"}},[t._v("#")]),t._v(" dump_process_failed")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-107"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-107"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs during the dump creation process. The dump creation was interrupted for various reasons.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-107"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-107"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The creation of the dump `:dumpId` failed due to `:reason`."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"dump_process_failed"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"internal"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#dump_process_failed"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"database-size-limit-reached"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#database-size-limit-reached"}},[t._v("#")]),t._v(" database_size_limit_reached")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-108"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-108"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the user tries to add documents and the maximum size of the database reaches the limit. The user can correct this error by increasing the database size limit.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-108"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-108"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Maximum database size of `:databaseSizeLimit` has been reached."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"database_size_limit_reached"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"internal"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#database_size_limit_reached"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[a("code",[t._v(":databaseSizeLimit")]),t._v(" is e.g. "),a("code",[t._v("100GiB")])])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-store-file"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-store-file"}},[t._v("#")]),t._v(" invalid_store_file")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")]),t._v(" / "),a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-109"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-109"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the "),a("code",[t._v("data.ms")]),t._v(" folder is in an inconsistent state. It can happen for various reasons. An .mdb file can be corrupted, the data.ms folder has been replaced by a file, etc.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-109"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-109"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("500 Internal Server Error")]),t._v(" when "),a("code",[t._v("Synchronous")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The database file is in an invalid state."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_store_file"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"internal"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_store_file"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h1",{attrs:{id:"system-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#system-type"}},[t._v("#")]),t._v(" system type")]),t._v(" "),a("h2",{attrs:{id:"no-space-left-on-device"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#no-space-left-on-device"}},[t._v("#")]),t._v(" no_space_left_on_device")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")]),t._v(" / "),a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-110"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-110"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the host system partition has reached its maximum capacity and no longer accepts writes.\nIt can also happens when the task queue reaches its limit of ~10GiB of tasks (~10M tasks).")]),t._v(" "),a("h3",{attrs:{id:"error-definition-110"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-110"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("500 Internal Server Error")]),t._v(" when "),a("code",[t._v("Synchronous")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:kernelMessage`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"no_space_left_on_device"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"system"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#no_space_left_on_device"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("In the case of the task queue being full the HTTP Code returned is "),a("code",[t._v("422 Unprocessable Entity")]),t._v(" when "),a("code",[t._v("Synchronous")]),t._v(".")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Meilisearch cannot receive write operations because the limit of the task database has been reached. Please delete tasks to continue performing write operations."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"no_space_left_on_device"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"system"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#no_space_left_on_device"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"too-many-open-files"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#too-many-open-files"}},[t._v("#")]),t._v(" too_many_open_files")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")]),t._v(" / "),a("code",[t._v("Synchronous")]),t._v(" when "),a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-111"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-111"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the host system can't open more files.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-111"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-111"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("500 Internal Server Error")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:kernelMessage`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"too_many_open_files"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"system"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#too_many_open_files"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"io-error"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#io-error"}},[t._v("#")]),t._v(" io_error")]),t._v(" "),a("p",[a("code",[t._v("Asynchronous")]),t._v(" / "),a("code",[t._v("Synchronous")]),t._v(" when "),a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-112"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-112"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error generally occurs when the host system have no space left on device or when the database doesn't have read or write right.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-112"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-112"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("500 Internal Server Error")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"`:kernelMessage`. This error generally happens when you have no space left on device or when your database doesn\'t have read or write right."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"io_error"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"system"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#io_error"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h1",{attrs:{id:"auth-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#auth-type"}},[t._v("#")]),t._v(" auth type")]),t._v(" "),a("h2",{attrs:{id:"missing-authorization-header"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-authorization-header"}},[t._v("#")]),t._v(" missing_authorization_header")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-113"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-113"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the route is protected, and the "),a("code",[t._v("Authorization")]),t._v(" header is not provided.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-113"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-113"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("401 Unauthorized")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Authorization header is missing. It must use the bearer authorization method."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_authorization_header"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"auth"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_authorization_header"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-api-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-api-key"}},[t._v("#")]),t._v(" invalid_api_key")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-114"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-114"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the route is protected, and the value of the "),a("code",[t._v("Authorization")]),t._v(" header does not allow access to the resource.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-114"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-114"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("403 Forbidden")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The provided API key is invalid."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_api_key"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"auth"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_api_key"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-master-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-master-key"}},[t._v("#")]),t._v(" missing_master_key")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-115"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-115"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("For some specific protected routes (i.e. "),a("code",[t._v("/keys")]),t._v(") the master key must be defined before accessing it. This error indicates to the user that he must first define a master key when launching Meilisearch.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-115"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-115"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("401 Forbidden")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Meilisearch is running without a master key. To access this API endpoint, you must have set a master key at launch."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_master_key"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"auth"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_master_key"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-document-csv-delimiter"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-document-csv-delimiter"}},[t._v("#")]),t._v(" invalid_document_csv_delimiter")]),t._v(" "),a("p",[a("code",[t._v("Synchronous")])]),t._v(" "),a("h3",{attrs:{id:"context-116"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-116"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("The csv delimiter must be exactly one char long, and this char must be an ASCII character.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-116"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-116"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Invalid value in parameter `csvDelimiter`: expected a string of one character, but found the following string of 5 characters: `doggo`"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_document_csv_delimiter"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_document_csv_delimiter"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("```\n\n---\n\n## "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),t._v(". Technical details\nn/a\n\n## "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),t._v(". Future Possibilities\nn/a\n")])])])])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/28.41999e7c.js b/docs/assets/js/28.8111d4f5.js similarity index 98% rename from docs/assets/js/28.41999e7c.js rename to docs/assets/js/28.8111d4f5.js index f0113a28c..27f60a688 100644 --- a/docs/assets/js/28.41999e7c.js +++ b/docs/assets/js/28.8111d4f5.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{453:function(t,i,e){"use strict";e.r(i);var s=e(62),a=Object(s.a)({},(function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("ul",[e("li",[t._v("Title: Words position limit")]),t._v(" "),e("li",[t._v("Start Date: 2021-10-06")]),t._v(" "),e("li",[t._v("Specification PR: "),e("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/77",target:"_blank",rel:"noopener noreferrer"}},[t._v("#77"),e("OutboundLink")],1)]),t._v(" "),e("li",[t._v("Discovery Issue: "),e("a",{attrs:{href:"https://github.com/meilisearch/product/issues/202",target:"_blank",rel:"noopener noreferrer"}},[t._v("#202"),e("OutboundLink")],1)])]),t._v(" "),e("h1",{attrs:{id:"words-position-limit"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#words-position-limit"}},[t._v("#")]),t._v(" Words position limit")]),t._v(" "),e("h2",{attrs:{id:"_1-functional-specification"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_1-functional-specification"}},[t._v("#")]),t._v(" 1. Functional Specification")]),t._v(" "),e("h3",{attrs:{id:"i-summary"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#i-summary"}},[t._v("#")]),t._v(" I. Summary")]),t._v(" "),e("p",[t._v("The purpose of this specification is to remove the limit of 1000 positions per attribute.")]),t._v(" "),e("h4",{attrs:{id:"summary-key-points"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#summary-key-points"}},[t._v("#")]),t._v(" Summary Key points")]),t._v(" "),e("ul",[e("li",[t._v("1000 positions limit per document field is now raised at 65535.")])]),t._v(" "),e("h3",{attrs:{id:"ii-motivation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ii-motivation"}},[t._v("#")]),t._v(" II. Motivation")]),t._v(" "),e("p",[t._v("We've seen many users denormalizing fields into multiple fields to index all the words because of the initial limit. This change will increases the limit to 65535, which should greatly reduce frictions on this issue. We expect to reduce the changes to be made to the document schema in order to use MeiliSearch more quickly and easily.")]),t._v(" "),e("h3",{attrs:{id:"iii-technical-explanations"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#iii-technical-explanations"}},[t._v("#")]),t._v(" III. Technical Explanations")]),t._v(" "),e("p",[t._v("n/a")]),t._v(" "),e("h2",{attrs:{id:"_2-technical-aspects"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-aspects"}},[t._v("#")]),t._v(" 2. Technical Aspects")]),t._v(" "),e("p",[t._v("When MeiliSearch indexes a document, it indexes several word positions per field until a limit is reached.")]),t._v(" "),e("p",[t._v("It is important to note that the limit is not strictly related to the number of words. Indeed, soft separators are also counted as "),e("code",[t._v("1")]),t._v(" position while hard separators are counted as "),e("code",[t._v("8")]),t._v(" positions.")]),t._v(" "),e("h2",{attrs:{id:"_3-future-possibilities"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[t._v("#")]),t._v(" 3. Future Possibilities")]),t._v(" "),e("ul",[e("li",[t._v("Expose a configurable default limit up to 65535.")])])])}),[],!1,null,null,null);i.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{451:function(t,i,e){"use strict";e.r(i);var s=e(62),a=Object(s.a)({},(function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("ul",[e("li",[t._v("Title: Words position limit")]),t._v(" "),e("li",[t._v("Start Date: 2021-10-06")]),t._v(" "),e("li",[t._v("Specification PR: "),e("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/77",target:"_blank",rel:"noopener noreferrer"}},[t._v("#77"),e("OutboundLink")],1)]),t._v(" "),e("li",[t._v("Discovery Issue: "),e("a",{attrs:{href:"https://github.com/meilisearch/product/issues/202",target:"_blank",rel:"noopener noreferrer"}},[t._v("#202"),e("OutboundLink")],1)])]),t._v(" "),e("h1",{attrs:{id:"words-position-limit"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#words-position-limit"}},[t._v("#")]),t._v(" Words position limit")]),t._v(" "),e("h2",{attrs:{id:"_1-functional-specification"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_1-functional-specification"}},[t._v("#")]),t._v(" 1. Functional Specification")]),t._v(" "),e("h3",{attrs:{id:"i-summary"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#i-summary"}},[t._v("#")]),t._v(" I. Summary")]),t._v(" "),e("p",[t._v("The purpose of this specification is to remove the limit of 1000 positions per attribute.")]),t._v(" "),e("h4",{attrs:{id:"summary-key-points"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#summary-key-points"}},[t._v("#")]),t._v(" Summary Key points")]),t._v(" "),e("ul",[e("li",[t._v("1000 positions limit per document field is now raised at 65535.")])]),t._v(" "),e("h3",{attrs:{id:"ii-motivation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ii-motivation"}},[t._v("#")]),t._v(" II. Motivation")]),t._v(" "),e("p",[t._v("We've seen many users denormalizing fields into multiple fields to index all the words because of the initial limit. This change will increases the limit to 65535, which should greatly reduce frictions on this issue. We expect to reduce the changes to be made to the document schema in order to use MeiliSearch more quickly and easily.")]),t._v(" "),e("h3",{attrs:{id:"iii-technical-explanations"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#iii-technical-explanations"}},[t._v("#")]),t._v(" III. Technical Explanations")]),t._v(" "),e("p",[t._v("n/a")]),t._v(" "),e("h2",{attrs:{id:"_2-technical-aspects"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-aspects"}},[t._v("#")]),t._v(" 2. Technical Aspects")]),t._v(" "),e("p",[t._v("When MeiliSearch indexes a document, it indexes several word positions per field until a limit is reached.")]),t._v(" "),e("p",[t._v("It is important to note that the limit is not strictly related to the number of words. Indeed, soft separators are also counted as "),e("code",[t._v("1")]),t._v(" position while hard separators are counted as "),e("code",[t._v("8")]),t._v(" positions.")]),t._v(" "),e("h2",{attrs:{id:"_3-future-possibilities"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[t._v("#")]),t._v(" 3. Future Possibilities")]),t._v(" "),e("ul",[e("li",[t._v("Expose a configurable default limit up to 65535.")])])])}),[],!1,null,null,null);i.default=a.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/29.a05f4317.js b/docs/assets/js/29.239d404a.js similarity index 99% rename from docs/assets/js/29.a05f4317.js rename to docs/assets/js/29.239d404a.js index 694a8b64d..0a1d80747 100644 --- a/docs/assets/js/29.a05f4317.js +++ b/docs/assets/js/29.239d404a.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{452:function(e,t,a){"use strict";a.r(t);var s=a(62),r=Object(s.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"api-keys"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#api-keys"}},[e._v("#")]),e._v(" API Keys")]),e._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("API keys allows to define which actions and which indexes are accessible by the holder of an API key. The use of API keys allows to secure the access to the routes in a fine-grained manner of a Meilisearch instance.")]),e._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[e._v("To make Meilisearch more reliable for teams and more adapted to production cases, we extend the management and the possibilities of restrictions regarding write and read requests on a Meilisearch instance by introducing a way to manage custom API keys.")]),e._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("h3",{attrs:{id:"_3-1-glossary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-glossary"}},[e._v("#")]),e._v(" 3.1. Glossary")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Term")]),e._v(" "),a("th",[e._v("Definition")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[e._v("Master Key")]),e._v(" "),a("td",[e._v("This is the master key that allows managing API keys. The master key is defined by the user when launching Meilisearch, thus gives access to the "),a("code",[e._v("/keys")]),e._v(" API endpoint and requiring requests to be authorized.")])]),e._v(" "),a("tr",[a("td",[e._v("API Key")]),e._v(" "),a("td",[e._v("API keys are stored and managed from the endpoint "),a("code",[e._v("/keys")]),e._v(" by the master key holder.")])])])]),e._v(" "),a("h3",{attrs:{id:"_3-2-explanation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-explanation"}},[e._v("#")]),e._v(" 3.2. Explanation")]),e._v(" "),a("h4",{attrs:{id:"_3-2-1-summary-key-points"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-summary-key-points"}},[e._v("#")]),e._v(" 3.2.1 Summary Key Points")]),e._v(" "),a("ul",[a("li",[e._v("API keys management is restricted to the master key or API keys having "),a("code",[e._v("keys.get")]),e._v(", "),a("code",[e._v("keys.create")]),e._v(", "),a("code",[e._v("keys.update")]),e._v(", "),a("code",[e._v("keys.delete")]),e._v(" or "),a("code",[e._v("*")]),e._v(" actions.")]),e._v(" "),a("li",[e._v("API keys must be provided via the "),a("code",[e._v("Authorization")]),e._v(" header using the bearer method to authorize a request.")]),e._v(" "),a("li",[e._v("The value of the "),a("code",[e._v("key")]),e._v(" field of an API Key is generated from its "),a("code",[e._v("uid")]),e._v(" and the master key.")]),e._v(" "),a("li",[e._v("When a master key is set at Meilisearch first-launch, it generate two pre-configured default "),a("code",[e._v("API Key")]),e._v(" resources. A "),a("code",[e._v("Default Search API Key")]),e._v(" authorizing the search action on all indexes and a "),a("code",[e._v("Default Admin API Key")]),e._v(" authorizing all actions.")]),e._v(" "),a("li",[e._v("If the master-key changes, the "),a("code",[e._v("key")]),e._v(" field is re-generated.")]),e._v(" "),a("li",[e._v("Default API keys can be modified/deleted from the "),a("code",[e._v("/keys")]),e._v(" endpoints but are not re-created if Meilisearch has already created them.")]),e._v(" "),a("li",[e._v("API keys can have restrictions on which methods can be accessed via an "),a("code",[e._v("actions")]),e._v(" list; they also "),a("code",[e._v("expiresAt")]),e._v(" a specific date time and are restricted to a specific set of "),a("code",[e._v("indexes")]),e._v(".")]),e._v(" "),a("li",[a("code",[e._v("name")]),e._v(" and "),a("code",[e._v("description")]),e._v(" fields are the only editable fields of an API key.")]),e._v(" "),a("li",[e._v("API key resources are propagated to snapshots and dumps.")])]),e._v(" "),a("h4",{attrs:{id:"_3-2-2-master-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-master-key"}},[e._v("#")]),e._v(" 3.2.2. Master Key")]),e._v(" "),a("p",[e._v("The master key exists to secure a Meilisearch instance. As soon as a master key is set via the "),a("code",[e._v("MEILI_MASTER_KEY")]),e._v(" environment variable or the "),a("code",[e._v("--master-key")]),e._v(" CLI option, the endpoint "),a("code",[e._v("/keys")]),e._v(" is accessible for the master key holder. It can be seen as a super admin key; It must be securely shared only with people who have to manage the security of a Meilisearch instance.")]),e._v(" "),a("p",[e._v("This master key is not an API key, thus is not stored and fetchable from the "),a("code",[e._v("/keys")]),e._v(" API endpoint. It must be seen as a runtime lock that activates the security of Meilisearch as soon as an instance is launched with it. The master key should only be used to fetch API Keys the first time. The default Admin API key should be preferred to manage the API keys resources.")]),e._v(" "),a("p",[e._v("At the first launch of Meilisearch with a master key, Meilisearch automatically generates two default API keys to cover the basic needs a user may encounter. It generates a "),a("code",[e._v("Default Search API Key")]),e._v(" dedicated to the search that can be used on the client-side and a "),a("code",[e._v("Default Admin API Key")]),e._v(" to manipulate a MeiliSearch instance from a backend side.")]),e._v(" "),a("p",[e._v("If the master key is removed at Meilisearch launch, the previously generated API keys no longer secure the Meilisearch instance.")]),e._v(" "),a("p",[e._v("If Meilisearch is launched with the "),a("code",[e._v("production")]),e._v(" value for the "),a("code",[e._v("MEILI_ENV")]),e._v(" environment variable or the "),a("code",[e._v("--env")]),e._v(" CLI option, a master key of at least 16 bytes is mandatory.")]),e._v(" "),a("p",[e._v("If the master key is omitted in that particular case, or is too short, Meilisearch launch is aborted and displays an error.")]),e._v(" "),a("p",[e._v("If Meilisearch is launched with the "),a("code",[e._v("development")]),e._v(" value for the "),a("code",[e._v("MEILI_ENV")]),e._v(" environment variable or the "),a("code",[e._v("--env")]),e._v(" CLI option, Meilisearch displays warning messages given different cases.")]),e._v(" "),a("p",[e._v("See "),a("a",{attrs:{href:"0119-instance-options#334-master-key"}},[a("code",[e._v("MEILI_MASTER_KEY")]),e._v("/"),a("code",[e._v("--master-key")]),e._v(" launch option")]),e._v(".")]),e._v(" "),a("p",[e._v("The master key must be composed of valid utf-8 characters. It is advisable to enclose it in "),a("code",[e._v("'")]),e._v(" when specified via the "),a("code",[e._v("--master-key")]),e._v(" option.")]),e._v(" "),a("blockquote",[a("p",[e._v("🚨 The master key should never be exposed to the public as it may compromise a Meilisearch instance.")])]),e._v(" "),a("blockquote",[a("p",[e._v("🚨 If the value of the master key changes, all the previously generated "),a("code",[e._v("API Keys")]),e._v(" changes, thus allowing to invalidate the set of API keys previously generated by regenerating a different value for their "),a("code",[e._v("key")]),e._v(" field. This is particularly useful in the case where the master key might have been leaked and the user needs to re-generate the whole set of keys at once to re-secure the instance.")])]),e._v(" "),a("blockquote",[a("p",[e._v("The master key does not appear on the "),a("code",[e._v("/keys")]),e._v(" endpoints and can't be used to authorize requests other than on the "),a("code",[e._v("/keys")]),e._v(" endpoint.")])]),e._v(" "),a("blockquote",[a("p",[e._v("The only route not secured in the presence of a master key is the "),a("code",[e._v("/health")]),e._v(" route.")])]),e._v(" "),a("h4",{attrs:{id:"_3-2-3-default-api-keys"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-default-api-keys"}},[e._v("#")]),e._v(" 3.2.3. Default API Keys")]),e._v(" "),a("p",[e._v("The first time a Meilisearch instance is launched with a "),a("code",[e._v("master key")]),e._v(", Meilisearch will generate two API keys described below.")]),e._v(" "),a("p",[e._v("If the user changes the value of the master key later, these two default keys are not created again but the "),a("code",[e._v("key")]),e._v(" field is re-generated. However, these two API keys can be updated/deleted using the "),a("code",[e._v("/keys")]),e._v(" endpoints.")]),e._v(" "),a("p",[e._v("If these API keys are deleted, the engine should not create them again when Meilisearch is launched again with a master key.")]),e._v(" "),a("h5",{attrs:{id:"_3-2-3-1-default-search-api-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-1-default-search-api-key"}},[e._v("#")]),e._v(" 3.2.3.1. Default Search API Key")]),e._v(" "),a("p",[e._v("The "),a("code",[e._v("Default Search API key")]),e._v(" gives access to the search endpoints on all indexes.")]),e._v(" "),a("p",[e._v("Here is how the "),a("code",[e._v("Default Search API Key")]),e._v(" is represented after its generation.")]),e._v(" "),a("div",{staticClass:"language-jsonc extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('{\n "uid": "01b4bc42-eb33-4041-b481-254d00cce834", //auto-generated value\n "key": "0a6e572506c52ab0bd6195921575d23092b7f0c284ab4ac86d12346c33057f99", //auto-generated value\n "name": "Default Search API Key",\n "description": "Use it to search from the frontend",\n "actions": [\n "search"\n ],\n "indexes": [\n "*"\n ],\n "expiresAt": null,\n "createdAt": "2021-08-11T10:00:00Z",\n "updatedAt": "2021-08-11T10:00:00Z"\n}\n')])])]),a("h5",{attrs:{id:"_3-2-3-2-default-admin-api-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-2-default-admin-api-key"}},[e._v("#")]),e._v(" 3.2.3.2. Default Admin API Key")]),e._v(" "),a("p",[e._v("The "),a("code",[e._v("Default Admin API key")]),e._v(" gives access to all actions by default.")]),e._v(" "),a("p",[e._v("Here is how the "),a("code",[e._v("Default Admin API Key")]),e._v(" is represented after its generation.")]),e._v(" "),a("div",{staticClass:"language-jsonc extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('{\n "uid": "ac06a7e1-6956-4699-bb04-dbeb72a231df", //auto-generated value\n "key": "380689dd379232519a54d15935750cc7625620a2ea2fc06907cb40ba5b421b6f", //auto-generated value\n "name": "Default Admin API Key",\n "description": "Use it for anything that is not a search operation. Caution! Do not expose it on a public frontend",\n "actions": [\n "*"\n ],\n "indexes": [\n "*"\n ],\n "expiresAt": null,\n "createdAt": "2021-08-11T10:00:00Z",\n "updatedAt": "2021-08-11T10:00:00Z"\n}\n')])])]),a("h4",{attrs:{id:"_3-2-4-api-endpoints-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2.4. API Endpoints Definition")]),e._v(" "),a("p",[e._v("Manipulate API keys of a Meilisearch instance. "),a("code",[e._v("/keys")]),e._v(" endpoints are "),a("strong",[e._v("only accessible by the master key holder.")])]),e._v(" "),a("h5",{attrs:{id:"_3-2-4-1-api-key-resource-representation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-1-api-key-resource-representation"}},[e._v("#")]),e._v(" 3.2.4.1. "),a("code",[e._v("API Key")]),e._v(" Resource Representation")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("field")]),e._v(" "),a("th",[e._v("type")]),e._v(" "),a("th",[e._v("description")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[e._v("uid")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("A unique identifier represented by a uuid v4. Can be specified at creation or generated by Meilisearch if ommited.")])]),e._v(" "),a("tr",[a("td",[e._v("key")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("The generated key to use when in the Authorization header when making requests. "),a("strong",[e._v("Generated by MeiliSearch by a combination of uid and the master key")]),e._v(".")])]),e._v(" "),a("tr",[a("td",[e._v("name")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("A non unique human readable name to ease identification of the API key. "),a("code",[e._v("null")]),e._v(" if empty.")])]),e._v(" "),a("tr",[a("td",[e._v("description")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("A description for the key. "),a("code",[e._v("null")]),e._v(" if empty.")])]),e._v(" "),a("tr",[a("td",[e._v("actions")]),e._v(" "),a("td",[e._v("array")]),e._v(" "),a("td",[e._v("A list of actions permitted for the key. "),a("code",[e._v('["*"]')]),e._v(" for all actions. See Actions List Definition part.")])]),e._v(" "),a("tr",[a("td",[e._v("indexes")]),e._v(" "),a("td",[e._v("array")]),e._v(" "),a("td",[e._v("A list of indexes permitted for the key. "),a("code",[e._v('["*"]')]),e._v(" for all indexes.")])]),e._v(" "),a("tr",[a("td",[e._v("expiresAt")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("Represent the expiration date and time as "),a("code",[e._v("RFC 3339")]),e._v(" format. "),a("code",[e._v("null")]),e._v(" equals to no expiration time.")])]),e._v(" "),a("tr",[a("td",[e._v("createdAt")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("Represent the date and time as "),a("code",[e._v("RFC 3339")]),e._v(" format when the API key has been created. "),a("strong",[e._v("Generated by MeiliSearch")])])]),e._v(" "),a("tr",[a("td",[e._v("updatedAt")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("Represent the date and time as "),a("code",[e._v("RFC 3339")]),e._v(" format when the API key has been updated. "),a("strong",[e._v("Default")]),e._v(": Value of "),a("code",[e._v("createdAt")]),e._v(". "),a("strong",[e._v("Generated by MeiliSearch")])])])])]),e._v(" "),a("h5",{attrs:{id:"_3-2-4-2-get-keys"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-2-get-keys"}},[e._v("#")]),e._v(" 3.2.4.2. "),a("code",[e._v("GET")]),e._v(" - "),a("code",[e._v("/keys")])]),e._v(" "),a("p",[e._v("Fetch the API keys of a Meilisearch instance.")]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-2-1-query-parameter-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-2-1-query-parameter-definition"}},[e._v("#")]),e._v(" 3.2.4.2.1. Query Parameter Definition")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Field")]),e._v(" "),a("th",[e._v("Type")]),e._v(" "),a("th",[e._v("Required")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("code",[e._v("offset")])]),e._v(" "),a("td",[e._v("Integer / "),a("code",[e._v("null")])]),e._v(" "),a("td",[e._v("false")])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("limit")])]),e._v(" "),a("td",[e._v("Integer / "),a("code",[e._v("null")])]),e._v(" "),a("td",[e._v("false")])])])]),e._v(" "),a("h6",{attrs:{id:"offset"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#offset"}},[e._v("#")]),e._v(" "),a("code",[e._v("offset")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Integer")]),e._v(" "),a("li",[e._v("Required: False")]),e._v(" "),a("li",[e._v("Default: "),a("code",[e._v("0")])])]),e._v(" "),a("p",[e._v("Sets the starting point in the results, effectively skipping over a given number of API keys.")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Sending a value with a different type than "),a("code",[e._v("Integer")]),e._v(" for "),a("code",[e._v("offset")]),e._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key_offset"}},[e._v("invalid_api_key_offset")]),e._v(" error.")],1)]),e._v(" "),a("h6",{attrs:{id:"limit"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#limit"}},[e._v("#")]),e._v(" "),a("code",[e._v("limit")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Integer")]),e._v(" "),a("li",[e._v("Required: False")]),e._v(" "),a("li",[e._v("Default: "),a("code",[e._v("20")])])]),e._v(" "),a("p",[e._v("Sets the maximum number of documents to be returned by the current request.")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Sending a value with a different type than "),a("code",[e._v("Integer")]),e._v(" for "),a("code",[e._v("limit")]),e._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key_limit"}},[e._v("invalid_api_key_limit")]),e._v(" error.")],1)]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-2-2-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-2-2-response-definition"}},[e._v("#")]),e._v(" 3.2.4.2.2. Response Definition")]),e._v(" "),a("p",[e._v("Returns a "),a("code",[e._v("200 Success")]),e._v(" HTTP code when the request is successful.")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Field")]),e._v(" "),a("th",[e._v("Type")]),e._v(" "),a("th",[e._v("Required")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("code",[e._v("results")])]),e._v(" "),a("td",[e._v("Array of "),a("a",{attrs:{href:"#3241-api-key-resource-representation"}},[e._v("APIKey")])]),e._v(" "),a("td",[e._v("true")])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("offset")])]),e._v(" "),a("td",[e._v("Integer")]),e._v(" "),a("td",[e._v("true")])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("limit")])]),e._v(" "),a("td",[e._v("Integer")]),e._v(" "),a("td",[e._v("true")])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("total")])]),e._v(" "),a("td",[e._v("Integer")]),e._v(" "),a("td",[e._v("true")])])])]),e._v(" "),a("h6",{attrs:{id:"results"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#results"}},[e._v("#")]),e._v(" "),a("code",[e._v("results")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Array[APIKey]")]),e._v(" "),a("li",[e._v("Required: True")])]),e._v(" "),a("p",[e._v("An array containing the fetched API keys.")]),e._v(" "),a("h6",{attrs:{id:"offset-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#offset-2"}},[e._v("#")]),e._v(" "),a("code",[e._v("offset")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Integer")]),e._v(" "),a("li",[e._v("Required: True")])]),e._v(" "),a("p",[e._v("Gives the "),a("code",[e._v("offset")]),e._v(" parameter used for the query.")]),e._v(" "),a("h6",{attrs:{id:"limit-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#limit-2"}},[e._v("#")]),e._v(" "),a("code",[e._v("limit")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Integer")]),e._v(" "),a("li",[e._v("Required: True")])]),e._v(" "),a("p",[e._v("Gives the "),a("code",[e._v("limit")]),e._v(" parameter used for the query.")]),e._v(" "),a("h6",{attrs:{id:"total"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#total"}},[e._v("#")]),e._v(" "),a("code",[e._v("total")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Integer")]),e._v(" "),a("li",[e._v("Required: True")])]),e._v(" "),a("p",[e._v("Gives the total number of API keys that can be browsed.")]),e._v(" "),a("blockquote",[a("p",[e._v("API Keys are ordered by "),a("code",[e._v("createdAt")]),e._v(" in "),a("code",[e._v("desc")]),e._v(" order. (Most recent first)")])]),e._v(" "),a("blockquote",[a("p",[e._v("Expired API keys can be found on the "),a("code",[e._v("/keys")]),e._v(" endpoints. An archiving system or a filter could allow to not display them by default. See Future Possibilities part.")])]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-2-3-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-2-3-errors"}},[e._v("#")]),e._v(" 3.2.4.2.3. Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Accessing this route while a master key is not set for the instance returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_master_key"}},[e._v("missing_master_key")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Accessing this route without the "),a("code",[e._v("Authorization")]),e._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Accessing this route without the master key returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-2-4-example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-2-4-example"}},[e._v("#")]),e._v(" 3.2.4.2.4. Example")]),e._v(" "),a("p",[a("code",[e._v("200 Success")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"results"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"description"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Manage Products/Reviews Documents API key"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"uid"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"ac06a7e1-6956-4699-bb04-dbeb72a231df"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"key"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2fcdddd16ab75a4aeea6b74577874bc2888938a69ffafe3d05547560fa72e15b"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"actions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"documents.add"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"documents.delete"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"indexes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"products"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"reviews"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"expiresAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2021-12-31T23:59:59Z"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"createdAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2021-10-12T00:00:00Z"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"updatedAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2021-10-13T15:00:00Z"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"description"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Default Search API Key (Use it to search from the frontend code)"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"uid"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"87861fb0-e948-41da-ae7f-89617d57d5f5"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"key"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"0fe6fc6d94a21b5ca0b5a714bcb338865108039efc048e99e5ba2e7a976fa330"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"actions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"search"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"indexes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"*"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"expiresAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[e._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"createdAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2021-08-11T10:00:00Z"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"updatedAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2021-08-11T10:00:00Z"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"description"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Default Admin API Key (Use it for all other operations. Caution! Do not share it on the client side)"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"uid"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"ad9af94e-d2db-420f-9ee3-9375f091e565"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"key"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"1846b591d7fd0454bc2b7f1c7ad80c411b1cfe46a51b0d44e6554a30f4bc0a18"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"actions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"*"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"indexes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"*"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"expiresAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[e._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"createdAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2021-08-11T10:00:00Z"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"updatedAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2021-08-11T10:00:00Z"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"offset"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"limit"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("20")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"total"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("3")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("blockquote",[a("p",[e._v("👉 Note the two default generated API keys here. When a master key is set at MeiliSearch's launch, it generates two pre-configured "),a("code",[e._v("API Keys")]),e._v(". A Default Search API Key restricted to the search action on all indexes and a Default Admin API Key on all indexes to handle all operations (except managing API Keys).")])]),e._v(" "),a("h5",{attrs:{id:"_3-2-4-3-get-keys-uid-or-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-3-get-keys-uid-or-key"}},[e._v("#")]),e._v(" 3.2.4.3. "),a("code",[e._v("GET")]),e._v(" - "),a("code",[e._v("/keys/:uid_or_key")])]),e._v(" "),a("p",[e._v("Fetch a specific API key of a Meilisearch instance from it's "),a("code",[e._v("uid")]),e._v(" or "),a("code",[e._v("key")]),e._v(" field.")]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-3-1-query-parameter-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-3-1-query-parameter-definition"}},[e._v("#")]),e._v(" 3.2.4.3.1. Query Parameter Definition")]),e._v(" "),a("p",[e._v("n/a")]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-3-2-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-3-2-response-definition"}},[e._v("#")]),e._v(" 3.2.4.3.2. Response Definition")]),e._v(" "),a("p",[e._v("Returns a "),a("code",[e._v("200 Success")]),e._v(" HTTP code when the request is successful.")]),e._v(" "),a("p",[e._v("See "),a("a",{attrs:{href:"#3241-api-key-resource-representation"}},[e._v("API Key Resource Representation")]),e._v(" section for the response body.")]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-3-3-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-3-3-errors"}},[e._v("#")]),e._v(" 3.2.4.3.3. Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Accessing this route while a master key is not set for the instance returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_master_key"}},[e._v("missing_master_key")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Accessing this route without the "),a("code",[e._v("Authorization")]),e._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Accessing this route without the master key or an API key missing the "),a("code",[e._v("keys.get")]),e._v(" permission returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),a("h5",{attrs:{id:"_3-2-4-4-post-keys"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-4-post-keys"}},[e._v("#")]),e._v(" 3.2.4.4. "),a("code",[e._v("POST")]),e._v(" - "),a("code",[e._v("/keys")])]),e._v(" "),a("p",[e._v("Create an API key.")]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-4-1-payload-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-4-1-payload-definition"}},[e._v("#")]),e._v(" 3.2.4.4.1. Payload Definition")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("field")]),e._v(" "),a("th",[e._v("type")]),e._v(" "),a("th",[e._v("required")]),e._v(" "),a("th",[e._v("description")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[e._v("uid")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("Optional")]),e._v(" "),a("td",[e._v("A unique identifier represented by a "),a("a",{attrs:{href:"https://fr.wikipedia.org/wiki/Universally_unique_identifier",target:"_blank",rel:"noopener noreferrer"}},[e._v("uuid v4"),a("OutboundLink")],1),e._v(". Specified at creation or generated by Meilisearch if ommited.")])]),e._v(" "),a("tr",[a("td",[e._v("name")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("Optional")]),e._v(" "),a("td",[e._v("A non unique human readable name to ease identification of the API key. "),a("strong",[e._v("Default")]),e._v(": "),a("code",[e._v("null")])])]),e._v(" "),a("tr",[a("td",[e._v("description")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("Optional")]),e._v(" "),a("td",[e._v("A description for the API key. "),a("strong",[e._v("Default")]),e._v(": "),a("code",[e._v("null")])])]),e._v(" "),a("tr",[a("td",[e._v("actions")]),e._v(" "),a("td",[e._v("array")]),e._v(" "),a("td",[e._v("Required")]),e._v(" "),a("td",[e._v("A list of actions permitted for the API key. "),a("code",[e._v('["*"]')]),e._v(" for all actions. "),a("strong",[e._v("See Actions list definition part")]),e._v(". The "),a("code",[e._v("*")]),e._v(" character can be used as a wildcard when located at the last position. e.g. "),a("code",[e._v("documents.*")]),e._v(" to authorize access on all documents endpoints. "),a("strong",[e._v("Default")]),e._v(": "),a("code",[e._v("No default")])])]),e._v(" "),a("tr",[a("td",[e._v("indexes")]),e._v(" "),a("td",[e._v("array")]),e._v(" "),a("td",[e._v("Required")]),e._v(" "),a("td",[a("code",[e._v("[*]")]),e._v(" for all indexes. The "),a("code",[e._v("*")]),e._v(" character can be used as a wildcard when located in the last position. e.g. "),a("code",[e._v("products_*")]),e._v(" to allow access to all indexes whose names start with "),a("code",[e._v("products_")]),e._v(". "),a("strong",[e._v("Default")]),e._v(": "),a("code",[e._v("No Default")])])]),e._v(" "),a("tr",[a("td",[e._v("expiresAt")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("Required")]),e._v(" "),a("td",[e._v("The expiration date and time as "),a("code",[e._v("RFC 3339")]),e._v(" format. "),a("code",[e._v("null")]),e._v(" equals to no expiration time. Sending only the date part e.g "),a("code",[e._v("2021-12-01")]),e._v(" leads to having an "),a("code",[e._v("expiresAt")]),e._v(" value set to "),a("code",[e._v("2021-12-01T00:00:00")]),e._v(". "),a("strong",[e._v("Default")]),e._v(": "),a("code",[e._v("No Default")])])])])]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-4-2-actions-list-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-4-2-actions-list-definition"}},[e._v("#")]),e._v(" 3.2.4.4.2. "),a("code",[e._v("actions")]),e._v(" List Definition")]),e._v(" "),a("blockquote",[a("p",[a("code",[e._v(":authorizedIndexes")]),e._v(" can be any value extracted from the "),a("code",[e._v("indexes")]),e._v(" field of an API key resource.")])]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("name")]),e._v(" "),a("th",[e._v("description")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[e._v("search")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("GET")]),e._v(" and "),a("code",[e._v("POST")]),e._v(" methods on "),a("code",[e._v("/indexes/:authorizedIndexes/search")]),e._v(" routes.")])]),e._v(" "),a("tr",[a("td",[e._v("documents.add")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("POST")]),e._v(" and "),a("code",[e._v("PUT")]),e._v(" on "),a("code",[e._v("/indexes/:authorizedIndexes/documents")]),e._v(" routes.")])]),e._v(" "),a("tr",[a("td",[e._v("documents.get")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("GET")]),e._v(" methods on "),a("code",[e._v("/indexes/:authorizedIndexes/documents")]),e._v(", "),a("code",[e._v("/indexes/:authorizedIndexes/documents/:documentId")]),e._v(" and "),a("code",[e._v("POST")]),e._v(" methods on "),a("code",[e._v("/indexes/:authorizedIndexes/documents/fetch")]),e._v(" routes.")])]),e._v(" "),a("tr",[a("td",[e._v("documents.delete")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("DELETE")]),e._v(" method on "),a("code",[e._v("/indexes/:authorizedIndexes/documents/:documentId")]),e._v(", "),a("code",[e._v("indexes/:authorizedIndexes/documents/:documentId")]),e._v(" and "),a("code",[e._v("POST")]),e._v(" method on "),a("code",[e._v("/indexes/:authorizedIndexes/documents/delete-batch")]),e._v(" and "),a("code",[e._v("/indexes/:authorizedIndexes/documents/delete")]),e._v(" routes.")])]),e._v(" "),a("tr",[a("td",[e._v("indexes.create")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("POST")]),e._v(" "),a("code",[e._v("/indexes")]),e._v(". "),a("strong",[e._v("⚠️ "),a("code",[e._v("indexes")]),e._v(" field should indicate the newly created index or having "),a("code",[e._v("[*]")]),e._v(" to permits access on it.")]),e._v(".")])]),e._v(" "),a("tr",[a("td",[e._v("indexes.get")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("GET")]),e._v(" "),a("code",[e._v("/indexes")]),e._v(" and "),a("code",[e._v("/indexes/:authorizedIndexes")]),e._v(". "),a("strong",[e._v("⚠️Non-authorized "),a("code",[e._v("indexes")]),e._v(" are omitted from the response on "),a("code",[e._v("/indexes")])]),e._v(".")])]),e._v(" "),a("tr",[a("td",[e._v("indexes.update")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("PUT")]),e._v(" "),a("code",[e._v("/indexes/:authorizedIndexes")]),e._v(".")])]),e._v(" "),a("tr",[a("td",[e._v("indexes.delete")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("DELETE")]),e._v(" "),a("code",[e._v("/indexes/:authorizedIndexes")]),e._v(".")])]),e._v(" "),a("tr",[a("td",[e._v("indexes.swap")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("POST")]),e._v(" "),a("code",[e._v("/swap-indexes")]),e._v(". See "),a("RouterLink",{attrs:{to:"/specifications/text/0191-swap-indexes-api.html"}},[e._v("Swap Indexes API")]),e._v(" specification.")],1)]),e._v(" "),a("tr",[a("td",[e._v("tasks.get")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("GET")]),e._v(" "),a("code",[e._v("/tasks")]),e._v(". "),a("strong",[e._v("⚠️Non-authorized "),a("code",[e._v("indexes")]),e._v(" are omitted from the response on "),a("code",[e._v("/tasks")])]),e._v(". Also add access to "),a("code",[e._v("GET")]),e._v(" "),a("code",[e._v("/indexes/:authorizedIndexes/tasks")]),e._v(" routes.")])]),e._v(" "),a("tr",[a("td",[e._v("tasks.cancel")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("POST")]),e._v(" "),a("code",[e._v("/tasks/cancel")]),e._v(". route.")])]),e._v(" "),a("tr",[a("td",[e._v("tasks.delete")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("DELETE")]),e._v(" "),a("code",[e._v("/tasks")]),e._v(" route.")])]),e._v(" "),a("tr",[a("td",[e._v("settings.get")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("GET")]),e._v(" "),a("code",[e._v("/indexes/:authorizedIndexes/settings")]),e._v(" and "),a("code",[e._v("/indexes/:authorizedIndexes/settings/*")]),e._v(" routes.")])]),e._v(" "),a("tr",[a("td",[e._v("settings.update")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("POST / DELETE")]),e._v(" "),a("code",[e._v("/indexes/:authorizedIndexes/settings")]),e._v(" and "),a("code",[e._v("/indexes/:authorizedIndexes/settings/*")]),e._v(" routes.")])]),e._v(" "),a("tr",[a("td",[e._v("stats.get")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("GET")]),e._v(" "),a("code",[e._v("/stats")]),e._v(". "),a("strong",[e._v("⚠️Non-authorized "),a("code",[e._v("indexes")]),e._v(" are omitted from the response on "),a("code",[e._v("/stats")])]),e._v(". Also add access to "),a("code",[e._v("GET")]),e._v(" "),a("code",[e._v("/indexes/:authorizedIndexes/stats")]),e._v(".")])]),e._v(" "),a("tr",[a("td",[e._v("metrics.get")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("GET")]),e._v(" "),a("code",[e._v("/metrics")]),e._v(" route. "),a("strong",[e._v("A restriction on "),a("code",[e._v("indexes")]),e._v(" stops you from calling the route.")])])]),e._v(" "),a("tr",[a("td",[e._v("dumps.create")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("POST")]),e._v(" "),a("code",[e._v("/dumps")]),e._v(" route. "),a("strong",[e._v("As dumps are not scoped by indexes, a restriction on "),a("code",[e._v("indexes")]),e._v(" does not affect this action.")])])]),e._v(" "),a("tr",[a("td",[e._v("snapshots.create")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("POST")]),e._v(" "),a("code",[e._v("/snapshots")]),e._v(" route. "),a("strong",[e._v("As snapshots are not scoped by indexes, a restriction on "),a("code",[e._v("indexes")]),e._v(" does not affect this action.")])])]),e._v(" "),a("tr",[a("td",[e._v("version")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("GET")]),e._v(" "),a("code",[e._v("/version")]),e._v(" route.")])]),e._v(" "),a("tr",[a("td",[e._v("keys.get")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("GET")]),e._v(" "),a("code",[e._v("/keys")]),e._v(" route.")])]),e._v(" "),a("tr",[a("td",[e._v("keys.create")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("POST")]),e._v(" "),a("code",[e._v("/keys")]),e._v(" route.")])]),e._v(" "),a("tr",[a("td",[e._v("keys.update")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("PATCH")]),e._v(" "),a("code",[e._v("/keys")]),e._v(" routes.")])]),e._v(" "),a("tr",[a("td",[e._v("keys.delete")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("DELETE")]),e._v(" "),a("code",[e._v("/keys")]),e._v(" routes.")])]),e._v(" "),a("tr",[a("td",[e._v("experimental.get")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("GET")]),e._v(" "),a("code",[e._v("/experimental-features")]),e._v(" routes.")])]),e._v(" "),a("tr",[a("td",[e._v("experimental.update")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("PATCH")]),e._v(" "),a("code",[e._v("/experimental-features")]),e._v(" routes.")])])])]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-4-3-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-4-3-response-definition"}},[e._v("#")]),e._v(" 3.2.4.4.3. Response Definition")]),e._v(" "),a("p",[e._v("Returns a "),a("code",[e._v("201 Created")]),e._v(" HTTP code when the request is successful.")]),e._v(" "),a("p",[e._v("See "),a("a",{attrs:{href:"#3241-api-key-resource-representation"}},[e._v("API Key Resource Representation")]),e._v(" section for the response body.")]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-4-3-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-4-3-errors"}},[e._v("#")]),e._v(" 3.2.4.4.3. Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Accessing this route while a master key is not set for the instance returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_master_key"}},[e._v("missing_master_key")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Accessing this route without the "),a("code",[e._v("Authorization")]),e._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Accessing this route without the master key or an API key missing the "),a("code",[e._v("keys.create")]),e._v(" permission returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Omitting Content-Type header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an empty Content-Type returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a different Content-Type than "),a("code",[e._v("application/json")]),e._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an empty payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a different payload type than the Content-Type header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid json format returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Omitting "),a("code",[e._v("actions")]),e._v(" field from the payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_api_key_actions"}},[e._v("missing_api_key_actions")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Omitting "),a("code",[e._v("indexes")]),e._v(" field from the payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_api_key_indexes"}},[e._v("missing_api_key_indexes")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Omitting "),a("code",[e._v("expiresAt")]),e._v(" field from the payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_api_key_expires_at"}},[e._v("missing_api_key_expires_at")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an "),a("code",[e._v("uid")]),e._v(" field that already exists returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#api_key_already_exists"}},[e._v("api_key_already_exists")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid value for the "),a("code",[e._v("uid")]),e._v(" field returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key_uid"}},[e._v("invalid_api_key_uid")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid value for the "),a("code",[e._v("actions")]),e._v(" field returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key_actions"}},[e._v("invalid_api_key_actions")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid value for the "),a("code",[e._v("indexes")]),e._v(" field returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key_indexes"}},[e._v("invalid_api_key_indexes")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid value for the "),a("code",[e._v("expiresAt")]),e._v(" field returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key_expires_at"}},[e._v("invalid_api_key_expires_at")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid value for the "),a("code",[e._v("name")]),e._v(" field returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key_name"}},[e._v("invalid_api_key_name")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid value for the "),a("code",[e._v("description")]),e._v(" field returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key_description"}},[e._v("invalid_api_key_description")]),e._v(" error.")],1)]),e._v(" "),a("h5",{attrs:{id:"_3-2-4-5-patch-keys-uid-or-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-5-patch-keys-uid-or-key"}},[e._v("#")]),e._v(" 3.2.4.5. "),a("code",[e._v("PATCH")]),e._v(" - "),a("code",[e._v("/keys/:uid_or_key")])]),e._v(" "),a("p",[e._v("Update an API key found by it's "),a("code",[e._v("uid")]),e._v(" or "),a("code",[e._v("key")]),e._v(" field. Only the "),a("code",[e._v("name")]),e._v(" and "),a("code",[e._v("description")]),e._v(" fields of an API key can be modified.")]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-5-1-payload-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-5-1-payload-definition"}},[e._v("#")]),e._v(" 3.2.4.5.1. Payload Definition")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("field")]),e._v(" "),a("th",[e._v("type")]),e._v(" "),a("th",[e._v("required")]),e._v(" "),a("th",[e._v("description")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[e._v("name")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("Optional")]),e._v(" "),a("td",[e._v("A name for the API Key. "),a("strong",[e._v("Default")]),e._v(": "),a("code",[e._v("null")])])]),e._v(" "),a("tr",[a("td",[e._v("description")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("Optional")]),e._v(" "),a("td",[e._v("A description for the API key. "),a("strong",[e._v("Default")]),e._v(": "),a("code",[e._v("null")])])])])]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-5-2-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-5-2-response-definition"}},[e._v("#")]),e._v(" 3.2.4.5.2. Response Definition")]),e._v(" "),a("p",[e._v("Returns a "),a("code",[e._v("200 Success")]),e._v(" HTTP code when the request is successful.")]),e._v(" "),a("p",[e._v("See "),a("a",{attrs:{href:"#3241-api-key-resource-representation"}},[e._v("API Key Resource Representation")]),e._v(" section for the response body.")]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-5-3-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-5-3-errors"}},[e._v("#")]),e._v(" 3.2.4.5.3. Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Accessing this route while a master key is not set for the instance returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_master_key"}},[e._v("missing_master_key")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Accessing this route without the "),a("code",[e._v("Authorization")]),e._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Accessing this route without the master key or an API key missing the "),a("code",[e._v("keys.update")]),e._v(" permission returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Attempting to access an API key that does not exist returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#api_key_not_found"}},[e._v("api_key_not_found")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Omitting Content-Type header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an empty Content-Type returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a different Content-Type than "),a("code",[e._v("application/json")]),e._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an empty payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a different payload type than the Content-Type header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid json format returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid value for the "),a("code",[e._v("name")]),e._v(" field returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key_name"}},[e._v("invalid_api_key_name")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid value for the "),a("code",[e._v("description")]),e._v(" field returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key_description"}},[e._v("invalid_api_key_description")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending "),a("code",[e._v("uid")]),e._v(" in the payload request returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#immutable_api_key_uid"}},[e._v("immutable_api_key_uid")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending "),a("code",[e._v("key")]),e._v(" in the payload request returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#immutable_api_key_key"}},[e._v("immutable_api_key_key")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending "),a("code",[e._v("actions")]),e._v(" in the payload request returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#immutable_api_key_actions"}},[e._v("immutable_api_key_actions")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending "),a("code",[e._v("indexes")]),e._v(" in the payload request returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#immutable_api_key_indexes"}},[e._v("immutable_api_key_indexes")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending "),a("code",[e._v("expiresAt")]),e._v(" in the payload request returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#immutable_api_key_expires_at"}},[e._v("immutable_api_key_expires_at")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending "),a("code",[e._v("createdAt")]),e._v(" in the payload request returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#immutable_api_key_created_at"}},[e._v("immutable_api_key_created_at")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending "),a("code",[e._v("updatedAt")]),e._v(" in the payload request returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#immutable_api_key_updated_at"}},[e._v("immutable_api_key_updated_at")]),e._v(" error.")],1)]),e._v(" "),a("h5",{attrs:{id:"_3-2-4-6-delete-keys-uid-or-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-6-delete-keys-uid-or-key"}},[e._v("#")]),e._v(" 3.2.4.6. "),a("code",[e._v("DELETE")]),e._v(" - "),a("code",[e._v("/keys/:uid_or_key")])]),e._v(" "),a("p",[e._v("Delete an API key found by it's "),a("code",[e._v("uid")]),e._v(" or "),a("code",[e._v("key")]),e._v(" field.")]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-6-1-payload-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-6-1-payload-definition"}},[e._v("#")]),e._v(" 3.2.4.6.1. Payload Definition")]),e._v(" "),a("p",[e._v("n/a")]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-6-2-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-6-2-response-definition"}},[e._v("#")]),e._v(" 3.2.4.6.2. Response Definition")]),e._v(" "),a("p",[e._v("Returns a "),a("code",[e._v("204 No-Content")]),e._v(" HTTP code when the request is successful.")]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-6-3-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-6-3-errors"}},[e._v("#")]),e._v(" 3.2.4.6.3. Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Accessing this route while a master key is not set for the instance returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_master_key"}},[e._v("missing_master_key")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Accessing this route without the "),a("code",[e._v("Authorization")]),e._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Accessing this route without the master key or an API key missing the "),a("code",[e._v("keys.delete")]),e._v(" permission returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Attempting to access an API key that does not exist returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#api_key_not_found"}},[a("code",[e._v("api_key_not_found")])]),e._v(" error.")],1)]),e._v(" "),a("h5",{attrs:{id:"_3-2-4-7-using-an-api-key-on-client-code"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-7-using-an-api-key-on-client-code"}},[e._v("#")]),e._v(" 3.2.4.7. Using an API key on client-code")]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-7-1-authorization-bearer-header"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-7-1-authorization-bearer-header"}},[e._v("#")]),e._v(" 3.2.4.7.1 Authorization Bearer Header")]),e._v(" "),a("p",[e._v("When the Meilisearch API is secured by the presence of a master key, the "),a("code",[e._v("Authorization")]),e._v(" header must be used with a bearer to authorize requests. The specified value must be the value of the "),a("code",[e._v("key")]),e._v(" field of an API key.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v(' "Authorization: Bearer `:key`"\n "Content-Type: application/json"\n')])])]),a("ul",[a("li",[e._v("🔴 Accessing a route with an "),a("code",[e._v("API Key")]),e._v(" that has expired, been deleted or don't have sufficient permissions returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),a("h2",{attrs:{id:"_4-technical-aspects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-aspects"}},[e._v("#")]),e._v(" 4. Technical Aspects")]),e._v(" "),a("h3",{attrs:{id:"_4-1-api-key-generation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-api-key-generation"}},[e._v("#")]),e._v(" 4.1. API Key generation")]),e._v(" "),a("p",[e._v("An "),a("code",[e._v("uid")]),e._v(" representing by a uuid v4 is generated if not specified at creation by the user.")]),e._v(" "),a("p",[e._v("The final key is then an HMAC with the master key, as the secret, and the "),a("code",[e._v("uid")]),e._v(", a hyphenated Uuidv4, as the data. HMAC uses an SHA-256 algorithm internally.")]),e._v(" "),a("p",[e._v("The final key could be generated with openssl as below:")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",[a("code",[e._v("echo -n $HYPHENATED_UUID | openssl dgst -sha256 -hmac $MASTER_KEY\n")])])]),a("h3",{attrs:{id:"_4-2-synchronous-write-of-api-key-resources"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-synchronous-write-of-api-key-resources"}},[e._v("#")]),e._v(" 4.2. Synchronous write of "),a("code",[e._v("API Key")]),e._v(" resources")]),e._v(" "),a("p",[e._v("Writing to "),a("code",[e._v("/keys")]),e._v(" endpoints are synchronous in order to return errors directly to the user when he performs an operation on them. This means that API key management operations do not appear as a task on "),a("code",[e._v("/tasks")]),e._v(".")]),e._v(" "),a("h3",{attrs:{id:"_4-3-propagating-api-key-to-dumps"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-3-propagating-api-key-to-dumps"}},[e._v("#")]),e._v(" 4.3. Propagating "),a("code",[e._v("API Key")]),e._v(" to dumps.")]),e._v(" "),a("p",[e._v("The generated API keys must also transit within a dump to facilitate the upgrade of a MeiliSearch instance.")]),e._v(" "),a("blockquote",[a("p",[e._v("🚨 As a reminder, dumps must be stored in secure areas not accessible to the public or unaccredited persons. In general, you should avoid moving them off the host machine or do so via a secure channel as a security measure.")])]),e._v(" "),a("p",[e._v("If the dumps ever leak, the api keys cannot be spoofed from the dump inspection because it needs the master key to have the full value of a valid API key. Only the "),a("code",[e._v("uid")]),e._v(" value is propagated in the dumps.")]),e._v(" "),a("h3",{attrs:{id:"_4-4-propagating-api-key-to-snapshots"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-4-propagating-api-key-to-snapshots"}},[e._v("#")]),e._v(" 4.4. Propagating "),a("code",[e._v("API Key")]),e._v(" to snapshots.")]),e._v(" "),a("p",[e._v("The generated API keys must also transit within a snapshot to facilitate the recovery of a MeiliSearch instance.")]),e._v(" "),a("blockquote",[a("p",[e._v("🚨 As a reminder, snapshots must be stored in secure areas not accessible to the public or unaccredited persons. In general, you should avoid moving them off the host machine or do so via a secure channel as a security measure.")])]),e._v(" "),a("p",[e._v("If the snapshot ever leak, the "),a("code",[e._v("API keys")]),e._v(" cannot be spoofed from the snapshot inspection because it needs the master key to have the full value of a valid "),a("code",[e._v("API key")]),e._v(". Only the "),a("code",[e._v("uid")]),e._v(" value is propagated in the snapshots.")]),e._v(" "),a("h3",{attrs:{id:"_4-5-api-keys-storage-size-limit"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-5-api-keys-storage-size-limit"}},[e._v("#")]),e._v(" 4.5. API Keys storage size limit")]),e._v(" "),a("p",[e._v("The maximum size of the API key storage layer is "),a("code",[e._v("100GB")]),e._v(".")]),e._v(" "),a("h2",{attrs:{id:"_5-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),a("ul",[a("li",[e._v("Regenerate a specific "),a("code",[e._v("API Key")]),e._v(".")]),e._v(" "),a("li",[e._v('Have an "archive" state where manually deleted API Keys can be restored for a certain amount of time.')]),e._v(" "),a("li",[e._v("Add rate-limiting per API Key.")]),e._v(" "),a("li",[e._v("A restriction on the maximum offset/limit.")]),e._v(" "),a("li",[e._v("Add search parameters restrictions for an API Key.")]),e._v(" "),a("li",[e._v("Add rfc2822 format expression for "),a("code",[e._v("expiredAt")]),e._v(" field. e.g. "),a("code",[e._v("Wed, 18 Feb 2022 23:16:09 GMT")])]),e._v(" "),a("li",[e._v("Add an alias that can only be associated to one API Key to retrieve it easily on client side. e.g. "),a("code",[e._v("GET /keys/:uid_or_alias")])]),e._v(" "),a("li",[e._v("Supports wildcard expressions at the start/middle of a string.")])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{453:function(e,t,a){"use strict";a.r(t);var s=a(62),r=Object(s.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"api-keys"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#api-keys"}},[e._v("#")]),e._v(" API Keys")]),e._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("API keys allows to define which actions and which indexes are accessible by the holder of an API key. The use of API keys allows to secure the access to the routes in a fine-grained manner of a Meilisearch instance.")]),e._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[e._v("To make Meilisearch more reliable for teams and more adapted to production cases, we extend the management and the possibilities of restrictions regarding write and read requests on a Meilisearch instance by introducing a way to manage custom API keys.")]),e._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("h3",{attrs:{id:"_3-1-glossary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-glossary"}},[e._v("#")]),e._v(" 3.1. Glossary")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Term")]),e._v(" "),a("th",[e._v("Definition")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[e._v("Master Key")]),e._v(" "),a("td",[e._v("This is the master key that allows managing API keys. The master key is defined by the user when launching Meilisearch, thus gives access to the "),a("code",[e._v("/keys")]),e._v(" API endpoint and requiring requests to be authorized.")])]),e._v(" "),a("tr",[a("td",[e._v("API Key")]),e._v(" "),a("td",[e._v("API keys are stored and managed from the endpoint "),a("code",[e._v("/keys")]),e._v(" by the master key holder.")])])])]),e._v(" "),a("h3",{attrs:{id:"_3-2-explanation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-explanation"}},[e._v("#")]),e._v(" 3.2. Explanation")]),e._v(" "),a("h4",{attrs:{id:"_3-2-1-summary-key-points"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-summary-key-points"}},[e._v("#")]),e._v(" 3.2.1 Summary Key Points")]),e._v(" "),a("ul",[a("li",[e._v("API keys management is restricted to the master key or API keys having "),a("code",[e._v("keys.get")]),e._v(", "),a("code",[e._v("keys.create")]),e._v(", "),a("code",[e._v("keys.update")]),e._v(", "),a("code",[e._v("keys.delete")]),e._v(" or "),a("code",[e._v("*")]),e._v(" actions.")]),e._v(" "),a("li",[e._v("API keys must be provided via the "),a("code",[e._v("Authorization")]),e._v(" header using the bearer method to authorize a request.")]),e._v(" "),a("li",[e._v("The value of the "),a("code",[e._v("key")]),e._v(" field of an API Key is generated from its "),a("code",[e._v("uid")]),e._v(" and the master key.")]),e._v(" "),a("li",[e._v("When a master key is set at Meilisearch first-launch, it generate two pre-configured default "),a("code",[e._v("API Key")]),e._v(" resources. A "),a("code",[e._v("Default Search API Key")]),e._v(" authorizing the search action on all indexes and a "),a("code",[e._v("Default Admin API Key")]),e._v(" authorizing all actions.")]),e._v(" "),a("li",[e._v("If the master-key changes, the "),a("code",[e._v("key")]),e._v(" field is re-generated.")]),e._v(" "),a("li",[e._v("Default API keys can be modified/deleted from the "),a("code",[e._v("/keys")]),e._v(" endpoints but are not re-created if Meilisearch has already created them.")]),e._v(" "),a("li",[e._v("API keys can have restrictions on which methods can be accessed via an "),a("code",[e._v("actions")]),e._v(" list; they also "),a("code",[e._v("expiresAt")]),e._v(" a specific date time and are restricted to a specific set of "),a("code",[e._v("indexes")]),e._v(".")]),e._v(" "),a("li",[a("code",[e._v("name")]),e._v(" and "),a("code",[e._v("description")]),e._v(" fields are the only editable fields of an API key.")]),e._v(" "),a("li",[e._v("API key resources are propagated to snapshots and dumps.")])]),e._v(" "),a("h4",{attrs:{id:"_3-2-2-master-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-master-key"}},[e._v("#")]),e._v(" 3.2.2. Master Key")]),e._v(" "),a("p",[e._v("The master key exists to secure a Meilisearch instance. As soon as a master key is set via the "),a("code",[e._v("MEILI_MASTER_KEY")]),e._v(" environment variable or the "),a("code",[e._v("--master-key")]),e._v(" CLI option, the endpoint "),a("code",[e._v("/keys")]),e._v(" is accessible for the master key holder. It can be seen as a super admin key; It must be securely shared only with people who have to manage the security of a Meilisearch instance.")]),e._v(" "),a("p",[e._v("This master key is not an API key, thus is not stored and fetchable from the "),a("code",[e._v("/keys")]),e._v(" API endpoint. It must be seen as a runtime lock that activates the security of Meilisearch as soon as an instance is launched with it. The master key should only be used to fetch API Keys the first time. The default Admin API key should be preferred to manage the API keys resources.")]),e._v(" "),a("p",[e._v("At the first launch of Meilisearch with a master key, Meilisearch automatically generates two default API keys to cover the basic needs a user may encounter. It generates a "),a("code",[e._v("Default Search API Key")]),e._v(" dedicated to the search that can be used on the client-side and a "),a("code",[e._v("Default Admin API Key")]),e._v(" to manipulate a MeiliSearch instance from a backend side.")]),e._v(" "),a("p",[e._v("If the master key is removed at Meilisearch launch, the previously generated API keys no longer secure the Meilisearch instance.")]),e._v(" "),a("p",[e._v("If Meilisearch is launched with the "),a("code",[e._v("production")]),e._v(" value for the "),a("code",[e._v("MEILI_ENV")]),e._v(" environment variable or the "),a("code",[e._v("--env")]),e._v(" CLI option, a master key of at least 16 bytes is mandatory.")]),e._v(" "),a("p",[e._v("If the master key is omitted in that particular case, or is too short, Meilisearch launch is aborted and displays an error.")]),e._v(" "),a("p",[e._v("If Meilisearch is launched with the "),a("code",[e._v("development")]),e._v(" value for the "),a("code",[e._v("MEILI_ENV")]),e._v(" environment variable or the "),a("code",[e._v("--env")]),e._v(" CLI option, Meilisearch displays warning messages given different cases.")]),e._v(" "),a("p",[e._v("See "),a("a",{attrs:{href:"0119-instance-options#334-master-key"}},[a("code",[e._v("MEILI_MASTER_KEY")]),e._v("/"),a("code",[e._v("--master-key")]),e._v(" launch option")]),e._v(".")]),e._v(" "),a("p",[e._v("The master key must be composed of valid utf-8 characters. It is advisable to enclose it in "),a("code",[e._v("'")]),e._v(" when specified via the "),a("code",[e._v("--master-key")]),e._v(" option.")]),e._v(" "),a("blockquote",[a("p",[e._v("🚨 The master key should never be exposed to the public as it may compromise a Meilisearch instance.")])]),e._v(" "),a("blockquote",[a("p",[e._v("🚨 If the value of the master key changes, all the previously generated "),a("code",[e._v("API Keys")]),e._v(" changes, thus allowing to invalidate the set of API keys previously generated by regenerating a different value for their "),a("code",[e._v("key")]),e._v(" field. This is particularly useful in the case where the master key might have been leaked and the user needs to re-generate the whole set of keys at once to re-secure the instance.")])]),e._v(" "),a("blockquote",[a("p",[e._v("The master key does not appear on the "),a("code",[e._v("/keys")]),e._v(" endpoints and can't be used to authorize requests other than on the "),a("code",[e._v("/keys")]),e._v(" endpoint.")])]),e._v(" "),a("blockquote",[a("p",[e._v("The only route not secured in the presence of a master key is the "),a("code",[e._v("/health")]),e._v(" route.")])]),e._v(" "),a("h4",{attrs:{id:"_3-2-3-default-api-keys"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-default-api-keys"}},[e._v("#")]),e._v(" 3.2.3. Default API Keys")]),e._v(" "),a("p",[e._v("The first time a Meilisearch instance is launched with a "),a("code",[e._v("master key")]),e._v(", Meilisearch will generate two API keys described below.")]),e._v(" "),a("p",[e._v("If the user changes the value of the master key later, these two default keys are not created again but the "),a("code",[e._v("key")]),e._v(" field is re-generated. However, these two API keys can be updated/deleted using the "),a("code",[e._v("/keys")]),e._v(" endpoints.")]),e._v(" "),a("p",[e._v("If these API keys are deleted, the engine should not create them again when Meilisearch is launched again with a master key.")]),e._v(" "),a("h5",{attrs:{id:"_3-2-3-1-default-search-api-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-1-default-search-api-key"}},[e._v("#")]),e._v(" 3.2.3.1. Default Search API Key")]),e._v(" "),a("p",[e._v("The "),a("code",[e._v("Default Search API key")]),e._v(" gives access to the search endpoints on all indexes.")]),e._v(" "),a("p",[e._v("Here is how the "),a("code",[e._v("Default Search API Key")]),e._v(" is represented after its generation.")]),e._v(" "),a("div",{staticClass:"language-jsonc extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('{\n "uid": "01b4bc42-eb33-4041-b481-254d00cce834", //auto-generated value\n "key": "0a6e572506c52ab0bd6195921575d23092b7f0c284ab4ac86d12346c33057f99", //auto-generated value\n "name": "Default Search API Key",\n "description": "Use it to search from the frontend",\n "actions": [\n "search"\n ],\n "indexes": [\n "*"\n ],\n "expiresAt": null,\n "createdAt": "2021-08-11T10:00:00Z",\n "updatedAt": "2021-08-11T10:00:00Z"\n}\n')])])]),a("h5",{attrs:{id:"_3-2-3-2-default-admin-api-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-2-default-admin-api-key"}},[e._v("#")]),e._v(" 3.2.3.2. Default Admin API Key")]),e._v(" "),a("p",[e._v("The "),a("code",[e._v("Default Admin API key")]),e._v(" gives access to all actions by default.")]),e._v(" "),a("p",[e._v("Here is how the "),a("code",[e._v("Default Admin API Key")]),e._v(" is represented after its generation.")]),e._v(" "),a("div",{staticClass:"language-jsonc extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('{\n "uid": "ac06a7e1-6956-4699-bb04-dbeb72a231df", //auto-generated value\n "key": "380689dd379232519a54d15935750cc7625620a2ea2fc06907cb40ba5b421b6f", //auto-generated value\n "name": "Default Admin API Key",\n "description": "Use it for anything that is not a search operation. Caution! Do not expose it on a public frontend",\n "actions": [\n "*"\n ],\n "indexes": [\n "*"\n ],\n "expiresAt": null,\n "createdAt": "2021-08-11T10:00:00Z",\n "updatedAt": "2021-08-11T10:00:00Z"\n}\n')])])]),a("h4",{attrs:{id:"_3-2-4-api-endpoints-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2.4. API Endpoints Definition")]),e._v(" "),a("p",[e._v("Manipulate API keys of a Meilisearch instance. "),a("code",[e._v("/keys")]),e._v(" endpoints are "),a("strong",[e._v("only accessible by the master key holder.")])]),e._v(" "),a("h5",{attrs:{id:"_3-2-4-1-api-key-resource-representation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-1-api-key-resource-representation"}},[e._v("#")]),e._v(" 3.2.4.1. "),a("code",[e._v("API Key")]),e._v(" Resource Representation")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("field")]),e._v(" "),a("th",[e._v("type")]),e._v(" "),a("th",[e._v("description")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[e._v("uid")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("A unique identifier represented by a uuid v4. Can be specified at creation or generated by Meilisearch if ommited.")])]),e._v(" "),a("tr",[a("td",[e._v("key")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("The generated key to use when in the Authorization header when making requests. "),a("strong",[e._v("Generated by MeiliSearch by a combination of uid and the master key")]),e._v(".")])]),e._v(" "),a("tr",[a("td",[e._v("name")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("A non unique human readable name to ease identification of the API key. "),a("code",[e._v("null")]),e._v(" if empty.")])]),e._v(" "),a("tr",[a("td",[e._v("description")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("A description for the key. "),a("code",[e._v("null")]),e._v(" if empty.")])]),e._v(" "),a("tr",[a("td",[e._v("actions")]),e._v(" "),a("td",[e._v("array")]),e._v(" "),a("td",[e._v("A list of actions permitted for the key. "),a("code",[e._v('["*"]')]),e._v(" for all actions. See Actions List Definition part.")])]),e._v(" "),a("tr",[a("td",[e._v("indexes")]),e._v(" "),a("td",[e._v("array")]),e._v(" "),a("td",[e._v("A list of indexes permitted for the key. "),a("code",[e._v('["*"]')]),e._v(" for all indexes.")])]),e._v(" "),a("tr",[a("td",[e._v("expiresAt")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("Represent the expiration date and time as "),a("code",[e._v("RFC 3339")]),e._v(" format. "),a("code",[e._v("null")]),e._v(" equals to no expiration time.")])]),e._v(" "),a("tr",[a("td",[e._v("createdAt")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("Represent the date and time as "),a("code",[e._v("RFC 3339")]),e._v(" format when the API key has been created. "),a("strong",[e._v("Generated by MeiliSearch")])])]),e._v(" "),a("tr",[a("td",[e._v("updatedAt")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("Represent the date and time as "),a("code",[e._v("RFC 3339")]),e._v(" format when the API key has been updated. "),a("strong",[e._v("Default")]),e._v(": Value of "),a("code",[e._v("createdAt")]),e._v(". "),a("strong",[e._v("Generated by MeiliSearch")])])])])]),e._v(" "),a("h5",{attrs:{id:"_3-2-4-2-get-keys"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-2-get-keys"}},[e._v("#")]),e._v(" 3.2.4.2. "),a("code",[e._v("GET")]),e._v(" - "),a("code",[e._v("/keys")])]),e._v(" "),a("p",[e._v("Fetch the API keys of a Meilisearch instance.")]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-2-1-query-parameter-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-2-1-query-parameter-definition"}},[e._v("#")]),e._v(" 3.2.4.2.1. Query Parameter Definition")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Field")]),e._v(" "),a("th",[e._v("Type")]),e._v(" "),a("th",[e._v("Required")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("code",[e._v("offset")])]),e._v(" "),a("td",[e._v("Integer / "),a("code",[e._v("null")])]),e._v(" "),a("td",[e._v("false")])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("limit")])]),e._v(" "),a("td",[e._v("Integer / "),a("code",[e._v("null")])]),e._v(" "),a("td",[e._v("false")])])])]),e._v(" "),a("h6",{attrs:{id:"offset"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#offset"}},[e._v("#")]),e._v(" "),a("code",[e._v("offset")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Integer")]),e._v(" "),a("li",[e._v("Required: False")]),e._v(" "),a("li",[e._v("Default: "),a("code",[e._v("0")])])]),e._v(" "),a("p",[e._v("Sets the starting point in the results, effectively skipping over a given number of API keys.")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Sending a value with a different type than "),a("code",[e._v("Integer")]),e._v(" for "),a("code",[e._v("offset")]),e._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key_offset"}},[e._v("invalid_api_key_offset")]),e._v(" error.")],1)]),e._v(" "),a("h6",{attrs:{id:"limit"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#limit"}},[e._v("#")]),e._v(" "),a("code",[e._v("limit")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Integer")]),e._v(" "),a("li",[e._v("Required: False")]),e._v(" "),a("li",[e._v("Default: "),a("code",[e._v("20")])])]),e._v(" "),a("p",[e._v("Sets the maximum number of documents to be returned by the current request.")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Sending a value with a different type than "),a("code",[e._v("Integer")]),e._v(" for "),a("code",[e._v("limit")]),e._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key_limit"}},[e._v("invalid_api_key_limit")]),e._v(" error.")],1)]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-2-2-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-2-2-response-definition"}},[e._v("#")]),e._v(" 3.2.4.2.2. Response Definition")]),e._v(" "),a("p",[e._v("Returns a "),a("code",[e._v("200 Success")]),e._v(" HTTP code when the request is successful.")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Field")]),e._v(" "),a("th",[e._v("Type")]),e._v(" "),a("th",[e._v("Required")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("code",[e._v("results")])]),e._v(" "),a("td",[e._v("Array of "),a("a",{attrs:{href:"#3241-api-key-resource-representation"}},[e._v("APIKey")])]),e._v(" "),a("td",[e._v("true")])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("offset")])]),e._v(" "),a("td",[e._v("Integer")]),e._v(" "),a("td",[e._v("true")])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("limit")])]),e._v(" "),a("td",[e._v("Integer")]),e._v(" "),a("td",[e._v("true")])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("total")])]),e._v(" "),a("td",[e._v("Integer")]),e._v(" "),a("td",[e._v("true")])])])]),e._v(" "),a("h6",{attrs:{id:"results"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#results"}},[e._v("#")]),e._v(" "),a("code",[e._v("results")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Array[APIKey]")]),e._v(" "),a("li",[e._v("Required: True")])]),e._v(" "),a("p",[e._v("An array containing the fetched API keys.")]),e._v(" "),a("h6",{attrs:{id:"offset-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#offset-2"}},[e._v("#")]),e._v(" "),a("code",[e._v("offset")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Integer")]),e._v(" "),a("li",[e._v("Required: True")])]),e._v(" "),a("p",[e._v("Gives the "),a("code",[e._v("offset")]),e._v(" parameter used for the query.")]),e._v(" "),a("h6",{attrs:{id:"limit-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#limit-2"}},[e._v("#")]),e._v(" "),a("code",[e._v("limit")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Integer")]),e._v(" "),a("li",[e._v("Required: True")])]),e._v(" "),a("p",[e._v("Gives the "),a("code",[e._v("limit")]),e._v(" parameter used for the query.")]),e._v(" "),a("h6",{attrs:{id:"total"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#total"}},[e._v("#")]),e._v(" "),a("code",[e._v("total")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Integer")]),e._v(" "),a("li",[e._v("Required: True")])]),e._v(" "),a("p",[e._v("Gives the total number of API keys that can be browsed.")]),e._v(" "),a("blockquote",[a("p",[e._v("API Keys are ordered by "),a("code",[e._v("createdAt")]),e._v(" in "),a("code",[e._v("desc")]),e._v(" order. (Most recent first)")])]),e._v(" "),a("blockquote",[a("p",[e._v("Expired API keys can be found on the "),a("code",[e._v("/keys")]),e._v(" endpoints. An archiving system or a filter could allow to not display them by default. See Future Possibilities part.")])]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-2-3-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-2-3-errors"}},[e._v("#")]),e._v(" 3.2.4.2.3. Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Accessing this route while a master key is not set for the instance returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_master_key"}},[e._v("missing_master_key")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Accessing this route without the "),a("code",[e._v("Authorization")]),e._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Accessing this route without the master key returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-2-4-example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-2-4-example"}},[e._v("#")]),e._v(" 3.2.4.2.4. Example")]),e._v(" "),a("p",[a("code",[e._v("200 Success")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"results"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"description"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Manage Products/Reviews Documents API key"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"uid"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"ac06a7e1-6956-4699-bb04-dbeb72a231df"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"key"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2fcdddd16ab75a4aeea6b74577874bc2888938a69ffafe3d05547560fa72e15b"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"actions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"documents.add"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"documents.delete"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"indexes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"products"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"reviews"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"expiresAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2021-12-31T23:59:59Z"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"createdAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2021-10-12T00:00:00Z"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"updatedAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2021-10-13T15:00:00Z"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"description"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Default Search API Key (Use it to search from the frontend code)"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"uid"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"87861fb0-e948-41da-ae7f-89617d57d5f5"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"key"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"0fe6fc6d94a21b5ca0b5a714bcb338865108039efc048e99e5ba2e7a976fa330"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"actions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"search"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"indexes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"*"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"expiresAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[e._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"createdAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2021-08-11T10:00:00Z"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"updatedAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2021-08-11T10:00:00Z"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"description"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Default Admin API Key (Use it for all other operations. Caution! Do not share it on the client side)"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"uid"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"ad9af94e-d2db-420f-9ee3-9375f091e565"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"key"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"1846b591d7fd0454bc2b7f1c7ad80c411b1cfe46a51b0d44e6554a30f4bc0a18"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"actions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"*"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"indexes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"*"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"expiresAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[e._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"createdAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2021-08-11T10:00:00Z"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"updatedAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2021-08-11T10:00:00Z"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"offset"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"limit"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("20")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"total"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("3")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("blockquote",[a("p",[e._v("👉 Note the two default generated API keys here. When a master key is set at MeiliSearch's launch, it generates two pre-configured "),a("code",[e._v("API Keys")]),e._v(". A Default Search API Key restricted to the search action on all indexes and a Default Admin API Key on all indexes to handle all operations (except managing API Keys).")])]),e._v(" "),a("h5",{attrs:{id:"_3-2-4-3-get-keys-uid-or-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-3-get-keys-uid-or-key"}},[e._v("#")]),e._v(" 3.2.4.3. "),a("code",[e._v("GET")]),e._v(" - "),a("code",[e._v("/keys/:uid_or_key")])]),e._v(" "),a("p",[e._v("Fetch a specific API key of a Meilisearch instance from it's "),a("code",[e._v("uid")]),e._v(" or "),a("code",[e._v("key")]),e._v(" field.")]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-3-1-query-parameter-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-3-1-query-parameter-definition"}},[e._v("#")]),e._v(" 3.2.4.3.1. Query Parameter Definition")]),e._v(" "),a("p",[e._v("n/a")]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-3-2-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-3-2-response-definition"}},[e._v("#")]),e._v(" 3.2.4.3.2. Response Definition")]),e._v(" "),a("p",[e._v("Returns a "),a("code",[e._v("200 Success")]),e._v(" HTTP code when the request is successful.")]),e._v(" "),a("p",[e._v("See "),a("a",{attrs:{href:"#3241-api-key-resource-representation"}},[e._v("API Key Resource Representation")]),e._v(" section for the response body.")]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-3-3-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-3-3-errors"}},[e._v("#")]),e._v(" 3.2.4.3.3. Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Accessing this route while a master key is not set for the instance returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_master_key"}},[e._v("missing_master_key")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Accessing this route without the "),a("code",[e._v("Authorization")]),e._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Accessing this route without the master key or an API key missing the "),a("code",[e._v("keys.get")]),e._v(" permission returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),a("h5",{attrs:{id:"_3-2-4-4-post-keys"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-4-post-keys"}},[e._v("#")]),e._v(" 3.2.4.4. "),a("code",[e._v("POST")]),e._v(" - "),a("code",[e._v("/keys")])]),e._v(" "),a("p",[e._v("Create an API key.")]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-4-1-payload-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-4-1-payload-definition"}},[e._v("#")]),e._v(" 3.2.4.4.1. Payload Definition")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("field")]),e._v(" "),a("th",[e._v("type")]),e._v(" "),a("th",[e._v("required")]),e._v(" "),a("th",[e._v("description")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[e._v("uid")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("Optional")]),e._v(" "),a("td",[e._v("A unique identifier represented by a "),a("a",{attrs:{href:"https://fr.wikipedia.org/wiki/Universally_unique_identifier",target:"_blank",rel:"noopener noreferrer"}},[e._v("uuid v4"),a("OutboundLink")],1),e._v(". Specified at creation or generated by Meilisearch if ommited.")])]),e._v(" "),a("tr",[a("td",[e._v("name")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("Optional")]),e._v(" "),a("td",[e._v("A non unique human readable name to ease identification of the API key. "),a("strong",[e._v("Default")]),e._v(": "),a("code",[e._v("null")])])]),e._v(" "),a("tr",[a("td",[e._v("description")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("Optional")]),e._v(" "),a("td",[e._v("A description for the API key. "),a("strong",[e._v("Default")]),e._v(": "),a("code",[e._v("null")])])]),e._v(" "),a("tr",[a("td",[e._v("actions")]),e._v(" "),a("td",[e._v("array")]),e._v(" "),a("td",[e._v("Required")]),e._v(" "),a("td",[e._v("A list of actions permitted for the API key. "),a("code",[e._v('["*"]')]),e._v(" for all actions. "),a("strong",[e._v("See Actions list definition part")]),e._v(". The "),a("code",[e._v("*")]),e._v(" character can be used as a wildcard when located at the last position. e.g. "),a("code",[e._v("documents.*")]),e._v(" to authorize access on all documents endpoints. "),a("strong",[e._v("Default")]),e._v(": "),a("code",[e._v("No default")])])]),e._v(" "),a("tr",[a("td",[e._v("indexes")]),e._v(" "),a("td",[e._v("array")]),e._v(" "),a("td",[e._v("Required")]),e._v(" "),a("td",[a("code",[e._v("[*]")]),e._v(" for all indexes. The "),a("code",[e._v("*")]),e._v(" character can be used as a wildcard when located in the last position. e.g. "),a("code",[e._v("products_*")]),e._v(" to allow access to all indexes whose names start with "),a("code",[e._v("products_")]),e._v(". "),a("strong",[e._v("Default")]),e._v(": "),a("code",[e._v("No Default")])])]),e._v(" "),a("tr",[a("td",[e._v("expiresAt")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("Required")]),e._v(" "),a("td",[e._v("The expiration date and time as "),a("code",[e._v("RFC 3339")]),e._v(" format. "),a("code",[e._v("null")]),e._v(" equals to no expiration time. Sending only the date part e.g "),a("code",[e._v("2021-12-01")]),e._v(" leads to having an "),a("code",[e._v("expiresAt")]),e._v(" value set to "),a("code",[e._v("2021-12-01T00:00:00")]),e._v(". "),a("strong",[e._v("Default")]),e._v(": "),a("code",[e._v("No Default")])])])])]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-4-2-actions-list-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-4-2-actions-list-definition"}},[e._v("#")]),e._v(" 3.2.4.4.2. "),a("code",[e._v("actions")]),e._v(" List Definition")]),e._v(" "),a("blockquote",[a("p",[a("code",[e._v(":authorizedIndexes")]),e._v(" can be any value extracted from the "),a("code",[e._v("indexes")]),e._v(" field of an API key resource.")])]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("name")]),e._v(" "),a("th",[e._v("description")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[e._v("search")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("GET")]),e._v(" and "),a("code",[e._v("POST")]),e._v(" methods on "),a("code",[e._v("/indexes/:authorizedIndexes/search")]),e._v(" routes.")])]),e._v(" "),a("tr",[a("td",[e._v("documents.add")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("POST")]),e._v(" and "),a("code",[e._v("PUT")]),e._v(" on "),a("code",[e._v("/indexes/:authorizedIndexes/documents")]),e._v(" routes.")])]),e._v(" "),a("tr",[a("td",[e._v("documents.get")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("GET")]),e._v(" methods on "),a("code",[e._v("/indexes/:authorizedIndexes/documents")]),e._v(", "),a("code",[e._v("/indexes/:authorizedIndexes/documents/:documentId")]),e._v(" and "),a("code",[e._v("POST")]),e._v(" methods on "),a("code",[e._v("/indexes/:authorizedIndexes/documents/fetch")]),e._v(" routes.")])]),e._v(" "),a("tr",[a("td",[e._v("documents.delete")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("DELETE")]),e._v(" method on "),a("code",[e._v("/indexes/:authorizedIndexes/documents/:documentId")]),e._v(", "),a("code",[e._v("indexes/:authorizedIndexes/documents/:documentId")]),e._v(" and "),a("code",[e._v("POST")]),e._v(" method on "),a("code",[e._v("/indexes/:authorizedIndexes/documents/delete-batch")]),e._v(" and "),a("code",[e._v("/indexes/:authorizedIndexes/documents/delete")]),e._v(" routes.")])]),e._v(" "),a("tr",[a("td",[e._v("indexes.create")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("POST")]),e._v(" "),a("code",[e._v("/indexes")]),e._v(". "),a("strong",[e._v("⚠️ "),a("code",[e._v("indexes")]),e._v(" field should indicate the newly created index or having "),a("code",[e._v("[*]")]),e._v(" to permits access on it.")]),e._v(".")])]),e._v(" "),a("tr",[a("td",[e._v("indexes.get")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("GET")]),e._v(" "),a("code",[e._v("/indexes")]),e._v(" and "),a("code",[e._v("/indexes/:authorizedIndexes")]),e._v(". "),a("strong",[e._v("⚠️Non-authorized "),a("code",[e._v("indexes")]),e._v(" are omitted from the response on "),a("code",[e._v("/indexes")])]),e._v(".")])]),e._v(" "),a("tr",[a("td",[e._v("indexes.update")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("PUT")]),e._v(" "),a("code",[e._v("/indexes/:authorizedIndexes")]),e._v(".")])]),e._v(" "),a("tr",[a("td",[e._v("indexes.delete")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("DELETE")]),e._v(" "),a("code",[e._v("/indexes/:authorizedIndexes")]),e._v(".")])]),e._v(" "),a("tr",[a("td",[e._v("indexes.swap")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("POST")]),e._v(" "),a("code",[e._v("/swap-indexes")]),e._v(". See "),a("RouterLink",{attrs:{to:"/specifications/text/0191-swap-indexes-api.html"}},[e._v("Swap Indexes API")]),e._v(" specification.")],1)]),e._v(" "),a("tr",[a("td",[e._v("tasks.get")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("GET")]),e._v(" "),a("code",[e._v("/tasks")]),e._v(". "),a("strong",[e._v("⚠️Non-authorized "),a("code",[e._v("indexes")]),e._v(" are omitted from the response on "),a("code",[e._v("/tasks")])]),e._v(". Also add access to "),a("code",[e._v("GET")]),e._v(" "),a("code",[e._v("/indexes/:authorizedIndexes/tasks")]),e._v(" routes.")])]),e._v(" "),a("tr",[a("td",[e._v("tasks.cancel")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("POST")]),e._v(" "),a("code",[e._v("/tasks/cancel")]),e._v(". route.")])]),e._v(" "),a("tr",[a("td",[e._v("tasks.delete")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("DELETE")]),e._v(" "),a("code",[e._v("/tasks")]),e._v(" route.")])]),e._v(" "),a("tr",[a("td",[e._v("settings.get")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("GET")]),e._v(" "),a("code",[e._v("/indexes/:authorizedIndexes/settings")]),e._v(" and "),a("code",[e._v("/indexes/:authorizedIndexes/settings/*")]),e._v(" routes.")])]),e._v(" "),a("tr",[a("td",[e._v("settings.update")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("POST / DELETE")]),e._v(" "),a("code",[e._v("/indexes/:authorizedIndexes/settings")]),e._v(" and "),a("code",[e._v("/indexes/:authorizedIndexes/settings/*")]),e._v(" routes.")])]),e._v(" "),a("tr",[a("td",[e._v("stats.get")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("GET")]),e._v(" "),a("code",[e._v("/stats")]),e._v(". "),a("strong",[e._v("⚠️Non-authorized "),a("code",[e._v("indexes")]),e._v(" are omitted from the response on "),a("code",[e._v("/stats")])]),e._v(". Also add access to "),a("code",[e._v("GET")]),e._v(" "),a("code",[e._v("/indexes/:authorizedIndexes/stats")]),e._v(".")])]),e._v(" "),a("tr",[a("td",[e._v("metrics.get")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("GET")]),e._v(" "),a("code",[e._v("/metrics")]),e._v(" route. "),a("strong",[e._v("A restriction on "),a("code",[e._v("indexes")]),e._v(" stops you from calling the route.")])])]),e._v(" "),a("tr",[a("td",[e._v("dumps.create")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("POST")]),e._v(" "),a("code",[e._v("/dumps")]),e._v(" route. "),a("strong",[e._v("As dumps are not scoped by indexes, a restriction on "),a("code",[e._v("indexes")]),e._v(" does not affect this action.")])])]),e._v(" "),a("tr",[a("td",[e._v("snapshots.create")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("POST")]),e._v(" "),a("code",[e._v("/snapshots")]),e._v(" route. "),a("strong",[e._v("As snapshots are not scoped by indexes, a restriction on "),a("code",[e._v("indexes")]),e._v(" does not affect this action.")])])]),e._v(" "),a("tr",[a("td",[e._v("version")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("GET")]),e._v(" "),a("code",[e._v("/version")]),e._v(" route.")])]),e._v(" "),a("tr",[a("td",[e._v("keys.get")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("GET")]),e._v(" "),a("code",[e._v("/keys")]),e._v(" route.")])]),e._v(" "),a("tr",[a("td",[e._v("keys.create")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("POST")]),e._v(" "),a("code",[e._v("/keys")]),e._v(" route.")])]),e._v(" "),a("tr",[a("td",[e._v("keys.update")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("PATCH")]),e._v(" "),a("code",[e._v("/keys")]),e._v(" routes.")])]),e._v(" "),a("tr",[a("td",[e._v("keys.delete")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("DELETE")]),e._v(" "),a("code",[e._v("/keys")]),e._v(" routes.")])]),e._v(" "),a("tr",[a("td",[e._v("experimental.get")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("GET")]),e._v(" "),a("code",[e._v("/experimental-features")]),e._v(" routes.")])]),e._v(" "),a("tr",[a("td",[e._v("experimental.update")]),e._v(" "),a("td",[e._v("Provides access to "),a("code",[e._v("PATCH")]),e._v(" "),a("code",[e._v("/experimental-features")]),e._v(" routes.")])])])]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-4-3-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-4-3-response-definition"}},[e._v("#")]),e._v(" 3.2.4.4.3. Response Definition")]),e._v(" "),a("p",[e._v("Returns a "),a("code",[e._v("201 Created")]),e._v(" HTTP code when the request is successful.")]),e._v(" "),a("p",[e._v("See "),a("a",{attrs:{href:"#3241-api-key-resource-representation"}},[e._v("API Key Resource Representation")]),e._v(" section for the response body.")]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-4-3-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-4-3-errors"}},[e._v("#")]),e._v(" 3.2.4.4.3. Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Accessing this route while a master key is not set for the instance returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_master_key"}},[e._v("missing_master_key")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Accessing this route without the "),a("code",[e._v("Authorization")]),e._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Accessing this route without the master key or an API key missing the "),a("code",[e._v("keys.create")]),e._v(" permission returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Omitting Content-Type header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an empty Content-Type returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a different Content-Type than "),a("code",[e._v("application/json")]),e._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an empty payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a different payload type than the Content-Type header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid json format returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Omitting "),a("code",[e._v("actions")]),e._v(" field from the payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_api_key_actions"}},[e._v("missing_api_key_actions")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Omitting "),a("code",[e._v("indexes")]),e._v(" field from the payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_api_key_indexes"}},[e._v("missing_api_key_indexes")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Omitting "),a("code",[e._v("expiresAt")]),e._v(" field from the payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_api_key_expires_at"}},[e._v("missing_api_key_expires_at")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an "),a("code",[e._v("uid")]),e._v(" field that already exists returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#api_key_already_exists"}},[e._v("api_key_already_exists")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid value for the "),a("code",[e._v("uid")]),e._v(" field returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key_uid"}},[e._v("invalid_api_key_uid")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid value for the "),a("code",[e._v("actions")]),e._v(" field returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key_actions"}},[e._v("invalid_api_key_actions")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid value for the "),a("code",[e._v("indexes")]),e._v(" field returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key_indexes"}},[e._v("invalid_api_key_indexes")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid value for the "),a("code",[e._v("expiresAt")]),e._v(" field returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key_expires_at"}},[e._v("invalid_api_key_expires_at")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid value for the "),a("code",[e._v("name")]),e._v(" field returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key_name"}},[e._v("invalid_api_key_name")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid value for the "),a("code",[e._v("description")]),e._v(" field returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key_description"}},[e._v("invalid_api_key_description")]),e._v(" error.")],1)]),e._v(" "),a("h5",{attrs:{id:"_3-2-4-5-patch-keys-uid-or-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-5-patch-keys-uid-or-key"}},[e._v("#")]),e._v(" 3.2.4.5. "),a("code",[e._v("PATCH")]),e._v(" - "),a("code",[e._v("/keys/:uid_or_key")])]),e._v(" "),a("p",[e._v("Update an API key found by it's "),a("code",[e._v("uid")]),e._v(" or "),a("code",[e._v("key")]),e._v(" field. Only the "),a("code",[e._v("name")]),e._v(" and "),a("code",[e._v("description")]),e._v(" fields of an API key can be modified.")]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-5-1-payload-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-5-1-payload-definition"}},[e._v("#")]),e._v(" 3.2.4.5.1. Payload Definition")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("field")]),e._v(" "),a("th",[e._v("type")]),e._v(" "),a("th",[e._v("required")]),e._v(" "),a("th",[e._v("description")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[e._v("name")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("Optional")]),e._v(" "),a("td",[e._v("A name for the API Key. "),a("strong",[e._v("Default")]),e._v(": "),a("code",[e._v("null")])])]),e._v(" "),a("tr",[a("td",[e._v("description")]),e._v(" "),a("td",[e._v("string")]),e._v(" "),a("td",[e._v("Optional")]),e._v(" "),a("td",[e._v("A description for the API key. "),a("strong",[e._v("Default")]),e._v(": "),a("code",[e._v("null")])])])])]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-5-2-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-5-2-response-definition"}},[e._v("#")]),e._v(" 3.2.4.5.2. Response Definition")]),e._v(" "),a("p",[e._v("Returns a "),a("code",[e._v("200 Success")]),e._v(" HTTP code when the request is successful.")]),e._v(" "),a("p",[e._v("See "),a("a",{attrs:{href:"#3241-api-key-resource-representation"}},[e._v("API Key Resource Representation")]),e._v(" section for the response body.")]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-5-3-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-5-3-errors"}},[e._v("#")]),e._v(" 3.2.4.5.3. Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Accessing this route while a master key is not set for the instance returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_master_key"}},[e._v("missing_master_key")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Accessing this route without the "),a("code",[e._v("Authorization")]),e._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Accessing this route without the master key or an API key missing the "),a("code",[e._v("keys.update")]),e._v(" permission returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Attempting to access an API key that does not exist returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#api_key_not_found"}},[e._v("api_key_not_found")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Omitting Content-Type header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an empty Content-Type returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a different Content-Type than "),a("code",[e._v("application/json")]),e._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an empty payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a different payload type than the Content-Type header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid json format returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid value for the "),a("code",[e._v("name")]),e._v(" field returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key_name"}},[e._v("invalid_api_key_name")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid value for the "),a("code",[e._v("description")]),e._v(" field returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key_description"}},[e._v("invalid_api_key_description")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending "),a("code",[e._v("uid")]),e._v(" in the payload request returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#immutable_api_key_uid"}},[e._v("immutable_api_key_uid")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending "),a("code",[e._v("key")]),e._v(" in the payload request returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#immutable_api_key_key"}},[e._v("immutable_api_key_key")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending "),a("code",[e._v("actions")]),e._v(" in the payload request returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#immutable_api_key_actions"}},[e._v("immutable_api_key_actions")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending "),a("code",[e._v("indexes")]),e._v(" in the payload request returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#immutable_api_key_indexes"}},[e._v("immutable_api_key_indexes")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending "),a("code",[e._v("expiresAt")]),e._v(" in the payload request returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#immutable_api_key_expires_at"}},[e._v("immutable_api_key_expires_at")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending "),a("code",[e._v("createdAt")]),e._v(" in the payload request returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#immutable_api_key_created_at"}},[e._v("immutable_api_key_created_at")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending "),a("code",[e._v("updatedAt")]),e._v(" in the payload request returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#immutable_api_key_updated_at"}},[e._v("immutable_api_key_updated_at")]),e._v(" error.")],1)]),e._v(" "),a("h5",{attrs:{id:"_3-2-4-6-delete-keys-uid-or-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-6-delete-keys-uid-or-key"}},[e._v("#")]),e._v(" 3.2.4.6. "),a("code",[e._v("DELETE")]),e._v(" - "),a("code",[e._v("/keys/:uid_or_key")])]),e._v(" "),a("p",[e._v("Delete an API key found by it's "),a("code",[e._v("uid")]),e._v(" or "),a("code",[e._v("key")]),e._v(" field.")]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-6-1-payload-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-6-1-payload-definition"}},[e._v("#")]),e._v(" 3.2.4.6.1. Payload Definition")]),e._v(" "),a("p",[e._v("n/a")]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-6-2-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-6-2-response-definition"}},[e._v("#")]),e._v(" 3.2.4.6.2. Response Definition")]),e._v(" "),a("p",[e._v("Returns a "),a("code",[e._v("204 No-Content")]),e._v(" HTTP code when the request is successful.")]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-6-3-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-6-3-errors"}},[e._v("#")]),e._v(" 3.2.4.6.3. Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Accessing this route while a master key is not set for the instance returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_master_key"}},[e._v("missing_master_key")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Accessing this route without the "),a("code",[e._v("Authorization")]),e._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Accessing this route without the master key or an API key missing the "),a("code",[e._v("keys.delete")]),e._v(" permission returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Attempting to access an API key that does not exist returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#api_key_not_found"}},[a("code",[e._v("api_key_not_found")])]),e._v(" error.")],1)]),e._v(" "),a("h5",{attrs:{id:"_3-2-4-7-using-an-api-key-on-client-code"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-7-using-an-api-key-on-client-code"}},[e._v("#")]),e._v(" 3.2.4.7. Using an API key on client-code")]),e._v(" "),a("h6",{attrs:{id:"_3-2-4-7-1-authorization-bearer-header"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-7-1-authorization-bearer-header"}},[e._v("#")]),e._v(" 3.2.4.7.1 Authorization Bearer Header")]),e._v(" "),a("p",[e._v("When the Meilisearch API is secured by the presence of a master key, the "),a("code",[e._v("Authorization")]),e._v(" header must be used with a bearer to authorize requests. The specified value must be the value of the "),a("code",[e._v("key")]),e._v(" field of an API key.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v(' "Authorization: Bearer `:key`"\n "Content-Type: application/json"\n')])])]),a("ul",[a("li",[e._v("🔴 Accessing a route with an "),a("code",[e._v("API Key")]),e._v(" that has expired, been deleted or don't have sufficient permissions returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),a("h2",{attrs:{id:"_4-technical-aspects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-aspects"}},[e._v("#")]),e._v(" 4. Technical Aspects")]),e._v(" "),a("h3",{attrs:{id:"_4-1-api-key-generation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-api-key-generation"}},[e._v("#")]),e._v(" 4.1. API Key generation")]),e._v(" "),a("p",[e._v("An "),a("code",[e._v("uid")]),e._v(" representing by a uuid v4 is generated if not specified at creation by the user.")]),e._v(" "),a("p",[e._v("The final key is then an HMAC with the master key, as the secret, and the "),a("code",[e._v("uid")]),e._v(", a hyphenated Uuidv4, as the data. HMAC uses an SHA-256 algorithm internally.")]),e._v(" "),a("p",[e._v("The final key could be generated with openssl as below:")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",[a("code",[e._v("echo -n $HYPHENATED_UUID | openssl dgst -sha256 -hmac $MASTER_KEY\n")])])]),a("h3",{attrs:{id:"_4-2-synchronous-write-of-api-key-resources"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-synchronous-write-of-api-key-resources"}},[e._v("#")]),e._v(" 4.2. Synchronous write of "),a("code",[e._v("API Key")]),e._v(" resources")]),e._v(" "),a("p",[e._v("Writing to "),a("code",[e._v("/keys")]),e._v(" endpoints are synchronous in order to return errors directly to the user when he performs an operation on them. This means that API key management operations do not appear as a task on "),a("code",[e._v("/tasks")]),e._v(".")]),e._v(" "),a("h3",{attrs:{id:"_4-3-propagating-api-key-to-dumps"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-3-propagating-api-key-to-dumps"}},[e._v("#")]),e._v(" 4.3. Propagating "),a("code",[e._v("API Key")]),e._v(" to dumps.")]),e._v(" "),a("p",[e._v("The generated API keys must also transit within a dump to facilitate the upgrade of a MeiliSearch instance.")]),e._v(" "),a("blockquote",[a("p",[e._v("🚨 As a reminder, dumps must be stored in secure areas not accessible to the public or unaccredited persons. In general, you should avoid moving them off the host machine or do so via a secure channel as a security measure.")])]),e._v(" "),a("p",[e._v("If the dumps ever leak, the api keys cannot be spoofed from the dump inspection because it needs the master key to have the full value of a valid API key. Only the "),a("code",[e._v("uid")]),e._v(" value is propagated in the dumps.")]),e._v(" "),a("h3",{attrs:{id:"_4-4-propagating-api-key-to-snapshots"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-4-propagating-api-key-to-snapshots"}},[e._v("#")]),e._v(" 4.4. Propagating "),a("code",[e._v("API Key")]),e._v(" to snapshots.")]),e._v(" "),a("p",[e._v("The generated API keys must also transit within a snapshot to facilitate the recovery of a MeiliSearch instance.")]),e._v(" "),a("blockquote",[a("p",[e._v("🚨 As a reminder, snapshots must be stored in secure areas not accessible to the public or unaccredited persons. In general, you should avoid moving them off the host machine or do so via a secure channel as a security measure.")])]),e._v(" "),a("p",[e._v("If the snapshot ever leak, the "),a("code",[e._v("API keys")]),e._v(" cannot be spoofed from the snapshot inspection because it needs the master key to have the full value of a valid "),a("code",[e._v("API key")]),e._v(". Only the "),a("code",[e._v("uid")]),e._v(" value is propagated in the snapshots.")]),e._v(" "),a("h3",{attrs:{id:"_4-5-api-keys-storage-size-limit"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-5-api-keys-storage-size-limit"}},[e._v("#")]),e._v(" 4.5. API Keys storage size limit")]),e._v(" "),a("p",[e._v("The maximum size of the API key storage layer is "),a("code",[e._v("100GB")]),e._v(".")]),e._v(" "),a("h2",{attrs:{id:"_5-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),a("ul",[a("li",[e._v("Regenerate a specific "),a("code",[e._v("API Key")]),e._v(".")]),e._v(" "),a("li",[e._v('Have an "archive" state where manually deleted API Keys can be restored for a certain amount of time.')]),e._v(" "),a("li",[e._v("Add rate-limiting per API Key.")]),e._v(" "),a("li",[e._v("A restriction on the maximum offset/limit.")]),e._v(" "),a("li",[e._v("Add search parameters restrictions for an API Key.")]),e._v(" "),a("li",[e._v("Add rfc2822 format expression for "),a("code",[e._v("expiredAt")]),e._v(" field. e.g. "),a("code",[e._v("Wed, 18 Feb 2022 23:16:09 GMT")])]),e._v(" "),a("li",[e._v("Add an alias that can only be associated to one API Key to retrieve it easily on client side. e.g. "),a("code",[e._v("GET /keys/:uid_or_alias")])]),e._v(" "),a("li",[e._v("Supports wildcard expressions at the start/middle of a string.")])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/30.ffe8feb9.js b/docs/assets/js/30.05c7bec9.js similarity index 99% rename from docs/assets/js/30.ffe8feb9.js rename to docs/assets/js/30.05c7bec9.js index a4d8eae70..500ff5980 100644 --- a/docs/assets/js/30.ffe8feb9.js +++ b/docs/assets/js/30.05c7bec9.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[30],{454:function(e,t,a){"use strict";a.r(t);var s=a(62),n=Object(s.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("ul",[a("li",[e._v("Title: Tenant Tokens")])]),e._v(" "),a("h1",{attrs:{id:"tenant-tokens"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#tenant-tokens"}},[e._v("#")]),e._v(" Tenant Tokens")]),e._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("A "),a("code",[e._v("Tenant token")]),e._v(" is generated by the user code to be used by an end-user when making search queries.")]),e._v(" "),a("p",[e._v("It allows users to have multi-tenant indexes and thus restricts access to documents depending on the end-user making the search request.")]),e._v(" "),a("p",[e._v("A Tenant Token is a JWT containing the information necessary for Meilisearch to verify it and extract permission/rules to apply it to the end user's search.")]),e._v(" "),a("h3",{attrs:{id:"_1-1-key-points"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-1-key-points"}},[e._v("#")]),e._v(" 1.1. Key Points")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("Tenant tokens")]),e._v(" are JWTs generated on the user side by using Meilisearch SDKs or their custom code. "),a("code",[e._v("Tenant tokens")]),e._v(" are not stored nor retrievable on the Meilisearch side.")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" contain rules that ensure that a "),a("code",[e._v("Tenant token")]),e._v(" holder (e.g. an end-user) only has access to documents matching rules chosen at the "),a("code",[e._v("tenant token")]),e._v(" creation.")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" are signed from a Meilisearch "),a("code",[e._v("API key")]),e._v(" resource on the user's code.")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" must not be signed by the master key.")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" cannot be more permissive than the signing "),a("code",[e._v("API key")]),e._v(".")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" must be signed by an "),a("code",[e._v("API Key")]),e._v(" having the "),a("code",[e._v("search")]),e._v(" action defined.")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" can have different rules for each index accessible by the signing API key. These rules are described in the "),a("code",[e._v("searchRules")]),e._v(" JSON object.")]),e._v(" "),a("li",[e._v("The only rule available in the "),a("code",[e._v("searchRules")]),e._v(" object is the search parameter "),a("code",[e._v("filter")]),e._v(".")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" are sent to Meilisearch via the "),a("code",[e._v("Authorization")]),e._v(" header like any "),a("code",[e._v("API Keys")]),e._v(" or the master key.")]),e._v(" "),a("li",[e._v("When Meilisearch receives a search query emitted with a "),a("code",[e._v("Tenant token")]),e._v(", the "),a("code",[e._v("tenant token")]),e._v(" is decoded, then the "),a("code",[e._v("searchRules")]),e._v(" are applied for the search request before the search parameters.")])]),e._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[a("code",[e._v("Tenant tokens")]),e._v(" are introduced to solve multi-tenant indexes use-case.")]),e._v(" "),a("blockquote",[a("p",[e._v("Multi-Tenant Indexes Definition: It is an index that stores documents that may belong to different tenants. In our case, a tenant within an index can be a user or a company, etc. In general, the data of one tenant should not be accessible by other tenants.")])]),e._v(" "),a("p",[e._v("Users today need to set up workarounds to have multi-tenant indexes. They have to use server code to implement the access restriction logic before requesting Meilisearch. It isn't easy to maintain, to implement, and the performance is not optimal because the frontend code does not communicate directly with Meilisearch.")]),e._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("h3",{attrs:{id:"_3-1-example-solving-multi-tenancy-with-tenant-tokens"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-example-solving-multi-tenancy-with-tenant-tokens"}},[e._v("#")]),e._v(" 3.1. Example: Solving Multi-Tenancy with "),a("code",[e._v("Tenant tokens")])]),e._v(" "),a("p",[a("img",{attrs:{src:"https://user-images.githubusercontent.com/3692335/151013496-d33ab507-f972-465d-b942-899fc2bd0a22.png",alt:""}})]),e._v(" "),a("p",[a("code",[e._v("Mark")]),e._v(" is a developer for a SaaS platform. He would like to ensure that every end-user can only access their documents at search time.")]),e._v(" "),a("p",[e._v("When an end-user registers, Mark's backend code generates a "),a("code",[e._v("Tenant token")]),e._v(" for that end-user so they can only access their documents at search time.")]),e._v(" "),a("p",[e._v("This tenant-token is signed with a Meilisearch API Key so that Meilisearch can ensure that the tenant-token has been generated from a known entity.")]),e._v(" "),a("p",[e._v("Meilisearch checks if the Tenant Token is authorized to make the search request.")]),e._v(" "),a("p",[e._v("Then Meilisearch extracts the Tenant Token's rules to apply for the search request.")]),e._v(" "),a("h3",{attrs:{id:"_3-2-tenant-token-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-tenant-token-details"}},[e._v("#")]),e._v(" 3.2. "),a("code",[e._v("Tenant Token")]),e._v(" Details")]),e._v(" "),a("p",[e._v("Tenant Tokens are JWTs and must respect several conditions to be understandable by a Meilisearch instance.")]),e._v(" "),a("h4",{attrs:{id:"_3-2-1-header-algorithm-and-token-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-header-algorithm-and-token-type"}},[e._v("#")]),e._v(" 3.2.1. Header: Algorithm and token type")]),e._v(" "),a("p",[e._v("The Tenant Token must be signed with one of the following algorithms:")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("HS256")])]),e._v(" "),a("li",[a("code",[e._v("HS384")])]),e._v(" "),a("li",[a("code",[e._v("HS512")])])]),e._v(" "),a("p",[e._v("e.g. With "),a("code",[e._v("HS256")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"alg"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"HS256"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"typ"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"JWT"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("The secret key that is used to encrypt the JWT token must be the original API Key value (not the UID).")]),e._v(" "),a("h4",{attrs:{id:"_3-2-2-payload-data"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-payload-data"}},[e._v("#")]),e._v(" 3.2.2. Payload: Data")]),e._v(" "),a("p",[e._v("Meilisearch needs information within the tenant token to check its validity and use it to authorize and perform end-user search requests.")]),e._v(" "),a("h5",{attrs:{id:"_3-2-2-1-validity-information"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-validity-information"}},[e._v("#")]),e._v(" 3.2.2.1. Validity Information")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Fields")]),e._v(" "),a("th",[e._v("Required")]),e._v(" "),a("th",[e._v("Description")]),e._v(" "),a("th",[e._v("Comments")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("code",[e._v("apiKeyUid")]),e._v(" (Custom claim)")]),e._v(" "),a("td",[e._v("Required")]),e._v(" "),a("td",[e._v("Must contain the "),a("code",[e._v("uid")]),e._v(" field value of the signing "),a("code",[e._v("Meilisearch API key")]),e._v(" used to generate the JWT")]),e._v(" "),a("td")]),e._v(" "),a("tr",[a("td",[a("code",[e._v("exp")]),e._v(" (Expiration Time claim)")]),e._v(" "),a("td",[e._v("Optional")]),e._v(" "),a("td",[e._v("A JSON numeric value representing the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time.")]),e._v(" "),a("td",[e._v("If the signing API key expires, the Tenant Token also expires. Thus said, the "),a("code",[e._v("exp")]),e._v(" can't be greater than the expiration date of the signing API key.")])])])]),e._v(" "),a("h6",{attrs:{id:"_3-2-2-1-1-apikeyuid-field"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-1-apikeyuid-field"}},[e._v("#")]),e._v(" 3.2.2.1.1. "),a("code",[e._v("apiKeyUid")]),e._v(" field")]),e._v(" "),a("p",[a("code",[e._v("apiKeyUid")]),e._v(" permits to verify that the signing API key of the Token is known and valid within Meilisearch. It must contain the "),a("code",[e._v("uid")]),e._v(" field value of the Meilisearch API key that generates and signs the Tenant Token.")]),e._v(" "),a("p",[e._v("The "),a("code",[e._v("apiKeyUid")]),e._v(" can't be generated from the master key, and the "),a("code",[e._v("API Key")]),e._v(" must have the "),a("code",[e._v("search")]),e._v(" action defined to generate a usable tenant token.")]),e._v(" "),a("h6",{attrs:{id:"_3-2-2-1-2-exp-field"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-2-exp-field"}},[e._v("#")]),e._v(" 3.2.2.1.2. "),a("code",[e._v("exp")]),e._v(" field")]),e._v(" "),a("p",[a("code",[e._v("exp")]),e._v(" is used to specify the expiration date of the Tenant Token if needed. The format is a JSON numeric value representing the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time, ignoring leap seconds.")]),e._v(" "),a("h5",{attrs:{id:"_3-2-2-2-business-logic-information"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-business-logic-information"}},[e._v("#")]),e._v(" 3.2.2.2. Business Logic Information")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Fields")]),e._v(" "),a("th",[e._v("Required")]),e._v(" "),a("th",[e._v("Description")]),e._v(" "),a("th",[e._v("Comments")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("code",[e._v("searchRules")])]),e._v(" "),a("td",[e._v("Required")]),e._v(" "),a("td",[e._v("This JSON object contains rules to apply for search queries performed with the JWT depending on the searched index. A Tenant Token cannot access more indexes at search time than those defined as accessible by the signing API key.")]),e._v(" "),a("td",[e._v("Let's say an index uses a field to separate documents belonging to one end-user from another one, but another index needs to separate belonging using a different field in its schema. Defining specific search rules per accessible index avoids generating several tenant tokens for an end-user.")])])])]),e._v(" "),a("h6",{attrs:{id:"_3-2-2-2-1-searchrules-json-object"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-1-searchrules-json-object"}},[e._v("#")]),e._v(" 3.2.2.2.1. "),a("code",[e._v("searchRules")]),e._v(" JSON object")]),e._v(" "),a("p",[a("code",[e._v("searchRules")]),e._v(" contains the rules to be enforced at search time for all or specific accessible indexes for the signing API Key.")]),e._v(" "),a("p",[e._v("Here are the accepted formats for the "),a("code",[e._v("searchRules")]),e._v(" property.")]),e._v(" "),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("In this case, all indexes on which the signing API Key has permissions are searchable by the tenant token without any restrictions.")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("is equivalent to")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[e._v("null")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("is equivalent to")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("The search is authorized on all accessible indexes from the signing API Key for the Tenant Token without specific rules.")]),e._v(" "),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("In this case, all searchable indexes from the signing API Key are searchable by the tenant token, and Meilisearch applies the "),a("code",[e._v("filter")]),e._v(" search rule before applying the request search parameters.")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"user_id = 1"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("In this case, if the "),a("code",[e._v("medical_records")]),e._v(" index is searchable from the signing API Key, the tenant token is only authorized to search in the "),a("code",[e._v("medical_records")]),e._v(" index.")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"medical_records"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("is equivalent to")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"medical_records"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[e._v("null")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("is equivalent to")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"medical_records"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("In this case, if the "),a("code",[e._v("medical_records")]),e._v(" index is searchable from the signing API Key, the tenant token is only authorized to search in the "),a("code",[e._v("medical_records")]),e._v(" index, and Meilisearch applies the "),a("code",[e._v("filter")]),e._v(" search rule before applying the request search parameters.")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"medical_records"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"user_id = 1"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("In this case, if the "),a("code",[e._v("medical_records")]),e._v(" and "),a("code",[e._v("medical_appointments")]),e._v(" indexes are searchable from the signing API Key, the tenant token is only authorized to search in those indexes, and Meilisearch applies the "),a("code",[e._v("filter")]),e._v(" search rule before applying the request search parameters.")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"medical_records"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"user_id = 1"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"medical_appointments"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"user_id = 1 AND accepted = true"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("In this case, all searchable indexes from the signing API Key are searchable, and Meilisearch applies the "),a("code",[e._v("filter")]),e._v(" search rule before applying the request search parameters for all indexes except for the "),a("code",[e._v("medical_appointments")]),e._v(" index. A dedicated "),a("code",[e._v("filter")]),e._v(" search rule is applied when making a search query on this index.")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"user_id = 1"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"medical_appointments"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"user_id = 1 AND accepted = true"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("The "),a("code",[e._v("filter")]),e._v(" field accepts an array, a string, and the mixed syntax as described in the "),a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#312-filter"}},[e._v("Search Endpoints Specification")]),e._v(".")],1)]),e._v(" "),a("h5",{attrs:{id:"_3-2-2-3-payload-example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-3-payload-example"}},[e._v("#")]),e._v(" 3.2.2.3. Payload example")]),e._v(" "),a("p",[e._v("Given a Meilisearch API Key used to sign the JWT from the user code. Here is an example of a valid payload for a tenant token.")]),e._v(" "),a("p",[e._v("e.g. "),a("code",[e._v("Meilisearch API key: rkDxFUHd02193e120218f72cc51a9db62729fdb4003e271f960d1631b54f3426fa8b2595")])]),e._v(" "),a("div",{staticClass:"language-jsonc extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('{\n "apiKeyUid": "f0ec9882-0184-4303-89f0-d4c4d6912bcf", // The uid field value of the signing Meilisearch API Key\n "exp": 1641835850, // An expiration date in seconds from 1970-01-01T00:00:00Z UTC\n "searchRules": { // The searchRules Json Object definition\n "*": {\n "filter": "user_id = 1"\n }\n }\n}\n')])])]),a("blockquote",[a("p",[e._v("In this example, "),a("code",[e._v('"*"')]),e._v(" allows to specify that no matter which index is searched (among all those accessible by the signing API key that generated the tenant token), the "),a("code",[e._v("filter")]),e._v(" search rule is applied on all search requests.")])]),e._v(" "),a("h3",{attrs:{id:"_3-3-tenant-token-revokation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-tenant-token-revokation"}},[e._v("#")]),e._v(" 3.3. Tenant Token Revokation")]),e._v(" "),a("p",[e._v("It is not possible to revoke a specific tenant token.")]),e._v(" "),a("p",[e._v("The only way to do so is to "),a("strong",[e._v("delete the API key that signed it")]),e._v(" using the "),a("code",[e._v("DELETE - /keys/:apiKey")]),e._v(" endpoints of Meilisearch.")]),e._v(" "),a("p",[e._v("🚨 "),a("strong",[e._v("Doing this revoke all tenant tokens signed by this API Key.")])]),e._v(" "),a("p",[e._v("Another much more drastic method is to modify the "),a("code",[e._v("master key")]),e._v(" of the Meilisearch instance.")]),e._v(" "),a("p",[e._v("🚨🚨 "),a("strong",[e._v("Doing this regenerate all the API Keys and thus revoke all the tenant tokens generated regardless of the signing API Key.")])]),e._v(" "),a("h2",{attrs:{id:"_4-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-future-possibilities"}},[e._v("#")]),e._v(" 4. Future Possibilities")]),e._v(" "),a("ul",[a("li",[e._v("Handle more signing methods for the Tenant Token.")]),e._v(" "),a("li",[e._v("Handle more search parameters restrictions in "),a("code",[e._v("searchRules")]),e._v(".")]),e._v(" "),a("li",[e._v("Add a possibility to revoke a specific Tenant Token.")]),e._v(" "),a("li",[e._v("Introduce an endpoint to generate tenant tokens on the Meilisearch side.")])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[30],{455:function(e,t,a){"use strict";a.r(t);var s=a(62),n=Object(s.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("ul",[a("li",[e._v("Title: Tenant Tokens")])]),e._v(" "),a("h1",{attrs:{id:"tenant-tokens"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#tenant-tokens"}},[e._v("#")]),e._v(" Tenant Tokens")]),e._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("A "),a("code",[e._v("Tenant token")]),e._v(" is generated by the user code to be used by an end-user when making search queries.")]),e._v(" "),a("p",[e._v("It allows users to have multi-tenant indexes and thus restricts access to documents depending on the end-user making the search request.")]),e._v(" "),a("p",[e._v("A Tenant Token is a JWT containing the information necessary for Meilisearch to verify it and extract permission/rules to apply it to the end user's search.")]),e._v(" "),a("h3",{attrs:{id:"_1-1-key-points"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-1-key-points"}},[e._v("#")]),e._v(" 1.1. Key Points")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("Tenant tokens")]),e._v(" are JWTs generated on the user side by using Meilisearch SDKs or their custom code. "),a("code",[e._v("Tenant tokens")]),e._v(" are not stored nor retrievable on the Meilisearch side.")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" contain rules that ensure that a "),a("code",[e._v("Tenant token")]),e._v(" holder (e.g. an end-user) only has access to documents matching rules chosen at the "),a("code",[e._v("tenant token")]),e._v(" creation.")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" are signed from a Meilisearch "),a("code",[e._v("API key")]),e._v(" resource on the user's code.")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" must not be signed by the master key.")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" cannot be more permissive than the signing "),a("code",[e._v("API key")]),e._v(".")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" must be signed by an "),a("code",[e._v("API Key")]),e._v(" having the "),a("code",[e._v("search")]),e._v(" action defined.")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" can have different rules for each index accessible by the signing API key. These rules are described in the "),a("code",[e._v("searchRules")]),e._v(" JSON object.")]),e._v(" "),a("li",[e._v("The only rule available in the "),a("code",[e._v("searchRules")]),e._v(" object is the search parameter "),a("code",[e._v("filter")]),e._v(".")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" are sent to Meilisearch via the "),a("code",[e._v("Authorization")]),e._v(" header like any "),a("code",[e._v("API Keys")]),e._v(" or the master key.")]),e._v(" "),a("li",[e._v("When Meilisearch receives a search query emitted with a "),a("code",[e._v("Tenant token")]),e._v(", the "),a("code",[e._v("tenant token")]),e._v(" is decoded, then the "),a("code",[e._v("searchRules")]),e._v(" are applied for the search request before the search parameters.")])]),e._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[a("code",[e._v("Tenant tokens")]),e._v(" are introduced to solve multi-tenant indexes use-case.")]),e._v(" "),a("blockquote",[a("p",[e._v("Multi-Tenant Indexes Definition: It is an index that stores documents that may belong to different tenants. In our case, a tenant within an index can be a user or a company, etc. In general, the data of one tenant should not be accessible by other tenants.")])]),e._v(" "),a("p",[e._v("Users today need to set up workarounds to have multi-tenant indexes. They have to use server code to implement the access restriction logic before requesting Meilisearch. It isn't easy to maintain, to implement, and the performance is not optimal because the frontend code does not communicate directly with Meilisearch.")]),e._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("h3",{attrs:{id:"_3-1-example-solving-multi-tenancy-with-tenant-tokens"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-example-solving-multi-tenancy-with-tenant-tokens"}},[e._v("#")]),e._v(" 3.1. Example: Solving Multi-Tenancy with "),a("code",[e._v("Tenant tokens")])]),e._v(" "),a("p",[a("img",{attrs:{src:"https://user-images.githubusercontent.com/3692335/151013496-d33ab507-f972-465d-b942-899fc2bd0a22.png",alt:""}})]),e._v(" "),a("p",[a("code",[e._v("Mark")]),e._v(" is a developer for a SaaS platform. He would like to ensure that every end-user can only access their documents at search time.")]),e._v(" "),a("p",[e._v("When an end-user registers, Mark's backend code generates a "),a("code",[e._v("Tenant token")]),e._v(" for that end-user so they can only access their documents at search time.")]),e._v(" "),a("p",[e._v("This tenant-token is signed with a Meilisearch API Key so that Meilisearch can ensure that the tenant-token has been generated from a known entity.")]),e._v(" "),a("p",[e._v("Meilisearch checks if the Tenant Token is authorized to make the search request.")]),e._v(" "),a("p",[e._v("Then Meilisearch extracts the Tenant Token's rules to apply for the search request.")]),e._v(" "),a("h3",{attrs:{id:"_3-2-tenant-token-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-tenant-token-details"}},[e._v("#")]),e._v(" 3.2. "),a("code",[e._v("Tenant Token")]),e._v(" Details")]),e._v(" "),a("p",[e._v("Tenant Tokens are JWTs and must respect several conditions to be understandable by a Meilisearch instance.")]),e._v(" "),a("h4",{attrs:{id:"_3-2-1-header-algorithm-and-token-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-header-algorithm-and-token-type"}},[e._v("#")]),e._v(" 3.2.1. Header: Algorithm and token type")]),e._v(" "),a("p",[e._v("The Tenant Token must be signed with one of the following algorithms:")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("HS256")])]),e._v(" "),a("li",[a("code",[e._v("HS384")])]),e._v(" "),a("li",[a("code",[e._v("HS512")])])]),e._v(" "),a("p",[e._v("e.g. With "),a("code",[e._v("HS256")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"alg"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"HS256"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"typ"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"JWT"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("The secret key that is used to encrypt the JWT token must be the original API Key value (not the UID).")]),e._v(" "),a("h4",{attrs:{id:"_3-2-2-payload-data"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-payload-data"}},[e._v("#")]),e._v(" 3.2.2. Payload: Data")]),e._v(" "),a("p",[e._v("Meilisearch needs information within the tenant token to check its validity and use it to authorize and perform end-user search requests.")]),e._v(" "),a("h5",{attrs:{id:"_3-2-2-1-validity-information"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-validity-information"}},[e._v("#")]),e._v(" 3.2.2.1. Validity Information")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Fields")]),e._v(" "),a("th",[e._v("Required")]),e._v(" "),a("th",[e._v("Description")]),e._v(" "),a("th",[e._v("Comments")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("code",[e._v("apiKeyUid")]),e._v(" (Custom claim)")]),e._v(" "),a("td",[e._v("Required")]),e._v(" "),a("td",[e._v("Must contain the "),a("code",[e._v("uid")]),e._v(" field value of the signing "),a("code",[e._v("Meilisearch API key")]),e._v(" used to generate the JWT")]),e._v(" "),a("td")]),e._v(" "),a("tr",[a("td",[a("code",[e._v("exp")]),e._v(" (Expiration Time claim)")]),e._v(" "),a("td",[e._v("Optional")]),e._v(" "),a("td",[e._v("A JSON numeric value representing the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time.")]),e._v(" "),a("td",[e._v("If the signing API key expires, the Tenant Token also expires. Thus said, the "),a("code",[e._v("exp")]),e._v(" can't be greater than the expiration date of the signing API key.")])])])]),e._v(" "),a("h6",{attrs:{id:"_3-2-2-1-1-apikeyuid-field"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-1-apikeyuid-field"}},[e._v("#")]),e._v(" 3.2.2.1.1. "),a("code",[e._v("apiKeyUid")]),e._v(" field")]),e._v(" "),a("p",[a("code",[e._v("apiKeyUid")]),e._v(" permits to verify that the signing API key of the Token is known and valid within Meilisearch. It must contain the "),a("code",[e._v("uid")]),e._v(" field value of the Meilisearch API key that generates and signs the Tenant Token.")]),e._v(" "),a("p",[e._v("The "),a("code",[e._v("apiKeyUid")]),e._v(" can't be generated from the master key, and the "),a("code",[e._v("API Key")]),e._v(" must have the "),a("code",[e._v("search")]),e._v(" action defined to generate a usable tenant token.")]),e._v(" "),a("h6",{attrs:{id:"_3-2-2-1-2-exp-field"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-2-exp-field"}},[e._v("#")]),e._v(" 3.2.2.1.2. "),a("code",[e._v("exp")]),e._v(" field")]),e._v(" "),a("p",[a("code",[e._v("exp")]),e._v(" is used to specify the expiration date of the Tenant Token if needed. The format is a JSON numeric value representing the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time, ignoring leap seconds.")]),e._v(" "),a("h5",{attrs:{id:"_3-2-2-2-business-logic-information"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-business-logic-information"}},[e._v("#")]),e._v(" 3.2.2.2. Business Logic Information")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Fields")]),e._v(" "),a("th",[e._v("Required")]),e._v(" "),a("th",[e._v("Description")]),e._v(" "),a("th",[e._v("Comments")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("code",[e._v("searchRules")])]),e._v(" "),a("td",[e._v("Required")]),e._v(" "),a("td",[e._v("This JSON object contains rules to apply for search queries performed with the JWT depending on the searched index. A Tenant Token cannot access more indexes at search time than those defined as accessible by the signing API key.")]),e._v(" "),a("td",[e._v("Let's say an index uses a field to separate documents belonging to one end-user from another one, but another index needs to separate belonging using a different field in its schema. Defining specific search rules per accessible index avoids generating several tenant tokens for an end-user.")])])])]),e._v(" "),a("h6",{attrs:{id:"_3-2-2-2-1-searchrules-json-object"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-1-searchrules-json-object"}},[e._v("#")]),e._v(" 3.2.2.2.1. "),a("code",[e._v("searchRules")]),e._v(" JSON object")]),e._v(" "),a("p",[a("code",[e._v("searchRules")]),e._v(" contains the rules to be enforced at search time for all or specific accessible indexes for the signing API Key.")]),e._v(" "),a("p",[e._v("Here are the accepted formats for the "),a("code",[e._v("searchRules")]),e._v(" property.")]),e._v(" "),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("In this case, all indexes on which the signing API Key has permissions are searchable by the tenant token without any restrictions.")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("is equivalent to")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[e._v("null")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("is equivalent to")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("The search is authorized on all accessible indexes from the signing API Key for the Tenant Token without specific rules.")]),e._v(" "),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("In this case, all searchable indexes from the signing API Key are searchable by the tenant token, and Meilisearch applies the "),a("code",[e._v("filter")]),e._v(" search rule before applying the request search parameters.")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"user_id = 1"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("In this case, if the "),a("code",[e._v("medical_records")]),e._v(" index is searchable from the signing API Key, the tenant token is only authorized to search in the "),a("code",[e._v("medical_records")]),e._v(" index.")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"medical_records"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("is equivalent to")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"medical_records"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[e._v("null")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("is equivalent to")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"medical_records"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("In this case, if the "),a("code",[e._v("medical_records")]),e._v(" index is searchable from the signing API Key, the tenant token is only authorized to search in the "),a("code",[e._v("medical_records")]),e._v(" index, and Meilisearch applies the "),a("code",[e._v("filter")]),e._v(" search rule before applying the request search parameters.")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"medical_records"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"user_id = 1"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("In this case, if the "),a("code",[e._v("medical_records")]),e._v(" and "),a("code",[e._v("medical_appointments")]),e._v(" indexes are searchable from the signing API Key, the tenant token is only authorized to search in those indexes, and Meilisearch applies the "),a("code",[e._v("filter")]),e._v(" search rule before applying the request search parameters.")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"medical_records"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"user_id = 1"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"medical_appointments"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"user_id = 1 AND accepted = true"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("In this case, all searchable indexes from the signing API Key are searchable, and Meilisearch applies the "),a("code",[e._v("filter")]),e._v(" search rule before applying the request search parameters for all indexes except for the "),a("code",[e._v("medical_appointments")]),e._v(" index. A dedicated "),a("code",[e._v("filter")]),e._v(" search rule is applied when making a search query on this index.")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"user_id = 1"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"medical_appointments"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"user_id = 1 AND accepted = true"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("The "),a("code",[e._v("filter")]),e._v(" field accepts an array, a string, and the mixed syntax as described in the "),a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#312-filter"}},[e._v("Search Endpoints Specification")]),e._v(".")],1)]),e._v(" "),a("h5",{attrs:{id:"_3-2-2-3-payload-example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-3-payload-example"}},[e._v("#")]),e._v(" 3.2.2.3. Payload example")]),e._v(" "),a("p",[e._v("Given a Meilisearch API Key used to sign the JWT from the user code. Here is an example of a valid payload for a tenant token.")]),e._v(" "),a("p",[e._v("e.g. "),a("code",[e._v("Meilisearch API key: rkDxFUHd02193e120218f72cc51a9db62729fdb4003e271f960d1631b54f3426fa8b2595")])]),e._v(" "),a("div",{staticClass:"language-jsonc extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('{\n "apiKeyUid": "f0ec9882-0184-4303-89f0-d4c4d6912bcf", // The uid field value of the signing Meilisearch API Key\n "exp": 1641835850, // An expiration date in seconds from 1970-01-01T00:00:00Z UTC\n "searchRules": { // The searchRules Json Object definition\n "*": {\n "filter": "user_id = 1"\n }\n }\n}\n')])])]),a("blockquote",[a("p",[e._v("In this example, "),a("code",[e._v('"*"')]),e._v(" allows to specify that no matter which index is searched (among all those accessible by the signing API key that generated the tenant token), the "),a("code",[e._v("filter")]),e._v(" search rule is applied on all search requests.")])]),e._v(" "),a("h3",{attrs:{id:"_3-3-tenant-token-revokation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-tenant-token-revokation"}},[e._v("#")]),e._v(" 3.3. Tenant Token Revokation")]),e._v(" "),a("p",[e._v("It is not possible to revoke a specific tenant token.")]),e._v(" "),a("p",[e._v("The only way to do so is to "),a("strong",[e._v("delete the API key that signed it")]),e._v(" using the "),a("code",[e._v("DELETE - /keys/:apiKey")]),e._v(" endpoints of Meilisearch.")]),e._v(" "),a("p",[e._v("🚨 "),a("strong",[e._v("Doing this revoke all tenant tokens signed by this API Key.")])]),e._v(" "),a("p",[e._v("Another much more drastic method is to modify the "),a("code",[e._v("master key")]),e._v(" of the Meilisearch instance.")]),e._v(" "),a("p",[e._v("🚨🚨 "),a("strong",[e._v("Doing this regenerate all the API Keys and thus revoke all the tenant tokens generated regardless of the signing API Key.")])]),e._v(" "),a("h2",{attrs:{id:"_4-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-future-possibilities"}},[e._v("#")]),e._v(" 4. Future Possibilities")]),e._v(" "),a("ul",[a("li",[e._v("Handle more signing methods for the Tenant Token.")]),e._v(" "),a("li",[e._v("Handle more search parameters restrictions in "),a("code",[e._v("searchRules")]),e._v(".")]),e._v(" "),a("li",[e._v("Add a possibility to revoke a specific Tenant Token.")]),e._v(" "),a("li",[e._v("Introduce an endpoint to generate tenant tokens on the Meilisearch side.")])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/31.eed11757.js b/docs/assets/js/31.1325098a.js similarity index 99% rename from docs/assets/js/31.eed11757.js rename to docs/assets/js/31.1325098a.js index 65faaebe5..9f9976a0c 100644 --- a/docs/assets/js/31.eed11757.js +++ b/docs/assets/js/31.1325098a.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[31],{455:function(e,t,a){"use strict";a.r(t);var s=a(62),i=Object(s.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("ul",[a("li",[e._v("Title: Auto-Batching")])]),e._v(" "),a("h1",{attrs:{id:"auto-batching"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#auto-batching"}},[e._v("#")]),e._v(" Auto-Batching")]),e._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("Meilisearch can automatically group consecutive asynchronous "),a("code",[e._v("documentAddition")]),e._v(" or "),a("code",[e._v("documentPartial")]),e._v(" tasks for the same index via an automatic batching mechanism.")]),e._v(" "),a("p",[e._v("The user can disable this auto-batching behavior. See "),a("a",{attrs:{href:"#32-auto-batching-mechanisms-options"}},[e._v("3.2. Auto-batching mechanisms options")]),e._v(" section.")]),e._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[e._v("We have regularly collected user pain points pointing out the slow indexing over the last year. We explained several times to users to make batches containing a maximum of documents to be updated/added to compress the indexing time of specific data structures.")]),e._v(" "),a("p",[e._v("To make Meilisearch easier to use, we explored the idea of automatically creating these batches within Meilisearch before indexing users’ documents.")]),e._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("h3",{attrs:{id:"_3-1-explanations"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-explanations"}},[e._v("#")]),e._v(" 3.1. Explanations")]),e._v(" "),a("p",[e._v("A batch preserves the logical order of the tasks for a given index.")]),e._v(" "),a("p",[e._v("Only consecutive "),a("code",[e._v("documentAdditionOrUpdate")]),e._v(" tasks for the same index can be in the same batch. All "),a("code",[e._v("tasks")]),e._v(" concerning other operations will also be part of a batch having only one task.")]),e._v(" "),a("h4",{attrs:{id:"_3-1-1-grouping-tasks-to-a-single-batch"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-grouping-tasks-to-a-single-batch"}},[e._v("#")]),e._v(" 3.1.1. Grouping tasks to a single batch")]),e._v(" "),a("p",[e._v("The scheduling program that groups tasks within a single batch is triggered when an asynchronous "),a("code",[e._v("task")]),e._v(" currently processed reaches a terminal state as "),a("code",[e._v("succeeded")]),e._v(" or "),a("code",[e._v("failed")]),e._v(".")]),e._v(" "),a("p",[e._v("In other words, when a scheduled "),a("code",[e._v("documentAdditionOrUpdate")]),e._v(" task for a given index is picked from the task queue, the scheduler fetches and groups all "),a("code",[e._v("documentAdditionOrUpdate")]),e._v(" tasks for that same index in a batch.")]),e._v(" "),a("p",[e._v("The more similar consecutive tasks the user sends in a row, the more likely the batching mechanism can group these tasks.")]),e._v(" "),a("h5",{attrs:{id:"_3-1-1-1-schema"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-schema"}},[e._v("#")]),e._v(" 3.1.1.1. Schema")]),e._v(" "),a("p",[a("img",{attrs:{src:"https://user-images.githubusercontent.com/3692335/145787054-4cb07b5e-c80e-498a-8843-d0cc46329e9b.png",alt:"Auto-batching Process"}})]),e._v(" "),a("h5",{attrs:{id:"_3-1-1-2-batchuid-generation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-batchuid-generation"}},[e._v("#")]),e._v(" 3.1.1.2. "),a("code",[e._v("batchUid")]),e._v(" generation")]),e._v(" "),a("p",[e._v("All tasks are part of a batch identified by an internal "),a("code",[e._v("batchUid")]),e._v(" field. A task batch preserves the logical order of the tasks for a given index. The batch identifiers are unique and strictly increasing. The "),a("code",[e._v("batchUid")]),e._v(" field is internal; thus not visible on a "),a("code",[e._v("task")]),e._v(" resource.")]),e._v(" "),a("h4",{attrs:{id:"_3-1-2-impacts-on-task-api-resource"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-impacts-on-task-api-resource"}},[e._v("#")]),e._v(" 3.1.2. Impacts on "),a("code",[e._v("task")]),e._v(" API resource")]),e._v(" "),a("ul",[a("li",[e._v("The different tasks grouped in a batch are processed within the same transaction. But if a task fails within a batch, the whole batch does not fail, only the related task.")]),e._v(" "),a("li",[e._v("Tasks within the same batch share the same values for the "),a("code",[e._v("startedAt")]),e._v(", "),a("code",[e._v("finishedAt")]),e._v(", "),a("code",[e._v("duration")]),e._v(" fields, and the same "),a("code",[e._v("error")]),e._v(" object if an error occurs for a "),a("code",[e._v("task")]),e._v(" during the batch processing.")]),e._v(" "),a("li",[e._v("If a batch contains many "),a("code",[e._v("tasks")]),e._v(", the "),a("code",[e._v("task")]),e._v(" "),a("code",[e._v("details")]),e._v(" "),a("code",[e._v("indexedDocuments")]),e._v(" is identical in all "),a("code",[e._v("tasks")]),e._v(" belonging to the same processed "),a("code",[e._v("batch")]),e._v(".")])]),e._v(" "),a("h2",{attrs:{id:"_4-technical-aspects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-aspects"}},[e._v("#")]),e._v(" 4. Technical Aspects")]),e._v(" "),a("p",[e._v("N/A")]),e._v(" "),a("h2",{attrs:{id:"_5-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),a("ul",[a("li",[e._v("Extends it for all consecutive payload types.")]),e._v(" "),a("li",[e._v("Expose the "),a("code",[e._v("batchUid")]),e._v(" field and add a filter capability on it on the "),a("code",[e._v("/tasks")]),e._v(" endpoints.")]),e._v(" "),a("li",[e._v("Report the documents that could not be indexed to the user in a more precise manner.")]),e._v(" "),a("li",[e._v("Optimize some tasks sequence, for example if there is a document addition followed by an index deletion, we could skip the document addition.")])])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[31],{457:function(e,t,a){"use strict";a.r(t);var s=a(62),i=Object(s.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("ul",[a("li",[e._v("Title: Auto-Batching")])]),e._v(" "),a("h1",{attrs:{id:"auto-batching"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#auto-batching"}},[e._v("#")]),e._v(" Auto-Batching")]),e._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("Meilisearch can automatically group consecutive asynchronous "),a("code",[e._v("documentAddition")]),e._v(" or "),a("code",[e._v("documentPartial")]),e._v(" tasks for the same index via an automatic batching mechanism.")]),e._v(" "),a("p",[e._v("The user can disable this auto-batching behavior. See "),a("a",{attrs:{href:"#32-auto-batching-mechanisms-options"}},[e._v("3.2. Auto-batching mechanisms options")]),e._v(" section.")]),e._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[e._v("We have regularly collected user pain points pointing out the slow indexing over the last year. We explained several times to users to make batches containing a maximum of documents to be updated/added to compress the indexing time of specific data structures.")]),e._v(" "),a("p",[e._v("To make Meilisearch easier to use, we explored the idea of automatically creating these batches within Meilisearch before indexing users’ documents.")]),e._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("h3",{attrs:{id:"_3-1-explanations"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-explanations"}},[e._v("#")]),e._v(" 3.1. Explanations")]),e._v(" "),a("p",[e._v("A batch preserves the logical order of the tasks for a given index.")]),e._v(" "),a("p",[e._v("Only consecutive "),a("code",[e._v("documentAdditionOrUpdate")]),e._v(" tasks for the same index can be in the same batch. All "),a("code",[e._v("tasks")]),e._v(" concerning other operations will also be part of a batch having only one task.")]),e._v(" "),a("h4",{attrs:{id:"_3-1-1-grouping-tasks-to-a-single-batch"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-grouping-tasks-to-a-single-batch"}},[e._v("#")]),e._v(" 3.1.1. Grouping tasks to a single batch")]),e._v(" "),a("p",[e._v("The scheduling program that groups tasks within a single batch is triggered when an asynchronous "),a("code",[e._v("task")]),e._v(" currently processed reaches a terminal state as "),a("code",[e._v("succeeded")]),e._v(" or "),a("code",[e._v("failed")]),e._v(".")]),e._v(" "),a("p",[e._v("In other words, when a scheduled "),a("code",[e._v("documentAdditionOrUpdate")]),e._v(" task for a given index is picked from the task queue, the scheduler fetches and groups all "),a("code",[e._v("documentAdditionOrUpdate")]),e._v(" tasks for that same index in a batch.")]),e._v(" "),a("p",[e._v("The more similar consecutive tasks the user sends in a row, the more likely the batching mechanism can group these tasks.")]),e._v(" "),a("h5",{attrs:{id:"_3-1-1-1-schema"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-schema"}},[e._v("#")]),e._v(" 3.1.1.1. Schema")]),e._v(" "),a("p",[a("img",{attrs:{src:"https://user-images.githubusercontent.com/3692335/145787054-4cb07b5e-c80e-498a-8843-d0cc46329e9b.png",alt:"Auto-batching Process"}})]),e._v(" "),a("h5",{attrs:{id:"_3-1-1-2-batchuid-generation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-batchuid-generation"}},[e._v("#")]),e._v(" 3.1.1.2. "),a("code",[e._v("batchUid")]),e._v(" generation")]),e._v(" "),a("p",[e._v("All tasks are part of a batch identified by an internal "),a("code",[e._v("batchUid")]),e._v(" field. A task batch preserves the logical order of the tasks for a given index. The batch identifiers are unique and strictly increasing. The "),a("code",[e._v("batchUid")]),e._v(" field is internal; thus not visible on a "),a("code",[e._v("task")]),e._v(" resource.")]),e._v(" "),a("h4",{attrs:{id:"_3-1-2-impacts-on-task-api-resource"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-impacts-on-task-api-resource"}},[e._v("#")]),e._v(" 3.1.2. Impacts on "),a("code",[e._v("task")]),e._v(" API resource")]),e._v(" "),a("ul",[a("li",[e._v("The different tasks grouped in a batch are processed within the same transaction. But if a task fails within a batch, the whole batch does not fail, only the related task.")]),e._v(" "),a("li",[e._v("Tasks within the same batch share the same values for the "),a("code",[e._v("startedAt")]),e._v(", "),a("code",[e._v("finishedAt")]),e._v(", "),a("code",[e._v("duration")]),e._v(" fields, and the same "),a("code",[e._v("error")]),e._v(" object if an error occurs for a "),a("code",[e._v("task")]),e._v(" during the batch processing.")]),e._v(" "),a("li",[e._v("If a batch contains many "),a("code",[e._v("tasks")]),e._v(", the "),a("code",[e._v("task")]),e._v(" "),a("code",[e._v("details")]),e._v(" "),a("code",[e._v("indexedDocuments")]),e._v(" is identical in all "),a("code",[e._v("tasks")]),e._v(" belonging to the same processed "),a("code",[e._v("batch")]),e._v(".")])]),e._v(" "),a("h2",{attrs:{id:"_4-technical-aspects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-aspects"}},[e._v("#")]),e._v(" 4. Technical Aspects")]),e._v(" "),a("p",[e._v("N/A")]),e._v(" "),a("h2",{attrs:{id:"_5-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),a("ul",[a("li",[e._v("Extends it for all consecutive payload types.")]),e._v(" "),a("li",[e._v("Expose the "),a("code",[e._v("batchUid")]),e._v(" field and add a filter capability on it on the "),a("code",[e._v("/tasks")]),e._v(" endpoints.")]),e._v(" "),a("li",[e._v("Report the documents that could not be indexed to the user in a more precise manner.")]),e._v(" "),a("li",[e._v("Optimize some tasks sequence, for example if there is a document addition followed by an index deletion, we could skip the document addition.")])])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/32.88319e61.js b/docs/assets/js/32.3ea84f67.js similarity index 99% rename from docs/assets/js/32.88319e61.js rename to docs/assets/js/32.3ea84f67.js index 9c2e4305b..270d6b710 100644 --- a/docs/assets/js/32.88319e61.js +++ b/docs/assets/js/32.3ea84f67.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[32],{456:function(e,t,a){"use strict";a.r(t);var i=a(62),r=Object(i.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"dumps-api-and-cli"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#dumps-api-and-cli"}},[e._v("#")]),e._v(" Dumps API and CLI")]),e._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("A dump is a compressed file containing an export of a MeiliSearch instance. It contains all indexes, documents, settings, tasks, and API keys but in a raw unprocessed form. A dump isn't an exact copy of a database—it is closer to a blueprint that allows creating of an identical dataset.")]),e._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[e._v("The dumps exist to upgrade a MeiliSearch instance from a previous version to a more recent version. It can also be a helpful tool for loading a production state on a staging server to make changes and test them before propagating them to production.")]),e._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("h3",{attrs:{id:"_3-1-summary-key-points"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-summary-key-points"}},[e._v("#")]),e._v(" 3.1. Summary Key Points")]),e._v(" "),a("ul",[a("li",[e._v("A dump creation can be scheduled from the MeiliSearch API using the "),a("code",[e._v("POST - /dumps")]),e._v(" endpoint.")]),e._v(" "),a("li",[e._v("A dump creation status can be tracked using the "),a("code",[e._v("GET - /tasks/:task_uid")]),e._v(" endpoint.")]),e._v(" "),a("li",[e._v("MeiliSearch can only create one dump at a time.")]),e._v(" "),a("li",[e._v("By default, dumps are created in a folder named "),a("code",[e._v("dumps")]),e._v(", and can be found in the same directory as the MeiliSearch binary.")]),e._v(" "),a("li",[e._v("The "),a("code",[e._v("dumps")]),e._v(" directory can be customized using the "),a("code",[e._v("--dump-dir")]),e._v(" configuration option. If the dump directory does not already exist when the dump creation process is called, MeiliSearch will create it.")]),e._v(" "),a("li",[e._v("A "),a("code",[e._v(".dump")]),e._v(" file can be imported using the "),a("code",[e._v("--import-dump")]),e._v(" command-line flag.")]),e._v(" "),a("li",[e._v("The MeiliSearch server starts when the dump is fully imported and indexed.")]),e._v(" "),a("li",[e._v("By default, importing a dump when a database already exists (a non-empty data.ms folder in the same directory as the MeiliSearch binary) will stop the process and throw an error.")]),e._v(" "),a("li",[e._v("When using the command-line flag "),a("code",[e._v("--ignore-dump-if-db-exists=true")]),e._v(", MeiliSearch will use the existing database to start an instance instead of throwing an error. The dump will be ignored.")]),e._v(" "),a("li",[e._v("By default, trying to import a dump that does not exist, will stop the process and throw an error.")]),e._v(" "),a("li",[e._v("When using the command-line flag "),a("code",[e._v("--ignore-missing-dump")]),e._v(", MeiliSearch will continue its process and not throw an error.")]),e._v(" "),a("li",[e._v("When a dump is being imported, the http API is not available. Meilisearch can't receive read or write requests.")]),e._v(" "),a("li",[a("code",[e._v("dumpCreation")]),e._v(" task takes priority over enqueued "),a("code",[e._v("tasks")]),e._v(". This means that if a "),a("code",[e._v("dumpCreation")]),e._v(" task is created, it will be directly processed when the current processing task finishes even if other tasks have been enqueued before.")])]),e._v(" "),a("hr"),e._v(" "),a("h3",{attrs:{id:"_3-2-dumps-api-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-dumps-api-definition"}},[e._v("#")]),e._v(" 3.2. Dumps API Definition")]),e._v(" "),a("h4",{attrs:{id:"_3-2-1-post-dumps"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-post-dumps"}},[e._v("#")]),e._v(" 3.2.1. POST "),a("code",[e._v("/dumps")])]),e._v(" "),a("p",[e._v("Create a dump")]),e._v(" "),a("h5",{attrs:{id:"_3-2-1-1-body-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-body-payload"}},[e._v("#")]),e._v(" 3.2.1.1. Body Payload")]),e._v(" "),a("p",[e._v("N/A")]),e._v(" "),a("h5",{attrs:{id:"_3-2-1-2-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-2-response-definition"}},[e._v("#")]),e._v(" 3.2.1.2. Response Definition")]),e._v(" "),a("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),a("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),a("p",[e._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),a("code",[e._v("task")]),e._v(" Object for "),a("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),a("p",[e._v("The uid of the generated dump can be found in the task details.")]),e._v(" "),a("h5",{attrs:{id:"_3-2-1-3-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-3-errors"}},[e._v("#")]),e._v(" 3.2.1.3. Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 If Meilisearch is secured, accessing this route without the "),a("code",[e._v("Authorization")]),e._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 If Meilisearch is secured, accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),a("hr"),e._v(" "),a("h3",{attrs:{id:"_3-3-cli-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-cli-definition"}},[e._v("#")]),e._v(" 3.3. CLI Definition")]),e._v(" "),a("h4",{attrs:{id:"_3-3-1-dump-dir"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-dump-dir"}},[e._v("#")]),e._v(" 3.3.1. "),a("code",[e._v("--dump-dir")])]),e._v(" "),a("p",[e._v("By default, MeiliSearch creates dumps in a directory called "),a("code",[e._v("dumps")]),e._v(" at the root of your MeiliSearch.")]),e._v(" "),a("p",[e._v("The destination can be modified with the "),a("code",[e._v("--dump-dir")]),e._v(" flag. e.g. "),a("code",[e._v("--dump-dir myDumps")])]),e._v(" "),a("h4",{attrs:{id:"_3-3-2-import-dump"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-import-dump"}},[e._v("#")]),e._v(" 3.3.2. "),a("code",[e._v("--import-dump")])]),e._v(" "),a("p",[e._v("Using the CLI flag "),a("code",[e._v("--import-dump")]),e._v(", MeiliSearch will replace the data.ms with the dump data and start the server using the provided dump. e.g. "),a("code",[e._v("--import-dump dumps/20220117-144855452.dump")]),e._v(".")]),e._v(" "),a("p",[e._v("If the "),a("code",[e._v("--import-dump")]),e._v(" flag is specified when a database exists, an error occurs in the CLI.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('Error: database already exists at ":pathToDataMs/data.ms", try to delete it or rename it\n')])])]),a("h4",{attrs:{id:"_3-3-3-ignore-dump-if-db-exists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-ignore-dump-if-db-exists"}},[e._v("#")]),e._v(" 3.3.3. "),a("code",[e._v("--ignore-dump-if-db-exists")])]),e._v(" "),a("p",[e._v("To avoid MeiliSearch to throw an error when finding that a database already exists, the following flag: "),a("code",[e._v("--ignore-dump-if-db-exists")]),e._v(" can be used. When using this flag, MeiliSearch will use the existing database to start an instance instead of throwing an error. The dump will be ignored.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-4-ignore-missing-dump"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-ignore-missing-dump"}},[e._v("#")]),e._v(" 3.3.4. "),a("code",[e._v("--ignore-missing-dump")])]),e._v(" "),a("p",[e._v("To avoid MeiliSearch to throw an error when there is no dump at the given path, the following flag: "),a("code",[e._v("--ignore-missing-dump")]),e._v(" can be used. MeiliSearch will then continue its process and not import any dump.")]),e._v(" "),a("p",[e._v("If the "),a("code",[e._v("--ignore-missing-dump")]),e._v(" flag is not specified and the file cannot be found, an error occurs in the CLI.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('Error: dump doesn\'t exist at ":pathToDumps/:missingFile"\n')])])]),a("h4",{attrs:{id:"_3-3-5-other-dump-related-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-5-other-dump-related-errors"}},[e._v("#")]),e._v(" 3.3.5 Other dump related errors")]),e._v(" "),a("p",[e._v("When starting a new Meilisearch version, if Meilisearch tries to read an old data.ms and but cannot read it, the following message should appear:")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("Error: Your database version (`:old_version`) is incompatible with your current engine (`:new_version`). To migrate data between Meilisearch versions, follow our guide on https://docs.meilisearch.com/learn/advanced/updating.html\n")])])]),a("hr"),e._v(" "),a("h3",{attrs:{id:"_3-4-dump-version-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-dump-version-support"}},[e._v("#")]),e._v(" 3.4. Dump version support")]),e._v(" "),a("p",[e._v("To handle dump and Meilisearch version compatibility, it is necessary to also versionize the dumps feature.")]),e._v(" "),a("p",[e._v("The following table describes which version of the dump correspond to which version of Meilisearch")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Dump version")]),e._v(" "),a("th",[e._v("Meilisearch version")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("code",[e._v("v1")])]),e._v(" "),a("td",[a("code",[e._v("v0.20.0")]),e._v(" and below")])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("v2")])]),e._v(" "),a("td",[a("code",[e._v("v0.21.0")]),e._v(" and "),a("code",[e._v("v0.21.1")])])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("v3")])]),e._v(" "),a("td",[e._v("From "),a("code",[e._v("v0.22.0")]),e._v(" to "),a("code",[e._v("v0.24.0")]),e._v(" included")])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("v4")])]),e._v(" "),a("td",[e._v("From "),a("code",[e._v("v0.25.0")]),e._v(" to "),a("code",[e._v("v0.27.2")]),e._v(" included")])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("v5")])]),e._v(" "),a("td",[e._v("From "),a("code",[e._v("v0.28.0")]),e._v(" to "),a("code",[e._v("v0.29.1")]),e._v(" included")])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("v6")])]),e._v(" "),a("td",[a("code",[e._v("v0.30.0")]),e._v(" and later")])])])]),e._v(" "),a("p",[e._v("All dumps created before and up to Meilisearch v1.0 can be imported into Meilisearch v1.X.Y.")]),e._v(" "),a("h2",{attrs:{id:"_4-technical-aspects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-aspects"}},[e._v("#")]),e._v(" 4. Technical Aspects")]),e._v(" "),a("h3",{attrs:{id:"_4-1-dump-creation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-dump-creation"}},[e._v("#")]),e._v(" 4.1. Dump Creation")]),e._v(" "),a("p",[e._v("When a dump is being created, the task queue can receive other future operations to perform.")]),e._v(" "),a("h3",{attrs:{id:"_4-2-importing-a-dump"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-importing-a-dump"}},[e._v("#")]),e._v(" 4.2. Importing a dump")]),e._v(" "),a("p",[e._v("When a dump is being imported, the http API is not available. Meilisearch can't receive read or write requests.")]),e._v(" "),a("h3",{attrs:{id:"_4-3-dump-creation-task-priority"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-3-dump-creation-task-priority"}},[e._v("#")]),e._v(" 4.3. Dump Creation Task Priority")]),e._v(" "),a("p",[e._v("Dump creation tasks have priority over other task types. If a "),a("code",[e._v("dumpCreation")]),e._v(" task is enqueued, it will be directly processed when the current processing task finishes even if other tasks have been enqueued before.")]),e._v(" "),a("h2",{attrs:{id:"_5-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),a("ul",[a("li",[e._v("Give information about the import of a dump within the tasks.")])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[32],{454:function(e,t,a){"use strict";a.r(t);var i=a(62),r=Object(i.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"dumps-api-and-cli"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#dumps-api-and-cli"}},[e._v("#")]),e._v(" Dumps API and CLI")]),e._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("A dump is a compressed file containing an export of a MeiliSearch instance. It contains all indexes, documents, settings, tasks, and API keys but in a raw unprocessed form. A dump isn't an exact copy of a database—it is closer to a blueprint that allows creating of an identical dataset.")]),e._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[e._v("The dumps exist to upgrade a MeiliSearch instance from a previous version to a more recent version. It can also be a helpful tool for loading a production state on a staging server to make changes and test them before propagating them to production.")]),e._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("h3",{attrs:{id:"_3-1-summary-key-points"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-summary-key-points"}},[e._v("#")]),e._v(" 3.1. Summary Key Points")]),e._v(" "),a("ul",[a("li",[e._v("A dump creation can be scheduled from the MeiliSearch API using the "),a("code",[e._v("POST - /dumps")]),e._v(" endpoint.")]),e._v(" "),a("li",[e._v("A dump creation status can be tracked using the "),a("code",[e._v("GET - /tasks/:task_uid")]),e._v(" endpoint.")]),e._v(" "),a("li",[e._v("MeiliSearch can only create one dump at a time.")]),e._v(" "),a("li",[e._v("By default, dumps are created in a folder named "),a("code",[e._v("dumps")]),e._v(", and can be found in the same directory as the MeiliSearch binary.")]),e._v(" "),a("li",[e._v("The "),a("code",[e._v("dumps")]),e._v(" directory can be customized using the "),a("code",[e._v("--dump-dir")]),e._v(" configuration option. If the dump directory does not already exist when the dump creation process is called, MeiliSearch will create it.")]),e._v(" "),a("li",[e._v("A "),a("code",[e._v(".dump")]),e._v(" file can be imported using the "),a("code",[e._v("--import-dump")]),e._v(" command-line flag.")]),e._v(" "),a("li",[e._v("The MeiliSearch server starts when the dump is fully imported and indexed.")]),e._v(" "),a("li",[e._v("By default, importing a dump when a database already exists (a non-empty data.ms folder in the same directory as the MeiliSearch binary) will stop the process and throw an error.")]),e._v(" "),a("li",[e._v("When using the command-line flag "),a("code",[e._v("--ignore-dump-if-db-exists=true")]),e._v(", MeiliSearch will use the existing database to start an instance instead of throwing an error. The dump will be ignored.")]),e._v(" "),a("li",[e._v("By default, trying to import a dump that does not exist, will stop the process and throw an error.")]),e._v(" "),a("li",[e._v("When using the command-line flag "),a("code",[e._v("--ignore-missing-dump")]),e._v(", MeiliSearch will continue its process and not throw an error.")]),e._v(" "),a("li",[e._v("When a dump is being imported, the http API is not available. Meilisearch can't receive read or write requests.")]),e._v(" "),a("li",[a("code",[e._v("dumpCreation")]),e._v(" task takes priority over enqueued "),a("code",[e._v("tasks")]),e._v(". This means that if a "),a("code",[e._v("dumpCreation")]),e._v(" task is created, it will be directly processed when the current processing task finishes even if other tasks have been enqueued before.")])]),e._v(" "),a("hr"),e._v(" "),a("h3",{attrs:{id:"_3-2-dumps-api-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-dumps-api-definition"}},[e._v("#")]),e._v(" 3.2. Dumps API Definition")]),e._v(" "),a("h4",{attrs:{id:"_3-2-1-post-dumps"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-post-dumps"}},[e._v("#")]),e._v(" 3.2.1. POST "),a("code",[e._v("/dumps")])]),e._v(" "),a("p",[e._v("Create a dump")]),e._v(" "),a("h5",{attrs:{id:"_3-2-1-1-body-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-body-payload"}},[e._v("#")]),e._v(" 3.2.1.1. Body Payload")]),e._v(" "),a("p",[e._v("N/A")]),e._v(" "),a("h5",{attrs:{id:"_3-2-1-2-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-2-response-definition"}},[e._v("#")]),e._v(" 3.2.1.2. Response Definition")]),e._v(" "),a("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),a("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),a("p",[e._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),a("code",[e._v("task")]),e._v(" Object for "),a("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),a("p",[e._v("The uid of the generated dump can be found in the task details.")]),e._v(" "),a("h5",{attrs:{id:"_3-2-1-3-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-3-errors"}},[e._v("#")]),e._v(" 3.2.1.3. Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 If Meilisearch is secured, accessing this route without the "),a("code",[e._v("Authorization")]),e._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 If Meilisearch is secured, accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),a("hr"),e._v(" "),a("h3",{attrs:{id:"_3-3-cli-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-cli-definition"}},[e._v("#")]),e._v(" 3.3. CLI Definition")]),e._v(" "),a("h4",{attrs:{id:"_3-3-1-dump-dir"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-dump-dir"}},[e._v("#")]),e._v(" 3.3.1. "),a("code",[e._v("--dump-dir")])]),e._v(" "),a("p",[e._v("By default, MeiliSearch creates dumps in a directory called "),a("code",[e._v("dumps")]),e._v(" at the root of your MeiliSearch.")]),e._v(" "),a("p",[e._v("The destination can be modified with the "),a("code",[e._v("--dump-dir")]),e._v(" flag. e.g. "),a("code",[e._v("--dump-dir myDumps")])]),e._v(" "),a("h4",{attrs:{id:"_3-3-2-import-dump"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-import-dump"}},[e._v("#")]),e._v(" 3.3.2. "),a("code",[e._v("--import-dump")])]),e._v(" "),a("p",[e._v("Using the CLI flag "),a("code",[e._v("--import-dump")]),e._v(", MeiliSearch will replace the data.ms with the dump data and start the server using the provided dump. e.g. "),a("code",[e._v("--import-dump dumps/20220117-144855452.dump")]),e._v(".")]),e._v(" "),a("p",[e._v("If the "),a("code",[e._v("--import-dump")]),e._v(" flag is specified when a database exists, an error occurs in the CLI.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('Error: database already exists at ":pathToDataMs/data.ms", try to delete it or rename it\n')])])]),a("h4",{attrs:{id:"_3-3-3-ignore-dump-if-db-exists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-ignore-dump-if-db-exists"}},[e._v("#")]),e._v(" 3.3.3. "),a("code",[e._v("--ignore-dump-if-db-exists")])]),e._v(" "),a("p",[e._v("To avoid MeiliSearch to throw an error when finding that a database already exists, the following flag: "),a("code",[e._v("--ignore-dump-if-db-exists")]),e._v(" can be used. When using this flag, MeiliSearch will use the existing database to start an instance instead of throwing an error. The dump will be ignored.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-4-ignore-missing-dump"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-ignore-missing-dump"}},[e._v("#")]),e._v(" 3.3.4. "),a("code",[e._v("--ignore-missing-dump")])]),e._v(" "),a("p",[e._v("To avoid MeiliSearch to throw an error when there is no dump at the given path, the following flag: "),a("code",[e._v("--ignore-missing-dump")]),e._v(" can be used. MeiliSearch will then continue its process and not import any dump.")]),e._v(" "),a("p",[e._v("If the "),a("code",[e._v("--ignore-missing-dump")]),e._v(" flag is not specified and the file cannot be found, an error occurs in the CLI.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('Error: dump doesn\'t exist at ":pathToDumps/:missingFile"\n')])])]),a("h4",{attrs:{id:"_3-3-5-other-dump-related-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-5-other-dump-related-errors"}},[e._v("#")]),e._v(" 3.3.5 Other dump related errors")]),e._v(" "),a("p",[e._v("When starting a new Meilisearch version, if Meilisearch tries to read an old data.ms and but cannot read it, the following message should appear:")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("Error: Your database version (`:old_version`) is incompatible with your current engine (`:new_version`). To migrate data between Meilisearch versions, follow our guide on https://docs.meilisearch.com/learn/advanced/updating.html\n")])])]),a("hr"),e._v(" "),a("h3",{attrs:{id:"_3-4-dump-version-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-dump-version-support"}},[e._v("#")]),e._v(" 3.4. Dump version support")]),e._v(" "),a("p",[e._v("To handle dump and Meilisearch version compatibility, it is necessary to also versionize the dumps feature.")]),e._v(" "),a("p",[e._v("The following table describes which version of the dump correspond to which version of Meilisearch")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Dump version")]),e._v(" "),a("th",[e._v("Meilisearch version")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("code",[e._v("v1")])]),e._v(" "),a("td",[a("code",[e._v("v0.20.0")]),e._v(" and below")])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("v2")])]),e._v(" "),a("td",[a("code",[e._v("v0.21.0")]),e._v(" and "),a("code",[e._v("v0.21.1")])])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("v3")])]),e._v(" "),a("td",[e._v("From "),a("code",[e._v("v0.22.0")]),e._v(" to "),a("code",[e._v("v0.24.0")]),e._v(" included")])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("v4")])]),e._v(" "),a("td",[e._v("From "),a("code",[e._v("v0.25.0")]),e._v(" to "),a("code",[e._v("v0.27.2")]),e._v(" included")])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("v5")])]),e._v(" "),a("td",[e._v("From "),a("code",[e._v("v0.28.0")]),e._v(" to "),a("code",[e._v("v0.29.1")]),e._v(" included")])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("v6")])]),e._v(" "),a("td",[a("code",[e._v("v0.30.0")]),e._v(" and later")])])])]),e._v(" "),a("p",[e._v("All dumps created before and up to Meilisearch v1.0 can be imported into Meilisearch v1.X.Y.")]),e._v(" "),a("h2",{attrs:{id:"_4-technical-aspects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-aspects"}},[e._v("#")]),e._v(" 4. Technical Aspects")]),e._v(" "),a("h3",{attrs:{id:"_4-1-dump-creation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-dump-creation"}},[e._v("#")]),e._v(" 4.1. Dump Creation")]),e._v(" "),a("p",[e._v("When a dump is being created, the task queue can receive other future operations to perform.")]),e._v(" "),a("h3",{attrs:{id:"_4-2-importing-a-dump"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-importing-a-dump"}},[e._v("#")]),e._v(" 4.2. Importing a dump")]),e._v(" "),a("p",[e._v("When a dump is being imported, the http API is not available. Meilisearch can't receive read or write requests.")]),e._v(" "),a("h3",{attrs:{id:"_4-3-dump-creation-task-priority"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-3-dump-creation-task-priority"}},[e._v("#")]),e._v(" 4.3. Dump Creation Task Priority")]),e._v(" "),a("p",[e._v("Dump creation tasks have priority over other task types. If a "),a("code",[e._v("dumpCreation")]),e._v(" task is enqueued, it will be directly processed when the current processing task finishes even if other tasks have been enqueued before.")]),e._v(" "),a("h2",{attrs:{id:"_5-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),a("ul",[a("li",[e._v("Give information about the import of a dump within the tasks.")])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/33.91d80bc8.js b/docs/assets/js/33.63b5ee32.js similarity index 99% rename from docs/assets/js/33.91d80bc8.js rename to docs/assets/js/33.63b5ee32.js index d75a6617a..3314d88f6 100644 --- a/docs/assets/js/33.91d80bc8.js +++ b/docs/assets/js/33.63b5ee32.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[33],{457:function(e,t,a){"use strict";a.r(t);var s=a(62),r=Object(s.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"typo-tolerance-settings-api"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#typo-tolerance-settings-api"}},[e._v("#")]),e._v(" Typo Tolerance Settings API")]),e._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("This specification describes the customizable options for the typo tolerance settings.")]),e._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[e._v("Tolerance to typos is critical when building an enjoyable search experience. Meilisearch ranks typo-free matched documents above others based on the default settings that we believe are best for most users.")]),e._v(" "),a("p",[e._v("Meilisearch can adapt to different use-cases by providing customization options for the typo tolerance feature.")]),e._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("h3",{attrs:{id:"_3-1-typotolerance-api-resource-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-typotolerance-api-resource-definition"}},[e._v("#")]),e._v(" 3.1. "),a("code",[e._v("typoTolerance")]),e._v(" API resource definition")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Field")]),e._v(" "),a("th",[e._v("Type")]),e._v(" "),a("th",[e._v("Required")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("a",{attrs:{href:"#311-enabled"}},[e._v("enabled")])]),e._v(" "),a("td",[e._v("Boolean")]),e._v(" "),a("td",[e._v("False")])]),e._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#312-disableOnattributes"}},[e._v("disableOnAttributes")])]),e._v(" "),a("td",[e._v("Array of String")]),e._v(" "),a("td",[e._v("False")])]),e._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#313-disableOnwords"}},[e._v("disableOnWords")])]),e._v(" "),a("td",[e._v("Array of String")]),e._v(" "),a("td",[e._v("False")])]),e._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#314-minwordsizefortypos"}},[e._v("minWordSizeForTypos")])]),e._v(" "),a("td",[e._v("Object")]),e._v(" "),a("td",[e._v("False")])])])]),e._v(" "),a("h4",{attrs:{id:"_3-1-1-enabled"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-enabled"}},[e._v("#")]),e._v(" 3.1.1. "),a("code",[e._v("enabled")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Boolean")]),e._v(" "),a("li",[e._v("Required: False")]),e._v(" "),a("li",[e._v("Default: "),a("code",[e._v("true")])])]),e._v(" "),a("p",[e._v("Whether the typo tolerance feature is enabled.")]),e._v(" "),a("h5",{attrs:{id:"_3-1-1-1-impacts-on-the-typo-ranking-rule"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-impacts-on-the-typo-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.1. Impacts on the "),a("code",[e._v("typo")]),e._v(" ranking rule")]),e._v(" "),a("p",[e._v("The presence of "),a("code",[e._v("typo")]),e._v(" in the ranking rules setting does not influence the activation/deactivation of the typo tolerance feature.")]),e._v(" "),a("p",[e._v("If the "),a("code",[e._v("rankingRules")]),e._v(" parameter of the index settings does not contain the "),a("code",[e._v("typo")]),e._v(" rule, the results are not sorted according to the number of typos found.")]),e._v(" "),a("p",[e._v("The typo tolerance feature is still used to match documents.")]),e._v(" "),a("h3",{attrs:{id:"_3-1-2-disableonattributes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-disableonattributes"}},[e._v("#")]),e._v(" 3.1.2. "),a("code",[e._v("disableOnAttributes")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Array of String")]),e._v(" "),a("li",[e._v("Required: False")]),e._v(" "),a("li",[e._v("Default: "),a("code",[e._v("[]")])])]),e._v(" "),a("p",[a("code",[e._v("disableOnAttributes")]),e._v(" disable the typo tolerance feature on the specified attributes list.")]),e._v(" "),a("p",[e._v("Any attributes defined in "),a("code",[e._v("disableOnAttributes")]),e._v(" won't have their values matched by the typo tolerance.")]),e._v(" "),a("h4",{attrs:{id:"_3-1-2-1-example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-example"}},[e._v("#")]),e._v(" 3.1.2.1. Example")]),e._v(" "),a("p",[e._v("Given "),a("code",[e._v('["title"]')]),e._v(" as "),a("code",[e._v("disableOnAttributes")]),e._v(" and the following document")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Hey World"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("The engine won't try to match query term with typos with values of the "),a("code",[e._v("title")]),e._v(" attribute at search time to match documents.")]),e._v(" "),a("ul",[a("li",[e._v("Typing "),a("code",[e._v("Warld")]),e._v(" won't bring the document as a candidate for the search results.")])]),e._v(" "),a("h3",{attrs:{id:"_3-1-3-disableonwords"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-disableonwords"}},[e._v("#")]),e._v(" 3.1.3. "),a("code",[e._v("disableOnWords")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Array of String")]),e._v(" "),a("li",[e._v("Required: False")]),e._v(" "),a("li",[e._v("Default: "),a("code",[e._v("[]")])])]),e._v(" "),a("p",[a("code",[e._v("disableOnWords")]),e._v(" disable the typo tolerance feature on a list of search query terms.")]),e._v(" "),a("blockquote",[a("p",[e._v("This field is case insensitive since the document attributes values are lowercased and de-unicoded internally.")])]),e._v(" "),a("h4",{attrs:{id:"_3-1-3-1-example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-1-example"}},[e._v("#")]),e._v(" 3.1.3.1. Example")]),e._v(" "),a("p",[e._v("If "),a("code",[e._v("Javascript")]),e._v(" is specified in "),a("code",[e._v("disableOnWords")]),e._v(", the engine won't apply the typo tolerance on the query term "),a("code",[e._v("Javascript")]),e._v(" or "),a("code",[e._v("javascript")]),e._v(" if typed at search time to match documents.")]),e._v(" "),a("h3",{attrs:{id:"_3-1-4-minwordsizefortypos"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-minwordsizefortypos"}},[e._v("#")]),e._v(" 3.1.4. "),a("code",[e._v("minWordSizeForTypos")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Object")]),e._v(" "),a("li",[e._v("Required: False")])]),e._v(" "),a("h4",{attrs:{id:"_3-1-4-1-minwordsizefortypos-object-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-1-minwordsizefortypos-object-definition"}},[e._v("#")]),e._v(" 3.1.4.1. "),a("code",[e._v("minWordSizeForTypos")]),e._v(" Object Definition")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Field")]),e._v(" "),a("th",[e._v("Type")]),e._v(" "),a("th",[e._v("Required")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("a",{attrs:{href:"#3142-onetypo"}},[e._v("oneTypo")])]),e._v(" "),a("td",[e._v("Integer")]),e._v(" "),a("td",[e._v("False")])]),e._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3143-twotypos"}},[e._v("twoTypos")])]),e._v(" "),a("td",[e._v("Integer")]),e._v(" "),a("td",[e._v("False")])])])]),e._v(" "),a("h4",{attrs:{id:"_3-1-4-2-onetypo"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-2-onetypo"}},[e._v("#")]),e._v(" 3.1.4.2. "),a("code",[e._v("oneTypo")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Integer")]),e._v(" "),a("li",[e._v("Required: False")]),e._v(" "),a("li",[e._v("Default: "),a("code",[e._v("5")])])]),e._v(" "),a("p",[a("code",[e._v("oneTypo")]),e._v(" customize the minimum size for a word to tolerate 1 typo.")]),e._v(" "),a("blockquote",[a("p",[e._v("Given the default value "),a("code",[e._v("5")]),e._v(", the search engine starts to apply typo tolerance on a query term if its length is at least equal to 5 characters.")])]),e._v(" "),a("blockquote",[a("p",[e._v("See "),a("a",{attrs:{href:"#21-typos-calculation"}},[e._v("2.1. Typos calculation section")])])]),e._v(" "),a("h5",{attrs:{id:"_3-1-4-2-1-example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-2-1-example"}},[e._v("#")]),e._v(" 3.1.4.2.1 Example")]),e._v(" "),a("p",[e._v("Given "),a("code",[e._v("5")]),e._v(" as "),a("code",[e._v("oneTypo")]),e._v(" and the following document")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Hey World"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("ul",[a("li",[e._v("Typing "),a("code",[e._v("World")]),e._v(" with 1 typo, e.g. "),a("code",[e._v("Warld")]),e._v(" will match "),a("code",[e._v("World")]),e._v(". It accepts 1 typo since "),a("code",[e._v("World")]),e._v(" size is made of "),a("code",[e._v("5")]),e._v(" chars.")]),e._v(" "),a("li",[e._v("Typing "),a("code",[e._v("Hey")]),e._v(" with 1 typo, e.g. "),a("code",[e._v("Hoy")]),e._v(" won't match "),a("code",[e._v("Hey")]),e._v(". It accepts 0 typo since "),a("code",[e._v("Hey")]),e._v(" size is made of "),a("code",[e._v("3")]),e._v(" chars.")])]),e._v(" "),a("h4",{attrs:{id:"_3-1-4-3-twotypos"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-3-twotypos"}},[e._v("#")]),e._v(" 3.1.4.3. "),a("code",[e._v("twoTypos")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Integer")]),e._v(" "),a("li",[e._v("Required: False")]),e._v(" "),a("li",[e._v("Default: "),a("code",[e._v("9")])])]),e._v(" "),a("p",[a("code",[e._v("twoTypos")]),e._v(" customize the minimum size for a word to tolerate 2 typos.")]),e._v(" "),a("blockquote",[a("p",[e._v("Given the default value "),a("code",[e._v("9")]),e._v(", the search engine handles up to 2 typos on a query term if its length is at least equal to 9 characters.")])]),e._v(" "),a("blockquote",[a("p",[e._v("See "),a("a",{attrs:{href:"#21-typos-calculation"}},[e._v("2.1. Typos calculation section")])])]),e._v(" "),a("h5",{attrs:{id:"_3-1-4-3-1-example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-3-1-example"}},[e._v("#")]),e._v(" 3.1.4.3.1. Example")]),e._v(" "),a("p",[e._v("Given "),a("code",[e._v("3")]),e._v(" for "),a("code",[e._v("oneTypo")]),e._v(" and "),a("code",[e._v("5")]),e._v(" as "),a("code",[e._v("twoTypos")]),e._v(" and the following document")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Hey World"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("ul",[a("li",[e._v("Typing "),a("code",[e._v("World")]),e._v(" with 2 typos, e.g. "),a("code",[e._v("Warrld")]),e._v(" will match "),a("code",[e._v("World")]),e._v(". It accepts up to 2 typos since "),a("code",[e._v("World")]),e._v(" size is made of "),a("code",[e._v("5")]),e._v(" chars.")]),e._v(" "),a("li",[e._v("Typing "),a("code",[e._v("Hey")]),e._v(" with 1 typo, e.g. "),a("code",[e._v("Hoy")]),e._v(" will match "),a("code",[e._v("Hey")]),e._v(". It accepts only 1 typo since "),a("code",[e._v("Hey")]),e._v(" size is made of "),a("code",[e._v("3")]),e._v(" chars.")])]),e._v(" "),a("h2",{attrs:{id:"_3-2-api-endpoints-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2. API Endpoints Definition")]),e._v(" "),a("h3",{attrs:{id:"_3-2-1-global-settings-api-endpoints-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-global-settings-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2.1. Global Settings API Endpoints Definition")]),e._v(" "),a("p",[a("code",[e._v("typoTolerance")]),e._v(" is a sub-resource of "),a("code",[e._v("/indexes/:index_uid/settings")]),e._v(".")]),e._v(" "),a("p",[e._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html"}},[e._v("Settings API")]),e._v(".")],1),e._v(" "),a("h3",{attrs:{id:"_3-2-2-indexes-index-uid-settings-typo-tolerance"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-indexes-index-uid-settings-typo-tolerance"}},[e._v("#")]),e._v(" 3.2.2. "),a("code",[e._v("indexes/:index_uid/settings/typo-tolerance")])]),e._v(" "),a("p",[e._v("Manage the typo tolerance configuration for an index.")]),e._v(" "),a("h4",{attrs:{id:"_3-2-2-1-get-indexes-index-uid-settings-typo-tolerance"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-get-indexes-index-uid-settings-typo-tolerance"}},[e._v("#")]),e._v(" 3.2.2.1. "),a("code",[e._v("GET")]),e._v(" - "),a("code",[e._v("indexes/:index_uid/settings/typo-tolerance")])]),e._v(" "),a("p",[e._v("Allow fetching the current definition of the typo tolerance feature for an index.")]),e._v(" "),a("p",[a("code",[e._v("200")]),e._v(" - Response body")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"enabled"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[e._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"disableOnAttributes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"disableOnWords"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"minWordSizeForTypos"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"oneTypo"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("5")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"twoTypos"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("9")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("All properties must be returned when the resource is retrieved.")]),e._v(" "),a("h5",{attrs:{id:"_3-2-2-1-2-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-2-errors"}},[e._v("#")]),e._v(" 3.2.2.1.2. Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Sending an invalid index uid format for the "),a("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 If the index does not exist, the API returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),a("h4",{attrs:{id:"_3-2-2-2-patch-indexes-index-uid-settings-typo-tolerance"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-patch-indexes-index-uid-settings-typo-tolerance"}},[e._v("#")]),e._v(" 3.2.2.2. "),a("code",[e._v("PATCH")]),e._v(" - "),a("code",[e._v("indexes/:index_uid/settings/typo-tolerance")])]),e._v(" "),a("p",[e._v("Allow customizing partially the settings of the typo tolerance feature for an index.")]),e._v(" "),a("p",[e._v("Request payload")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"disableOnAttributes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"title"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"description"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"minWordSizeForTypos"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("4")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[a("code",[e._v("202 Accepted")]),e._v(" - Example Response")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"uid"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("42")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"indexUid"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"books"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"status"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"enqueued"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"settingsUpdate"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"enqueuedAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2022-03-01T18:39:29.228155Z"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("h5",{attrs:{id:"_3-2-2-2-1-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-1-response-definition"}},[e._v("#")]),e._v(" 3.2.2.2.1. Response Definition")]),e._v(" "),a("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),a("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),a("p",[e._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),a("code",[e._v("task")]),e._v(" Object for "),a("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),a("h5",{attrs:{id:"_3-2-2-2-2-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-2-errors"}},[e._v("#")]),e._v(" 3.2.2.2.2. Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Omitting Content-Type header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an empty Content-Type returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a different Content-Type than "),a("code",[e._v("application/json")]),e._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an empty payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid JSON payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid index uid format for the "),a("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a value different from "),a("code",[e._v("null")]),e._v(" or with a different type than "),a("code",[e._v("Boolean")]),e._v(" for the "),a("code",[e._v("enabled")]),e._v(" field returns an\n"),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_typo_tolerance"}},[e._v("invalid_settings_typo_tolerance")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a value different from "),a("code",[e._v("null")]),e._v(" or with a different type than "),a("code",[e._v("Array of String")]),e._v(" for the "),a("code",[e._v("disableOnAttributes")]),e._v("\nfield returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_typo_tolerance"}},[e._v("invalid_settings_typo_tolerance")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a value different from "),a("code",[e._v("null")]),e._v(" or with a different type than "),a("code",[e._v("Array of String")]),e._v(" for the "),a("code",[e._v("disableOnWords")]),e._v(" field\nreturns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_typo_tolerance"}},[e._v("invalid_settings_typo_tolerance")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a value different from "),a("code",[e._v("null")]),e._v(" or with a different type than "),a("code",[e._v("Integer")]),e._v(" for "),a("code",[e._v("minWordSizeForTypos")]),e._v(" object fields\nreturns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_typo_tolerance"}},[e._v("invalid_settings_typo_tolerance")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending invalid values for "),a("code",[e._v("oneTypo")]),e._v(" AND "),a("code",[e._v("twoTypos")]),e._v(" being specified for the "),a("code",[e._v("minWordSizeForTypos")]),e._v(" object fields returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_typo_tolerance"}},[e._v("invalid_settings_typo_tolerance")]),e._v(" error.")],1)]),e._v(" "),a("h6",{attrs:{id:"_3-2-2-2-2-1-async-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-2-1-async-errors"}},[e._v("#")]),e._v(" 3.2.2.2.2.1. Async Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 When Meilisearch is secured, if the API Key do not have the "),a("code",[e._v("indexes.create")]),e._v(" action defined, the API returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related asynchronous "),a("code",[e._v("task")]),e._v(" resource. See "),a("a",{attrs:{href:"#32221-response-definition"}},[e._v("3.2.2.2.1. Response Definition")]),e._v(".")],1)]),e._v(" "),a("blockquote",[a("p",[e._v("Otherwise, Meilisearch will create the index in a lazy way. See "),a("a",{attrs:{href:"#32223-lazy-index-creation"}},[e._v("3.2.2.2.3. Lazy Index Creation")]),e._v(".")])]),e._v(" "),a("ul",[a("li",[e._v("🔴 When sending invalid values with either "),a("code",[e._v("oneTypo")]),e._v(" OR "),a("code",[e._v("twoTypos")]),e._v(" being specified for the "),a("code",[e._v("minWordSizeForTypos")]),e._v(" object fields returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_typo_tolerance"}},[e._v("invalid_settings_typo_tolerance")]),e._v(" error.")],1)]),e._v(" "),a("h5",{attrs:{id:"_3-2-2-2-3-lazy-index-creation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-3-lazy-index-creation"}},[e._v("#")]),e._v(" 3.2.2.2.3. Lazy Index Creation")]),e._v(" "),a("p",[e._v("If the requested "),a("code",[e._v("index_uid")]),e._v(" does not exist, and the authorization layer allows it (See "),a("a",{attrs:{href:"#322221-async-errors"}},[e._v("3.2.2.2.2.1. Async Errors")]),e._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),a("a",{attrs:{href:"#32221-response-definition"}},[e._v("3.2.2.2.1. Response Definition")]),e._v(".")]),e._v(" "),a("h4",{attrs:{id:"_3-2-2-3-delete-indexes-index-uid-settings-typo-tolerance"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-3-delete-indexes-index-uid-settings-typo-tolerance"}},[e._v("#")]),e._v(" 3.2.2.3. "),a("code",[e._v("DELETE")]),e._v("- "),a("code",[e._v("indexes/:index_uid/settings/typo-tolerance")])]),e._v(" "),a("p",[e._v("Allow resetting the typo tolerance feature to the default for an index.")]),e._v(" "),a("h5",{attrs:{id:"_3-2-2-3-1-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-3-1-response-definition"}},[e._v("#")]),e._v(" 3.2.2.3.1. Response Definition")]),e._v(" "),a("p",[e._v("When the request is in a successful state, Meilisearch returns the HTTP code "),a("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),a("p",[e._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),a("code",[e._v("task")]),e._v(" Object for "),a("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),a("h5",{attrs:{id:"_3-2-2-3-2-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-3-2-errors"}},[e._v("#")]),e._v(" 3.2.2.3.2. Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Sending an invalid index uid format for the "),a("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1)]),e._v(" "),a("h6",{attrs:{id:"_3-2-2-3-2-1-asynchronous-index-not-found-error"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-3-2-1-asynchronous-index-not-found-error"}},[e._v("#")]),e._v(" 3.2.2.3.2.1. Asynchronous Index Not Found Error")]),e._v(" "),a("ul",[a("li",[e._v("🔴 If the requested "),a("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related async "),a("code",[e._v("task")]),e._v(" resource. See "),a("a",{attrs:{href:"#32231-response-definition"}},[e._v("3.2.2.3.1. Response Definition")]),e._v(".")],1)]),e._v(" "),a("h3",{attrs:{id:"_3-2-3-general-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-general-errors"}},[e._v("#")]),e._v(" 3.2.3. General Errors")]),e._v(" "),a("p",[e._v("These errors apply to all endpoints described here.")]),e._v(" "),a("h4",{attrs:{id:"_3-2-3-1-auth-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-1-auth-errors"}},[e._v("#")]),e._v(" 3.2.3.1. Auth Errors")]),e._v(" "),a("p",[e._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Accessing this route without the "),a("code",[e._v("Authorization")]),e._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),a("h2",{attrs:{id:"_2-technical-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-details"}},[e._v("#")]),e._v(" 2. Technical Details")]),e._v(" "),a("h3",{attrs:{id:"_2-1-typos-calculation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-typos-calculation"}},[e._v("#")]),e._v(" 2.1. Typos Calculation")]),e._v(" "),a("p",[e._v("The size of a query term triggers the typo tolerance feature.")]),e._v(" "),a("p",[e._v("By default, a query term made of "),a("code",[e._v("5")]),e._v(" characters can tolerate "),a("code",[e._v("1")]),e._v(" typo, while a query term made of "),a("code",[e._v("9")]),e._v(" characters can tolerate "),a("code",[e._v("2")]),e._v(" typos.")]),e._v(" "),a("p",[e._v("If a query term can be derived from a distance of one or two typos to be found in a document, it will be selected as a candidate. The number of typos found has an impact on the relevancy.")]),e._v(" "),a("h4",{attrs:{id:"_2-1-1-typo-on-the-first-character"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-1-typo-on-the-first-character"}},[e._v("#")]),e._v(" 2.1.1 Typo On The First Character")]),e._v(" "),a("p",[e._v("A query term having the first character considered as a typo will not count as "),a("code",[e._v("1")]),e._v(" typo but as "),a("code",[e._v("2")]),e._v(" typos.")]),e._v(" "),a("p",[e._v("It permits to drastically reduce the search space in this case, thus speed-up the search response.")]),e._v(" "),a("h4",{attrs:{id:"_2-1-2-clamping-typo-on-concatened-query-terms"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-2-clamping-typo-on-concatened-query-terms"}},[e._v("#")]),e._v(" 2.1.2. Clamping Typo On Concatened Query Terms")]),e._v(" "),a("p",[e._v("The concatenation of two query terms is equal to 1 typo.")]),e._v(" "),a("p",[e._v("e.g. If "),a("code",[e._v("Le tableau")]),e._v(" is typed, the concatened string "),a("code",[e._v("Letableau")]),e._v(" made of "),a("code",[e._v("9")]),e._v(" letters can only have "),a("code",[e._v("1")]),e._v(" typo instead of "),a("code",[e._v("2")]),e._v(" since "),a("code",[e._v("1")]),e._v(" typo is already counted by the concatenation.")]),e._v(" "),a("h3",{attrs:{id:"_2-2-typo-ranking-rule"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-2-typo-ranking-rule"}},[e._v("#")]),e._v(" 2.2. Typo Ranking Rule")]),e._v(" "),a("p",[e._v("The "),a("code",[e._v("typo")]),e._v(" ranking rule favors candidates with the least typos. That is, if a document is found with two typos, it will be ranked as less important than a document found with 1 typo. 0 typo is the most favorable case.")]),e._v(" "),a("h2",{attrs:{id:"_3-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[e._v("#")]),e._v(" 3. Future Possibilities")]),e._v(" "),a("ul",[a("li",[e._v("Expose "),a("code",[e._v("typoTolerance")]),e._v(" resource as a search parameter to override index settings.")]),e._v(" "),a("li",[e._v("Add the possibility to disable the typo tolerance feature on all numeric fields.")]),e._v(" "),a("li",[e._v("Add different modes of result matching for the typo feature. e.g. "),a("code",[e._v("default")]),e._v("/"),a("code",[e._v("min")]),e._v("/"),a("code",[e._v("strict")])]),e._v(" "),a("li",[e._v("Introduce synchronous "),a("code",[e._v("invalid_settings_typo_tolerance_{fieldName}")]),e._v(" error code granularity.")])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[33],{456:function(e,t,a){"use strict";a.r(t);var s=a(62),r=Object(s.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"typo-tolerance-settings-api"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#typo-tolerance-settings-api"}},[e._v("#")]),e._v(" Typo Tolerance Settings API")]),e._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("This specification describes the customizable options for the typo tolerance settings.")]),e._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[e._v("Tolerance to typos is critical when building an enjoyable search experience. Meilisearch ranks typo-free matched documents above others based on the default settings that we believe are best for most users.")]),e._v(" "),a("p",[e._v("Meilisearch can adapt to different use-cases by providing customization options for the typo tolerance feature.")]),e._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("h3",{attrs:{id:"_3-1-typotolerance-api-resource-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-typotolerance-api-resource-definition"}},[e._v("#")]),e._v(" 3.1. "),a("code",[e._v("typoTolerance")]),e._v(" API resource definition")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Field")]),e._v(" "),a("th",[e._v("Type")]),e._v(" "),a("th",[e._v("Required")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("a",{attrs:{href:"#311-enabled"}},[e._v("enabled")])]),e._v(" "),a("td",[e._v("Boolean")]),e._v(" "),a("td",[e._v("False")])]),e._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#312-disableOnattributes"}},[e._v("disableOnAttributes")])]),e._v(" "),a("td",[e._v("Array of String")]),e._v(" "),a("td",[e._v("False")])]),e._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#313-disableOnwords"}},[e._v("disableOnWords")])]),e._v(" "),a("td",[e._v("Array of String")]),e._v(" "),a("td",[e._v("False")])]),e._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#314-minwordsizefortypos"}},[e._v("minWordSizeForTypos")])]),e._v(" "),a("td",[e._v("Object")]),e._v(" "),a("td",[e._v("False")])])])]),e._v(" "),a("h4",{attrs:{id:"_3-1-1-enabled"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-enabled"}},[e._v("#")]),e._v(" 3.1.1. "),a("code",[e._v("enabled")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Boolean")]),e._v(" "),a("li",[e._v("Required: False")]),e._v(" "),a("li",[e._v("Default: "),a("code",[e._v("true")])])]),e._v(" "),a("p",[e._v("Whether the typo tolerance feature is enabled.")]),e._v(" "),a("h5",{attrs:{id:"_3-1-1-1-impacts-on-the-typo-ranking-rule"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-impacts-on-the-typo-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.1. Impacts on the "),a("code",[e._v("typo")]),e._v(" ranking rule")]),e._v(" "),a("p",[e._v("The presence of "),a("code",[e._v("typo")]),e._v(" in the ranking rules setting does not influence the activation/deactivation of the typo tolerance feature.")]),e._v(" "),a("p",[e._v("If the "),a("code",[e._v("rankingRules")]),e._v(" parameter of the index settings does not contain the "),a("code",[e._v("typo")]),e._v(" rule, the results are not sorted according to the number of typos found.")]),e._v(" "),a("p",[e._v("The typo tolerance feature is still used to match documents.")]),e._v(" "),a("h3",{attrs:{id:"_3-1-2-disableonattributes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-disableonattributes"}},[e._v("#")]),e._v(" 3.1.2. "),a("code",[e._v("disableOnAttributes")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Array of String")]),e._v(" "),a("li",[e._v("Required: False")]),e._v(" "),a("li",[e._v("Default: "),a("code",[e._v("[]")])])]),e._v(" "),a("p",[a("code",[e._v("disableOnAttributes")]),e._v(" disable the typo tolerance feature on the specified attributes list.")]),e._v(" "),a("p",[e._v("Any attributes defined in "),a("code",[e._v("disableOnAttributes")]),e._v(" won't have their values matched by the typo tolerance.")]),e._v(" "),a("h4",{attrs:{id:"_3-1-2-1-example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-example"}},[e._v("#")]),e._v(" 3.1.2.1. Example")]),e._v(" "),a("p",[e._v("Given "),a("code",[e._v('["title"]')]),e._v(" as "),a("code",[e._v("disableOnAttributes")]),e._v(" and the following document")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Hey World"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("The engine won't try to match query term with typos with values of the "),a("code",[e._v("title")]),e._v(" attribute at search time to match documents.")]),e._v(" "),a("ul",[a("li",[e._v("Typing "),a("code",[e._v("Warld")]),e._v(" won't bring the document as a candidate for the search results.")])]),e._v(" "),a("h3",{attrs:{id:"_3-1-3-disableonwords"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-disableonwords"}},[e._v("#")]),e._v(" 3.1.3. "),a("code",[e._v("disableOnWords")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Array of String")]),e._v(" "),a("li",[e._v("Required: False")]),e._v(" "),a("li",[e._v("Default: "),a("code",[e._v("[]")])])]),e._v(" "),a("p",[a("code",[e._v("disableOnWords")]),e._v(" disable the typo tolerance feature on a list of search query terms.")]),e._v(" "),a("blockquote",[a("p",[e._v("This field is case insensitive since the document attributes values are lowercased and de-unicoded internally.")])]),e._v(" "),a("h4",{attrs:{id:"_3-1-3-1-example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-1-example"}},[e._v("#")]),e._v(" 3.1.3.1. Example")]),e._v(" "),a("p",[e._v("If "),a("code",[e._v("Javascript")]),e._v(" is specified in "),a("code",[e._v("disableOnWords")]),e._v(", the engine won't apply the typo tolerance on the query term "),a("code",[e._v("Javascript")]),e._v(" or "),a("code",[e._v("javascript")]),e._v(" if typed at search time to match documents.")]),e._v(" "),a("h3",{attrs:{id:"_3-1-4-minwordsizefortypos"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-minwordsizefortypos"}},[e._v("#")]),e._v(" 3.1.4. "),a("code",[e._v("minWordSizeForTypos")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Object")]),e._v(" "),a("li",[e._v("Required: False")])]),e._v(" "),a("h4",{attrs:{id:"_3-1-4-1-minwordsizefortypos-object-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-1-minwordsizefortypos-object-definition"}},[e._v("#")]),e._v(" 3.1.4.1. "),a("code",[e._v("minWordSizeForTypos")]),e._v(" Object Definition")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Field")]),e._v(" "),a("th",[e._v("Type")]),e._v(" "),a("th",[e._v("Required")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("a",{attrs:{href:"#3142-onetypo"}},[e._v("oneTypo")])]),e._v(" "),a("td",[e._v("Integer")]),e._v(" "),a("td",[e._v("False")])]),e._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3143-twotypos"}},[e._v("twoTypos")])]),e._v(" "),a("td",[e._v("Integer")]),e._v(" "),a("td",[e._v("False")])])])]),e._v(" "),a("h4",{attrs:{id:"_3-1-4-2-onetypo"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-2-onetypo"}},[e._v("#")]),e._v(" 3.1.4.2. "),a("code",[e._v("oneTypo")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Integer")]),e._v(" "),a("li",[e._v("Required: False")]),e._v(" "),a("li",[e._v("Default: "),a("code",[e._v("5")])])]),e._v(" "),a("p",[a("code",[e._v("oneTypo")]),e._v(" customize the minimum size for a word to tolerate 1 typo.")]),e._v(" "),a("blockquote",[a("p",[e._v("Given the default value "),a("code",[e._v("5")]),e._v(", the search engine starts to apply typo tolerance on a query term if its length is at least equal to 5 characters.")])]),e._v(" "),a("blockquote",[a("p",[e._v("See "),a("a",{attrs:{href:"#21-typos-calculation"}},[e._v("2.1. Typos calculation section")])])]),e._v(" "),a("h5",{attrs:{id:"_3-1-4-2-1-example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-2-1-example"}},[e._v("#")]),e._v(" 3.1.4.2.1 Example")]),e._v(" "),a("p",[e._v("Given "),a("code",[e._v("5")]),e._v(" as "),a("code",[e._v("oneTypo")]),e._v(" and the following document")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Hey World"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("ul",[a("li",[e._v("Typing "),a("code",[e._v("World")]),e._v(" with 1 typo, e.g. "),a("code",[e._v("Warld")]),e._v(" will match "),a("code",[e._v("World")]),e._v(". It accepts 1 typo since "),a("code",[e._v("World")]),e._v(" size is made of "),a("code",[e._v("5")]),e._v(" chars.")]),e._v(" "),a("li",[e._v("Typing "),a("code",[e._v("Hey")]),e._v(" with 1 typo, e.g. "),a("code",[e._v("Hoy")]),e._v(" won't match "),a("code",[e._v("Hey")]),e._v(". It accepts 0 typo since "),a("code",[e._v("Hey")]),e._v(" size is made of "),a("code",[e._v("3")]),e._v(" chars.")])]),e._v(" "),a("h4",{attrs:{id:"_3-1-4-3-twotypos"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-3-twotypos"}},[e._v("#")]),e._v(" 3.1.4.3. "),a("code",[e._v("twoTypos")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Integer")]),e._v(" "),a("li",[e._v("Required: False")]),e._v(" "),a("li",[e._v("Default: "),a("code",[e._v("9")])])]),e._v(" "),a("p",[a("code",[e._v("twoTypos")]),e._v(" customize the minimum size for a word to tolerate 2 typos.")]),e._v(" "),a("blockquote",[a("p",[e._v("Given the default value "),a("code",[e._v("9")]),e._v(", the search engine handles up to 2 typos on a query term if its length is at least equal to 9 characters.")])]),e._v(" "),a("blockquote",[a("p",[e._v("See "),a("a",{attrs:{href:"#21-typos-calculation"}},[e._v("2.1. Typos calculation section")])])]),e._v(" "),a("h5",{attrs:{id:"_3-1-4-3-1-example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-3-1-example"}},[e._v("#")]),e._v(" 3.1.4.3.1. Example")]),e._v(" "),a("p",[e._v("Given "),a("code",[e._v("3")]),e._v(" for "),a("code",[e._v("oneTypo")]),e._v(" and "),a("code",[e._v("5")]),e._v(" as "),a("code",[e._v("twoTypos")]),e._v(" and the following document")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Hey World"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("ul",[a("li",[e._v("Typing "),a("code",[e._v("World")]),e._v(" with 2 typos, e.g. "),a("code",[e._v("Warrld")]),e._v(" will match "),a("code",[e._v("World")]),e._v(". It accepts up to 2 typos since "),a("code",[e._v("World")]),e._v(" size is made of "),a("code",[e._v("5")]),e._v(" chars.")]),e._v(" "),a("li",[e._v("Typing "),a("code",[e._v("Hey")]),e._v(" with 1 typo, e.g. "),a("code",[e._v("Hoy")]),e._v(" will match "),a("code",[e._v("Hey")]),e._v(". It accepts only 1 typo since "),a("code",[e._v("Hey")]),e._v(" size is made of "),a("code",[e._v("3")]),e._v(" chars.")])]),e._v(" "),a("h2",{attrs:{id:"_3-2-api-endpoints-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2. API Endpoints Definition")]),e._v(" "),a("h3",{attrs:{id:"_3-2-1-global-settings-api-endpoints-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-global-settings-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2.1. Global Settings API Endpoints Definition")]),e._v(" "),a("p",[a("code",[e._v("typoTolerance")]),e._v(" is a sub-resource of "),a("code",[e._v("/indexes/:index_uid/settings")]),e._v(".")]),e._v(" "),a("p",[e._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html"}},[e._v("Settings API")]),e._v(".")],1),e._v(" "),a("h3",{attrs:{id:"_3-2-2-indexes-index-uid-settings-typo-tolerance"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-indexes-index-uid-settings-typo-tolerance"}},[e._v("#")]),e._v(" 3.2.2. "),a("code",[e._v("indexes/:index_uid/settings/typo-tolerance")])]),e._v(" "),a("p",[e._v("Manage the typo tolerance configuration for an index.")]),e._v(" "),a("h4",{attrs:{id:"_3-2-2-1-get-indexes-index-uid-settings-typo-tolerance"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-get-indexes-index-uid-settings-typo-tolerance"}},[e._v("#")]),e._v(" 3.2.2.1. "),a("code",[e._v("GET")]),e._v(" - "),a("code",[e._v("indexes/:index_uid/settings/typo-tolerance")])]),e._v(" "),a("p",[e._v("Allow fetching the current definition of the typo tolerance feature for an index.")]),e._v(" "),a("p",[a("code",[e._v("200")]),e._v(" - Response body")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"enabled"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[e._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"disableOnAttributes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"disableOnWords"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"minWordSizeForTypos"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"oneTypo"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("5")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"twoTypos"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("9")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("All properties must be returned when the resource is retrieved.")]),e._v(" "),a("h5",{attrs:{id:"_3-2-2-1-2-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-2-errors"}},[e._v("#")]),e._v(" 3.2.2.1.2. Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Sending an invalid index uid format for the "),a("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 If the index does not exist, the API returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),a("h4",{attrs:{id:"_3-2-2-2-patch-indexes-index-uid-settings-typo-tolerance"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-patch-indexes-index-uid-settings-typo-tolerance"}},[e._v("#")]),e._v(" 3.2.2.2. "),a("code",[e._v("PATCH")]),e._v(" - "),a("code",[e._v("indexes/:index_uid/settings/typo-tolerance")])]),e._v(" "),a("p",[e._v("Allow customizing partially the settings of the typo tolerance feature for an index.")]),e._v(" "),a("p",[e._v("Request payload")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"disableOnAttributes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"title"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"description"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"minWordSizeForTypos"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("4")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[a("code",[e._v("202 Accepted")]),e._v(" - Example Response")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"uid"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("42")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"indexUid"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"books"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"status"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"enqueued"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"settingsUpdate"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"enqueuedAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2022-03-01T18:39:29.228155Z"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("h5",{attrs:{id:"_3-2-2-2-1-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-1-response-definition"}},[e._v("#")]),e._v(" 3.2.2.2.1. Response Definition")]),e._v(" "),a("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),a("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),a("p",[e._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),a("code",[e._v("task")]),e._v(" Object for "),a("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),a("h5",{attrs:{id:"_3-2-2-2-2-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-2-errors"}},[e._v("#")]),e._v(" 3.2.2.2.2. Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Omitting Content-Type header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an empty Content-Type returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a different Content-Type than "),a("code",[e._v("application/json")]),e._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an empty payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid JSON payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid index uid format for the "),a("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a value different from "),a("code",[e._v("null")]),e._v(" or with a different type than "),a("code",[e._v("Boolean")]),e._v(" for the "),a("code",[e._v("enabled")]),e._v(" field returns an\n"),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_typo_tolerance"}},[e._v("invalid_settings_typo_tolerance")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a value different from "),a("code",[e._v("null")]),e._v(" or with a different type than "),a("code",[e._v("Array of String")]),e._v(" for the "),a("code",[e._v("disableOnAttributes")]),e._v("\nfield returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_typo_tolerance"}},[e._v("invalid_settings_typo_tolerance")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a value different from "),a("code",[e._v("null")]),e._v(" or with a different type than "),a("code",[e._v("Array of String")]),e._v(" for the "),a("code",[e._v("disableOnWords")]),e._v(" field\nreturns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_typo_tolerance"}},[e._v("invalid_settings_typo_tolerance")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a value different from "),a("code",[e._v("null")]),e._v(" or with a different type than "),a("code",[e._v("Integer")]),e._v(" for "),a("code",[e._v("minWordSizeForTypos")]),e._v(" object fields\nreturns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_typo_tolerance"}},[e._v("invalid_settings_typo_tolerance")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending invalid values for "),a("code",[e._v("oneTypo")]),e._v(" AND "),a("code",[e._v("twoTypos")]),e._v(" being specified for the "),a("code",[e._v("minWordSizeForTypos")]),e._v(" object fields returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_typo_tolerance"}},[e._v("invalid_settings_typo_tolerance")]),e._v(" error.")],1)]),e._v(" "),a("h6",{attrs:{id:"_3-2-2-2-2-1-async-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-2-1-async-errors"}},[e._v("#")]),e._v(" 3.2.2.2.2.1. Async Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 When Meilisearch is secured, if the API Key do not have the "),a("code",[e._v("indexes.create")]),e._v(" action defined, the API returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related asynchronous "),a("code",[e._v("task")]),e._v(" resource. See "),a("a",{attrs:{href:"#32221-response-definition"}},[e._v("3.2.2.2.1. Response Definition")]),e._v(".")],1)]),e._v(" "),a("blockquote",[a("p",[e._v("Otherwise, Meilisearch will create the index in a lazy way. See "),a("a",{attrs:{href:"#32223-lazy-index-creation"}},[e._v("3.2.2.2.3. Lazy Index Creation")]),e._v(".")])]),e._v(" "),a("ul",[a("li",[e._v("🔴 When sending invalid values with either "),a("code",[e._v("oneTypo")]),e._v(" OR "),a("code",[e._v("twoTypos")]),e._v(" being specified for the "),a("code",[e._v("minWordSizeForTypos")]),e._v(" object fields returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_typo_tolerance"}},[e._v("invalid_settings_typo_tolerance")]),e._v(" error.")],1)]),e._v(" "),a("h5",{attrs:{id:"_3-2-2-2-3-lazy-index-creation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-3-lazy-index-creation"}},[e._v("#")]),e._v(" 3.2.2.2.3. Lazy Index Creation")]),e._v(" "),a("p",[e._v("If the requested "),a("code",[e._v("index_uid")]),e._v(" does not exist, and the authorization layer allows it (See "),a("a",{attrs:{href:"#322221-async-errors"}},[e._v("3.2.2.2.2.1. Async Errors")]),e._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),a("a",{attrs:{href:"#32221-response-definition"}},[e._v("3.2.2.2.1. Response Definition")]),e._v(".")]),e._v(" "),a("h4",{attrs:{id:"_3-2-2-3-delete-indexes-index-uid-settings-typo-tolerance"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-3-delete-indexes-index-uid-settings-typo-tolerance"}},[e._v("#")]),e._v(" 3.2.2.3. "),a("code",[e._v("DELETE")]),e._v("- "),a("code",[e._v("indexes/:index_uid/settings/typo-tolerance")])]),e._v(" "),a("p",[e._v("Allow resetting the typo tolerance feature to the default for an index.")]),e._v(" "),a("h5",{attrs:{id:"_3-2-2-3-1-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-3-1-response-definition"}},[e._v("#")]),e._v(" 3.2.2.3.1. Response Definition")]),e._v(" "),a("p",[e._v("When the request is in a successful state, Meilisearch returns the HTTP code "),a("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),a("p",[e._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),a("code",[e._v("task")]),e._v(" Object for "),a("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),a("h5",{attrs:{id:"_3-2-2-3-2-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-3-2-errors"}},[e._v("#")]),e._v(" 3.2.2.3.2. Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Sending an invalid index uid format for the "),a("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1)]),e._v(" "),a("h6",{attrs:{id:"_3-2-2-3-2-1-asynchronous-index-not-found-error"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-3-2-1-asynchronous-index-not-found-error"}},[e._v("#")]),e._v(" 3.2.2.3.2.1. Asynchronous Index Not Found Error")]),e._v(" "),a("ul",[a("li",[e._v("🔴 If the requested "),a("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related async "),a("code",[e._v("task")]),e._v(" resource. See "),a("a",{attrs:{href:"#32231-response-definition"}},[e._v("3.2.2.3.1. Response Definition")]),e._v(".")],1)]),e._v(" "),a("h3",{attrs:{id:"_3-2-3-general-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-general-errors"}},[e._v("#")]),e._v(" 3.2.3. General Errors")]),e._v(" "),a("p",[e._v("These errors apply to all endpoints described here.")]),e._v(" "),a("h4",{attrs:{id:"_3-2-3-1-auth-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-1-auth-errors"}},[e._v("#")]),e._v(" 3.2.3.1. Auth Errors")]),e._v(" "),a("p",[e._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Accessing this route without the "),a("code",[e._v("Authorization")]),e._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),a("h2",{attrs:{id:"_2-technical-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-details"}},[e._v("#")]),e._v(" 2. Technical Details")]),e._v(" "),a("h3",{attrs:{id:"_2-1-typos-calculation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-typos-calculation"}},[e._v("#")]),e._v(" 2.1. Typos Calculation")]),e._v(" "),a("p",[e._v("The size of a query term triggers the typo tolerance feature.")]),e._v(" "),a("p",[e._v("By default, a query term made of "),a("code",[e._v("5")]),e._v(" characters can tolerate "),a("code",[e._v("1")]),e._v(" typo, while a query term made of "),a("code",[e._v("9")]),e._v(" characters can tolerate "),a("code",[e._v("2")]),e._v(" typos.")]),e._v(" "),a("p",[e._v("If a query term can be derived from a distance of one or two typos to be found in a document, it will be selected as a candidate. The number of typos found has an impact on the relevancy.")]),e._v(" "),a("h4",{attrs:{id:"_2-1-1-typo-on-the-first-character"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-1-typo-on-the-first-character"}},[e._v("#")]),e._v(" 2.1.1 Typo On The First Character")]),e._v(" "),a("p",[e._v("A query term having the first character considered as a typo will not count as "),a("code",[e._v("1")]),e._v(" typo but as "),a("code",[e._v("2")]),e._v(" typos.")]),e._v(" "),a("p",[e._v("It permits to drastically reduce the search space in this case, thus speed-up the search response.")]),e._v(" "),a("h4",{attrs:{id:"_2-1-2-clamping-typo-on-concatened-query-terms"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-2-clamping-typo-on-concatened-query-terms"}},[e._v("#")]),e._v(" 2.1.2. Clamping Typo On Concatened Query Terms")]),e._v(" "),a("p",[e._v("The concatenation of two query terms is equal to 1 typo.")]),e._v(" "),a("p",[e._v("e.g. If "),a("code",[e._v("Le tableau")]),e._v(" is typed, the concatened string "),a("code",[e._v("Letableau")]),e._v(" made of "),a("code",[e._v("9")]),e._v(" letters can only have "),a("code",[e._v("1")]),e._v(" typo instead of "),a("code",[e._v("2")]),e._v(" since "),a("code",[e._v("1")]),e._v(" typo is already counted by the concatenation.")]),e._v(" "),a("h3",{attrs:{id:"_2-2-typo-ranking-rule"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-2-typo-ranking-rule"}},[e._v("#")]),e._v(" 2.2. Typo Ranking Rule")]),e._v(" "),a("p",[e._v("The "),a("code",[e._v("typo")]),e._v(" ranking rule favors candidates with the least typos. That is, if a document is found with two typos, it will be ranked as less important than a document found with 1 typo. 0 typo is the most favorable case.")]),e._v(" "),a("h2",{attrs:{id:"_3-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[e._v("#")]),e._v(" 3. Future Possibilities")]),e._v(" "),a("ul",[a("li",[e._v("Expose "),a("code",[e._v("typoTolerance")]),e._v(" resource as a search parameter to override index settings.")]),e._v(" "),a("li",[e._v("Add the possibility to disable the typo tolerance feature on all numeric fields.")]),e._v(" "),a("li",[e._v("Add different modes of result matching for the typo feature. e.g. "),a("code",[e._v("default")]),e._v("/"),a("code",[e._v("min")]),e._v("/"),a("code",[e._v("strict")])]),e._v(" "),a("li",[e._v("Introduce synchronous "),a("code",[e._v("invalid_settings_typo_tolerance_{fieldName}")]),e._v(" error code granularity.")])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/34.1ae80f5b.js b/docs/assets/js/34.b5b8f566.js similarity index 99% rename from docs/assets/js/34.1ae80f5b.js rename to docs/assets/js/34.b5b8f566.js index 4fcd258e3..f652e7b63 100644 --- a/docs/assets/js/34.1ae80f5b.js +++ b/docs/assets/js/34.b5b8f566.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[34],{459:function(t,e,a){"use strict";a.r(e);var s=a(62),r=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"search-api"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#search-api"}},[t._v("#")]),t._v(" Search API")]),t._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),a("p",[t._v("The search endpoints retrieve documents from an index. Their returned documents are considered relevant based on the settings of the index and the provided search parameters.")]),t._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),a("p",[t._v("N/A")]),t._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),a("p",[t._v("Meilisearch exposes 2 routes to perform search requests:")]),t._v(" "),a("ul",[a("li",[a("p",[t._v("GET "),a("code",[t._v("indexes/:index_uid/search")])])]),t._v(" "),a("li",[a("p",[t._v("POST "),a("code",[t._v("indexes/:index_uid/search")])])]),t._v(" "),a("li",[a("p",[t._v("🔴 Sending an invalid index uid format for the "),a("code",[t._v(":index_uid")]),t._v(" path parameter returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[t._v("invalid_index_uid")]),t._v(" error.")],1)]),t._v(" "),a("li",[a("p",[t._v("🔴 If the index does not exist, the API returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[t._v("index_not_found")]),t._v(" error.")],1)])]),t._v(" "),a("p",[t._v("If a master key is used to secure a Meilisearch instance, the auth layer returns the following errors:")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Accessing these routes without the "),a("code",[t._v("Authorization")]),t._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Accessing these routes with a key that does not have permissions (i.e. other than the master key) returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),a("p",[a("code",[t._v("POST")]),t._v(" HTTP verb errors:")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Omitting the Content-Type header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[t._v("missing_content_type")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending an empty Content-Type returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[t._v("invalid_content_type")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending a different Content-Type than "),a("code",[t._v("application/json")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[t._v("invalid_content_type")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending an empty payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[t._v("missing_payload")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending an invalid JSON payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[t._v("malformed_payload")]),t._v(" error.")],1)]),t._v(" "),a("h3",{attrs:{id:"_3-1-search-payload-parameters"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-search-payload-parameters"}},[t._v("#")]),t._v(" 3.1. Search Payload Parameters")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Field")]),t._v(" "),a("th",[t._v("Type")]),t._v(" "),a("th",[t._v("Required")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[a("a",{attrs:{href:"#311-q"}},[a("code",[t._v("q")])])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#312-filter"}},[a("code",[t._v("filter")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#313-sort"}},[a("code",[t._v("sort")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#314-facets"}},[a("code",[t._v("facets")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#315-limit"}},[a("code",[t._v("limit")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#316-offset"}},[a("code",[t._v("offset")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#317-page"}},[a("code",[t._v("page")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#318-hitsperpage"}},[a("code",[t._v("hitsPerPage")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#319-attributestoretrieve"}},[a("code",[t._v("attributesToRetrieve")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3110-attributestohighlight"}},[a("code",[t._v("attributesToHighlight")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3111-highlightpretag"}},[a("code",[t._v("highlightPreTag")])])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3112-highlightposttag"}},[a("code",[t._v("highlightPostTag")])])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3113-attributestocrop"}},[a("code",[t._v("attributesToCrop")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3114-croplength"}},[a("code",[t._v("cropLength")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3115-cropmarker"}},[a("code",[t._v("cropMarker")])])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3116-showmatchesposition"}},[a("code",[t._v("showMatchesPosition")])])]),t._v(" "),a("td",[t._v("Boolean")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3117-showrankingscore"}},[a("code",[t._v("showRankingScore")])])]),t._v(" "),a("td",[t._v("Boolean")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3118-showrankingscoredetails"}},[a("code",[t._v("showRankingScoreDetails")])])]),t._v(" "),a("td",[t._v("Boolean")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3119-matchingStrategy"}},[a("code",[t._v("matchingStrategy")])])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3120-attributesToSearchOn"}},[a("code",[t._v("attributesToSearchOn")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3121-vector"}},[a("code",[t._v("vector")])]),t._v(" "),a("code",[t._v("EXPERIMENTAL")])]),t._v(" "),a("td",[t._v("Array of Float")]),t._v(" "),a("td",[t._v("False")])])])]),t._v(" "),a("h4",{attrs:{id:"_3-1-1-q"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-q"}},[t._v("#")]),t._v(" 3.1.1. "),a("code",[t._v("q")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("null")])])]),t._v(" "),a("p",[a("code",[t._v("q")]),t._v(" contains the terms to search within the index documents.")]),t._v(" "),a("blockquote",[a("p",[t._v("When q isn't specified, Meilisearch performs a "),a("strong",[t._v("placeholder search")]),t._v(". A placeholder search returns all searchable documents in an index, modified by any search parameters used and sorted by that index's custom ranking rules. If the index has no sort search parameter or custom ranking rules, the results are returned in the order of their internal database position.")])]),t._v(" "),a("blockquote",[a("p",[t._v("Meilisearch only considers the first ten words of any given search query to deliver a fast search-as-you-type experience.")])]),t._v(" "),a("blockquote",[a("p",[a("code",[t._v("q")]),t._v(" supports the "),a("RouterLink",{attrs:{to:"/specifications/text/0043-phrase-query.html"}},[t._v("Phrase Query")]),t._v(" expression.")],1)]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("String")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("q")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_q"}},[t._v("invalid_search_q")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-2-filter"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-filter"}},[t._v("#")]),t._v(" 3.1.2. "),a("code",[t._v("filter")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String (POST/GET) | Array of (String, Array of String) (POST)")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("[]|null")])])]),t._v(" "),a("p",[a("code",[t._v("filter")]),t._v(" contains a filter expression written as a string or an array of (strings and array of strings). Its purpose is to refine search results by selecting documents that match the given filter and running the search query only on those documents.")]),t._v(" "),a("p",[t._v("Attributes used as filter criteria must be added to the "),a("code",[t._v("filterableAttributes")]),t._v(" list of an index settings. See "),a("RouterLink",{attrs:{to:"/specifications/text/0123-filterable-attributes-setting-api.html"}},[t._v("Filterable Attributes Setting API")]),t._v(".")],1),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("String")]),t._v("(GET/POST), "),a("code",[t._v("Array of (Array of String, String) (POST)")]),t._v(", or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("filter")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_filter"}},[t._v("invalid_search_filter")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending an invalid syntax for "),a("code",[t._v("filter")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_filter"}},[t._v("invalid_search_filter")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending a field not defined as a "),a("code",[t._v("filterableAttributes")]),t._v(" for "),a("code",[t._v("filter")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_filter"}},[t._v("invalid_search_filter")]),t._v(" error.")],1)]),t._v(" "),a("h5",{attrs:{id:"_3-1-2-1-string-syntax"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-string-syntax"}},[t._v("#")]),t._v(" 3.1.2.1. String Syntax")]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-1-grammar"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-1-grammar"}},[t._v("#")]),t._v(" 3.1.2.1.1 Grammar")]),t._v(" "),a("p",[t._v("The grammar of the filter syntax is given below in pseudo-BNF form:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('filter = expression EOF\nexpression = or\nor = and ("OR" WS+ and)*\nand = not ("AND" WS+ not)*\nnot = ("NOT" WS+ not) | primary\nprimary = "(" WS* expression WS* ")" | geoRadius | geoBoundingBox | in | condition | exists | not_exists | to\nin = attribute "IN" WS* "[" value_list "]"\ncondition = attribute ("=" | "!=" | ">" | ">=" | "<" | "<=") value\nexists = attribute "EXISTS"\nnot_exists = attribute "NOT" WS+ "EXISTS"\nto = attribute value "TO" WS+ value\nvalue = WS* ( word | singleQuoted | doubleQuoted) WS+\nattribute = value\nvalue_list = (value ("," value)* ","?)?\nsingleQuoted = "\'" single_quoted_string "\'"\ndoubleQuoted = "\\"" double_quoted_string "\\""\nword = ([a-zA-Z0-9] | "_" | "-" | ".")+\ngeoRadius = "_geoRadius(" WS* float WS* "," WS* float WS* "," float WS* ")"\nfloat = [+-]?[0-9]*("."[0-9]+)?(("E"|"e") [+-]?[0-9]+)?\nWS = \' \' | \'\\t\' | \'\\r\' | \'\\n\'\n')])])]),a("p",[t._v("where "),a("code",[t._v("single_quoted_string")]),t._v(" and "),a("code",[t._v("double_quoted_string")]),t._v(" can contain anything except unescaped single quotes "),a("code",[t._v("'")]),t._v(" and unescaped double quotes "),a("code",[t._v('"')]),t._v(", respectively. Quotes are escaped by a preceding backslash. For example: "),a("code",[t._v('"escaped \\" double quote" "')]),t._v(" and "),a("code",[t._v("escaped \\' single quote")]),t._v(". If a backslash is not followed by the correct quote, it is kept in the string.")]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-2-naming-a-filterable-attribute"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-2-naming-a-filterable-attribute"}},[t._v("#")]),t._v(" 3.1.2.1.2 Naming a filterable attribute")]),t._v(" "),a("p",[t._v("A filterable attribute can appear in a filter by its unquoted name if it only contains ascii alphanumeric characters, dots, hyphens, and underscores.")]),t._v(" "),a("p",[t._v("For example, each filter below selects the documents where the given filterable attribute (on the left side of the equal) is equal to a specific value (on the right side):")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('genres = "film"\ngenre.subgenre = "adventure"\n_geo.lat = 1.23\n101 = "abc"\n')])])]),a("p",[t._v("If the filterable attribute is composed of multiple words or contains other characters, it must be quoted, either using single quotes or double quotes:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('"place of birth" = Berlin\n"∆" = 2.1\n"Friend\'s name" = Albus\n\'opinion on "the best search engine"\' = "meilisearch"\n')])])]),a("p",[t._v("If the filterable attribute contains the same quote character that surrounds the attribute, then this quote character must be escaped by a preceding backslash:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("'Friend\\'s name' = Albus\n")])])]),a("h5",{attrs:{id:"_3-1-2-1-3-naming-the-value-of-a-filterable-attribute"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-3-naming-the-value-of-a-filterable-attribute"}},[t._v("#")]),t._v(" 3.1.2.1.3 Naming the value of a filterable attribute")]),t._v(" "),a("p",[t._v("The grammar for the value of a filterable attribute is the same as the grammar for filterable attributes themselves.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-2-1-4-list-of-supported-operators"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-4-list-of-supported-operators"}},[t._v("#")]),t._v(" 3.1.2.1.4 List of supported operators")]),t._v(" "),a("ul",[a("li",[t._v("Equality: "),a("code",[t._v("attribute = value")])]),t._v(" "),a("li",[t._v("Inequality: "),a("code",[t._v("attribute != value")])]),t._v(" "),a("li",[t._v("Comparison:\n"),a("ul",[a("li",[a("code",[t._v("attribute < value")])]),t._v(" "),a("li",[a("code",[t._v("attribute <= value")])]),t._v(" "),a("li",[a("code",[t._v("attribute > value")])]),t._v(" "),a("li",[a("code",[t._v("attribute >= value")])]),t._v(" "),a("li",[a("code",[t._v("attribute value TO value")])])])]),t._v(" "),a("li",[t._v("Exists:\n"),a("ul",[a("li",[a("code",[t._v("attribute EXISTS")])]),t._v(" "),a("li",[a("code",[t._v("attribute NOT EXISTS")])])])]),t._v(" "),a("li",[t._v("IN:\n"),a("ul",[a("li",[a("code",[t._v("attribute IN[value, value, etc.]")])]),t._v(" "),a("li",[a("code",[t._v("attribute NOT IN[value, value, etc.]")])])])]),t._v(" "),a("li",[t._v("IS EMPTY:\n"),a("ul",[a("li",[a("code",[t._v("attribute IS EMPTY")])]),t._v(" "),a("li",[a("code",[t._v("attribute IS NOT EMPTY")])])])]),t._v(" "),a("li",[t._v("IS NULL:\n"),a("ul",[a("li",[a("code",[t._v("attribute IS NULL")])]),t._v(" "),a("li",[a("code",[t._v("attribute IS NOT NULL")])])])]),t._v(" "),a("li",[t._v("AND: "),a("code",[t._v("filter AND filter")])]),t._v(" "),a("li",[t._v("OR: "),a("code",[t._v("filter OR filter")])]),t._v(" "),a("li",[t._v("NOT: "),a("code",[t._v("NOT filter")])]),t._v(" "),a("li",[t._v("GeoSearch: "),a("code",[t._v("_geoRadius(lat, lng, distance)")])]),t._v(" "),a("li",[t._v("GeoSearch: "),a("code",[t._v("_geoBoundingBox([lat, lng], [lat, lng])")])])]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-5-equality"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-5-equality"}},[t._v("#")]),t._v(" 3.1.2.1.5 Equality")]),t._v(" "),a("p",[t._v("The equality operator, "),a("code",[t._v("=")]),t._v(", selects the documents for which:")]),t._v(" "),a("ol",[a("li",[t._v("the given filterable attribute exists; and")]),t._v(" "),a("li",[t._v("the attribute contains a value that is equal to a specific value")])]),t._v(" "),a("p",[t._v("It is an infix operator that takes an attribute name on the left hand side and a value on the right hand side.")]),t._v(" "),a("p",[t._v("For example, given the documents:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"size"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"size"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"L"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"size"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"small"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"shop_distance"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1.2e+5")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("then the filter:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("size = 1\n")])])]),a("p",[t._v("will select the documents with ids "),a("code",[t._v("0")]),t._v(" and "),a("code",[t._v("1")]),t._v(".")]),t._v(" "),a("p",[t._v("Note that there is no way to specify whether the value on the right hand side of the equality should be interpreted as a string or as a number. Meilisearch will always try to match both. And since unquoted values cannot contain the "),a("code",[t._v("+")]),t._v(" character, it is in fact necessary to quote floating point numbers that have positive exponents:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('shop_distance = "1.2e+5"\n')])])]),a("p",[t._v("will select the document with id "),a("code",[t._v("3")]),t._v(".")]),t._v(" "),a("p",[t._v("Furthermore, there is no way to check whether an attribute has a value that is "),a("code",[t._v("null")]),t._v(" or an array. An attribute whose value is "),a("code",[t._v("null")]),t._v(" or an empty array is considered not to have any value and will therefore never be matched by an equality operator.")]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-6-inequality"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-6-inequality"}},[t._v("#")]),t._v(" 3.1.2.1.6 Inequality")]),t._v(" "),a("p",[t._v("The inequality operator selects all documents that are not selected by the equality operator.\nWith the same documents given as examples to the equality operator, the following filter:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("size != 1\n")])])]),a("p",[t._v("will select the documents with ids "),a("code",[t._v("2")]),t._v(" and "),a("code",[t._v("3")]),t._v(".")]),t._v(" "),a("p",[t._v("Note that "),a("code",[t._v("attribute != value")]),t._v(" is equivalent to "),a("code",[t._v("NOT attribute = value")]),t._v(".")]),t._v(" "),a("p",[t._v("Furthermore, there is no way to write a filter to select documents which contain a value that is different than a given string or number. In the example above, "),a("code",[t._v("size != 1")]),t._v(" did not select the document with id "),a("code",[t._v("1")]),t._v(", even though its "),a("code",[t._v("size")]),t._v(" attribute contains the value "),a("code",[t._v('"L"')]),t._v(", which is different than "),a("code",[t._v("1")]),t._v(".")]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-7-comparison"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-7-comparison"}},[t._v("#")]),t._v(" 3.1.2.1.7 Comparison")]),t._v(" "),a("p",[t._v("The comparison operators select the documents for which:")]),t._v(" "),a("ol",[a("li",[t._v("the filterable attribute exists; and")]),t._v(" "),a("li",[t._v("the attribute contains a number that satisfies the comparison")])]),t._v(" "),a("p",[t._v("Note that the right hand side of the comparison must be a valid floating point number.")]),t._v(" "),a("p",[t._v("For example, with the documents:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"size"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"small"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"blue"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"size"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"size"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Then the following filters will select these documents:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("size > 1 -> selects [1]\nsize >= 1 -> selects [1,2]\nsize < 2 -> selects [0,1]\nsize <= 2 -> selects [0,1,2]\nsize -1 TO 2 -> equivalent to size >= -1 AND size <= 2 -> selects [0,1,2]\n")])])]),a("p",[t._v("And the following filters are invalid:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('size > "small"\nsize "larga" TO "largz"\n')])])]),a("h5",{attrs:{id:"_3-1-2-1-8-combining-filter-conditions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-8-combining-filter-conditions"}},[t._v("#")]),t._v(" 3.1.2.1.8 Combining filter conditions")]),t._v(" "),a("p",[t._v("Multiple filters can be combined together using the operators "),a("code",[t._v("AND")]),t._v(" and "),a("code",[t._v("OR")]),t._v(". These infix operators take two sub-filters as arguments.")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("AND")]),t._v(" operator selects the documents that are selected by both subfilters at the same time. In other words, it is an intersection of the two sets of documents selected by the sub-filters.")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("OR")]),t._v(" operator selects the documents that are selected by either operator. In other words, it is a union of the two sets of documents selected by the sub-filters.")]),t._v(" "),a("p",[t._v("Note that "),a("code",[t._v("AND")]),t._v(" has a higher precedence than "),a("code",[t._v("OR")]),t._v(". Therefore, the following filter:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("x = 1 AND y = 2 OR z = 3\n")])])]),a("p",[t._v("will be interepreted as:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("(x = 1 AND y = 2) OR (z = 3)\n")])])]),a("p",[t._v("With the same documents given as examples for the comparison operators, the following filters will select these documents:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('size = 0 OR size = 1 -> selects [0,1]\nsize = 0 AND (size = 2 OR colour = "blue") -> selects []\nsize = 0 AND size = 2 OR colour = "blue" -> selects [0]\nsize > 5 AND size < 5 -> selects [2]\n')])])]),a("h6",{attrs:{id:"_3-1-2-1-9-negating-a-filter"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-9-negating-a-filter"}},[t._v("#")]),t._v(" 3.1.2.1.9 Negating a filter")]),t._v(" "),a("p",[t._v("The negation operator, "),a("code",[t._v("NOT")]),t._v(", is used to select all documents that are not selected by a sub-filter. It is a prefix operator that takes one argument. Its precedence is higher than both "),a("code",[t._v("AND")]),t._v(" and "),a("code",[t._v("OR")]),t._v(".")]),t._v(" "),a("p",[t._v("With the same documents given as examples for the comparison operators, the following filters will select these documents:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('NOT size = 0 -> selects [1,2]\nNOT (size = 0 OR size = 1) -> selects [2]\nNOT size = 0 OR size = 1 -> selects [1,2]\nNOT (size < 2 AND colour = "blue") -> selects [1,2]\nNOT size < 2 AND colour = "blue" -> selects []\nsize = 0 OR NOT size = 2 -> selects [0,1]\nNOT (NOT size = 0) -> selects [0]\n')])])]),a("h6",{attrs:{id:"_3-1-2-1-10-exists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-10-exists"}},[t._v("#")]),t._v(" 3.1.2.1.10 EXISTS")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("EXISTS")]),t._v(" operator selects the documents for which the filterable attribute exists, even if its value is "),a("code",[t._v("null")]),t._v(" or an empty array. It is a postfix operator that takes an attribute name as argument.")]),t._v(" "),a("p",[t._v("The negated form of "),a("code",[t._v("EXISTS")]),t._v(" can be written in two ways:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("attribute NOT EXISTS\nNOT attribute EXISTS\n")])])]),a("p",[t._v("Both forms are equivalent. They select the documents for which the attribute does not exist.")]),t._v(" "),a("p",[t._v("For example, with the documents:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Then the filter "),a("code",[t._v("colour EXISTS")]),t._v(" selects the document ids "),a("code",[t._v("[0,1]")]),t._v(" while the filter "),a("code",[t._v("colour NOT EXISTS")]),t._v(" or "),a("code",[t._v("NOT colour EXISTS")]),t._v(" selects the document ids "),a("code",[t._v("[2]")]),t._v(".")]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-11-in"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-11-in"}},[t._v("#")]),t._v(" 3.1.2.1.11 IN")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("IN[..]")]),t._v(" operator is a more concise way to combine equality operators. It is a postfix operator that takes an attribute name on the left hand side and an array of values on the right hand side. An array of value is a comma-separated list of values delimited by square brackets.")]),t._v(" "),a("p",[t._v("The two filters below are equivalent:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("attribute IN[value1, value2, value3,]\n\nattribute = value1 OR attribute = value2 OR attribute = value3\n")])])]),a("p",[t._v("In short, "),a("code",[t._v("IN")]),t._v(" selects the documents for which:")]),t._v(" "),a("ol",[a("li",[t._v("the filterable attribute exists; and")]),t._v(" "),a("li",[t._v("the attribute contains a value that is equal to any of the values in the array")])]),t._v(" "),a("p",[t._v("The negated form of "),a("code",[t._v("IN")]),t._v(" can be written in two different ways:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("attribute NOT IN [value1, value2, etc.]\nNOT attribute IN [value1, value2, etc.]\n")])])]),a("p",[t._v("and it is equivalent to:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("attribute != value1 AND attribute != value2 AND ...\n")])])]),a("h6",{attrs:{id:"_3-1-2-1-12-geo-search"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-12-geo-search"}},[t._v("#")]),t._v(" 3.1.2.1.12 Geo Search")]),t._v(" "),a("ul",[a("li",[t._v("The "),a("code",[t._v("_geoRadius")]),t._v(" operator selects the documents whose geographical coordinates fall within a certain range of a given coordinate. See "),a("RouterLink",{attrs:{to:"/specifications/text/0059-geo-search.html"}},[t._v("GeoSearch")]),t._v(" for more information.")],1),t._v(" "),a("li",[t._v("The "),a("code",[t._v("_geoBoundingBox")]),t._v(" operator selects the documents whose geographical coordinates fall within a square described by the given coordinates. See "),a("RouterLink",{attrs:{to:"/specifications/text/0059-geo-search.html"}},[t._v("GeoSearch")]),t._v(" for more information.")],1)]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-12-is-empty"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-12-is-empty"}},[t._v("#")]),t._v(" 3.1.2.1.12 IS EMPTY")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("IS EMPTY")]),t._v(" operator selects the documents for which the filterable attribute exists and is empty. If the attribute doesn't exists then it is not empty and the document will not be returned. It is a postfix operator that takes an attribute name as argument.")]),t._v(" "),a("p",[t._v("The negated form of "),a("code",[t._v("IS EMPTY")]),t._v(" can be written in two ways:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("attribute IS NOT EMPTY\nNOT attribute IS EMPTY\n")])])]),a("p",[t._v("Both forms are equivalent. They select the documents for which the attribute is not empty.")]),t._v(" "),a("p",[t._v("Here is the list of JSON values that are considered empty:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v('""')])]),t._v(" "),a("li",[a("code",[t._v("[]")])]),t._v(" "),a("li",[a("code",[t._v("{}")])])]),t._v(" "),a("p",[t._v("For example, with the documents:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("4")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Then the filter "),a("code",[t._v("colour IS EMPTY")]),t._v(" selects the document ids "),a("code",[t._v("[0,2,3]")]),t._v(" while the filter "),a("code",[t._v("colour IS NOT EMPTY")]),t._v(" or "),a("code",[t._v("NOT colour IS EMPTY")]),t._v(" selects the document ids "),a("code",[t._v("[1,4]")]),t._v(".")]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-13-is-null"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-13-is-null"}},[t._v("#")]),t._v(" 3.1.2.1.13 IS NULL")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("IS NULL")]),t._v(" operator selects the documents for which the filterable attribute exists and is "),a("code",[t._v("null")]),t._v(". If the attribute doesn't exists then it is not "),a("code",[t._v("null")]),t._v(" and the document will not be returned. It is a postfix operator that takes an attribute name as argument.")]),t._v(" "),a("p",[t._v("The negated form of "),a("code",[t._v("IS NULL")]),t._v(" can be written in two ways:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("attribute IS NOT NULL\nNOT attribute IS NULL\n")])])]),a("p",[t._v("Both forms are equivalent. They select the documents for which the attribute is not "),a("code",[t._v("null")]),t._v(".")]),t._v(" "),a("p",[t._v("For example, with the documents:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("4")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Then the filter "),a("code",[t._v("colour IS NULL")]),t._v(" selects the document ids "),a("code",[t._v("[1]")]),t._v(" while the filter "),a("code",[t._v("colour IS NOT NULL")]),t._v(" or "),a("code",[t._v("NOT colour IS NULL")]),t._v(" selects the document ids "),a("code",[t._v("[0,2,3,4]")]),t._v(".")]),t._v(" "),a("h5",{attrs:{id:"_3-1-2-2-array-syntax"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-2-array-syntax"}},[t._v("#")]),t._v(" 3.1.2.2. Array Syntax")]),t._v(" "),a("p",[t._v("The array syntax is an alternative way to combine different filters with "),a("code",[t._v("OR")]),t._v(" and "),a("code",[t._v("AND")]),t._v(" operators.")]),t._v(" "),a("ul",[a("li",[t._v("Elements in the outer array are connected by "),a("code",[t._v("AND")]),t._v(" operators")]),t._v(" "),a("li",[t._v("Elements in the inner arrays are connected by "),a("code",[t._v("OR")]),t._v(" operators")])]),t._v(" "),a("p",[t._v("Example:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"genres = Comedy"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"genres = Romance"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"director = 'Mati Diop'\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("is equivalent to:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"(genres = Comedy OR genres = Romance) AND (director = 'Mati Diop')\"")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"_3-1-3-sort"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-sort"}},[t._v("#")]),t._v(" 3.1.3. "),a("code",[t._v("sort")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of String (POST) | String (GET)")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("[]|null")])])]),t._v(" "),a("p",[a("code",[t._v("sort")]),t._v(" contains a sort expression written as a string or an array of strings. It sorts the search results at query time according to the specified attributes and indicated order.")]),t._v(" "),a("p",[t._v("Attributes used as sort criteria must be added to the `sortableAttributes list of an index settings. See "),a("RouterLink",{attrs:{to:"/specifications/text/0123-sortable-attributes-setting-api.html"}},[t._v("Sortable Attributes Setting API")]),t._v(".")],1),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array of String")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("sort")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_sort"}},[t._v("invalid_search_sort")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending an invalid syntax for "),a("code",[t._v("sort")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_sort"}},[t._v("invalid_search_sort")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending a field not defined as a "),a("code",[t._v("sortableAttributes")]),t._v(" for "),a("code",[t._v("sort")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_sort"}},[t._v("invalid_search_sort")]),t._v(" error.")],1)]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0055-sort.html"}},[t._v("Sort")])],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-4-facets"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-facets"}},[t._v("#")]),t._v(" 3.1.4. "),a("code",[t._v("facets")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of String (POST) | String (GET)")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("[]|null")])])]),t._v(" "),a("p",[a("code",[t._v("facets")]),t._v(" permits to specify facets to be computed for the current search query.")]),t._v(" "),a("p",[t._v("It returns the number of documents matching the current search query for each specified facet.")]),t._v(" "),a("p",[t._v("This parameter can take two values:")]),t._v(" "),a("ul",[a("li",[t._v("An array of attributes: "),a("code",[t._v('facets=["attributeA", "attributeB", …]')])]),t._v(" "),a("li",[t._v("A wildcard "),a("code",[t._v('"*"')]),t._v(" — this returns a count for all facets present in "),a("code",[t._v("filterableAttributes")])])]),t._v(" "),a("p",[t._v("Attributes used in "),a("code",[t._v("facets")]),t._v(" must be added to the "),a("code",[t._v("filterableAttributes")]),t._v(" list of an index settings. See "),a("RouterLink",{attrs:{to:"/specifications/text/0123-filterable-attributes-setting-api.html"}},[t._v("Filterable Attributes Setting API")]),t._v(".")],1),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array of String")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("facets")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_facets"}},[t._v("invalid_search_facets")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending a field not defined as a "),a("code",[t._v("filterableAttributes")]),t._v(" for "),a("code",[t._v("facets")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_facets"}},[t._v("invalid_search_facets")]),t._v(" error.")],1)]),t._v(" "),a("p",[t._v("The distribution of the different facets is returned in the "),a("code",[t._v("facetDistribution")]),t._v(" response parameter.")]),t._v(" "),a("p",[t._v("Statistics are computed and returned within the "),a("code",[t._v("facetStats")]),t._v(" object for distributed facets. See "),a("a",{attrs:{href:"#3210-facetstats"}},[a("code",[t._v("facetStats")])]),t._v(" section.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-5-limit"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-5-limit"}},[t._v("#")]),t._v(" 3.1.5. "),a("code",[t._v("limit")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("20")])])]),t._v(" "),a("p",[t._v("Sets the maximum number of documents to be returned for the search query.")]),t._v(" "),a("p",[t._v("If in addition to either "),a("code",[t._v("page")]),t._v(" and/or "),a("code",[t._v("hitsPerPage")]),t._v(", "),a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are provided as well, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" are ignored. See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("explaination")]),t._v(".")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("limit")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_limit"}},[t._v("invalid_search_limit")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-6-offset"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-6-offset"}},[t._v("#")]),t._v(" 3.1.6. "),a("code",[t._v("offset")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("0")])])]),t._v(" "),a("p",[t._v("Sets the starting point in the search results, effectively skipping over a given number of documents.")]),t._v(" "),a("p",[t._v("If in addition to either "),a("code",[t._v("page")]),t._v(" and/or "),a("code",[t._v("hitsPerPage")]),t._v(", "),a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are provided as well, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" are ignored. See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(".")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("offset")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_offset"}},[t._v("invalid_search_offset")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-7-page"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-7-page"}},[t._v("#")]),t._v(" 3.1.7. "),a("code",[t._v("page")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("null")])])]),t._v(" "),a("p",[t._v("Sets the specific results page to fetch.")]),t._v(" "),a("p",[t._v("By default, page is "),a("code",[t._v("null")]),t._v(", or "),a("code",[t._v("1")]),t._v(" if "),a("code",[t._v("hitsPerPage")]),t._v(" is provided.\nThe first page has a value of "),a("code",[t._v("1")]),t._v(", the second "),a("code",[t._v("2")]),t._v(", etc... When "),a("code",[t._v("0")]),t._v(" is provided as a value, no hits are returned.")]),t._v(" "),a("p",[t._v("When providing "),a("code",[t._v("page")]),t._v(" or "),a("code",[t._v("hitsPerPage")]),t._v(" in the query parameters, the "),a("code",[t._v("page selection")]),t._v(" system is enabled, which makes it possible to navigate through the search results pages. See explanation on the "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[a("code",[t._v("page selection")])]),t._v(".")]),t._v(" "),a("p",[t._v("If in addition to either "),a("code",[t._v("page")]),t._v(" and/or "),a("code",[t._v("hitsPerPage")]),t._v(", "),a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are provided as well, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" are ignored. See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("explanation")]),t._v(".")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("page")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_page"}},[t._v("invalid_search_page")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-8-hitsperpage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-hitsperpage"}},[t._v("#")]),t._v(" 3.1.8. "),a("code",[t._v("hitsPerPage")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("null")])])]),t._v(" "),a("p",[t._v("Sets the number of results returned for a query.")]),t._v(" "),a("p",[t._v("By default, "),a("code",[t._v("hitsPerPage")]),t._v(" is "),a("code",[t._v("null")]),t._v(", or "),a("code",[t._v("20")]),t._v(" if "),a("code",[t._v("page")]),t._v(" is provided. When "),a("code",[t._v("0")]),t._v(" is provided as a value, no hits are returned.")]),t._v(" "),a("p",[t._v("When providing "),a("code",[t._v("page")]),t._v(" or "),a("code",[t._v("hitsPerPage")]),t._v(" in the query parameters, the "),a("code",[t._v("page selection")]),t._v(" system is enabled, which makes it possible to navigate through the search results pages. See explanation on the "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[a("code",[t._v("page selection")])]),t._v(".")]),t._v(" "),a("p",[t._v("If in addition to either "),a("code",[t._v("page")]),t._v(" and/or "),a("code",[t._v("hitsPerPage")]),t._v(", "),a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are provided as well, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" are ignored. See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("explaination")]),t._v(".")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("hitsPerPage")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_hits_per_page"}},[t._v("invalid_search_hits_per_page")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-8-1-navigating-search-results-by-page-selection"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-1-navigating-search-results-by-page-selection"}},[t._v("#")]),t._v(" 3.1.8.1. Navigating search results by page selection")]),t._v(" "),a("p",[t._v("By default, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" are used to navigate search results. While being performant, it lacks exhaustiveness to create a seamless page selection navigation. Upon using "),a("code",[t._v("limit")]),t._v("/"),a("code",[t._v("offset")]),t._v(", "),a("code",[t._v("estimatedTotalHits")]),t._v(" is returned, which provides a rough estimation of how many hits may be candidates for a given request. See "),a("a",{attrs:{href:"#31811-limitoffset-usage"}},[a("code",[t._v("limit")]),t._v("/"),a("code",[t._v("offset")]),t._v(" usage")]),t._v(" for further explanation.")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("page selection")]),t._v(" system provides an alternative that tackles the above-mentioned issue when reliable information is needed to navigate results with a page selector. e.g. A page selector component "),a("code",[t._v("<< < 1, 2, 3, ...14 > >>")]),t._v(". Nonetheless, it's considered less performant on a larger number of results as the engine needs to compute the "),a("code",[t._v("totalHits")]),t._v(" exhaustively.\nWith this page selection system, it is possible to jump from one page to another using the "),a("code",[t._v("page")]),t._v(" parameter and decide how many results should be returned per page with the "),a("code",[t._v("hitsPerPage")]),t._v(" parameter. See "),a("a",{attrs:{href:"#31812-pagehitsperpage-usage"}},[a("code",[t._v("page")]),t._v("/"),a("code",[t._v("hitsPerPage")]),t._v(" usage")]),t._v(" for further explanation.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-8-1-1-limit-offset-usage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-1-1-limit-offset-usage"}},[t._v("#")]),t._v(" 3.1.8.1.1. Limit/offset usage")]),t._v(" "),a("p",[t._v("When either "),a("code",[t._v("limit")]),t._v(" or "),a("code",[t._v("offset")]),t._v(" is specified or when neither "),a("code",[t._v("limit")]),t._v(", "),a("code",[t._v("offset")]),t._v(", "),a("code",[t._v("page")]),t._v(" and "),a("code",[t._v("hitsPerPage")]),t._v(" are specified, the response object contains the related fields:")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"#324-estimatedtotalhits"}},[a("code",[t._v("estimatedTotalHits")])])]),t._v(" "),a("li",[a("a",{attrs:{href:"#322-limit"}},[a("code",[t._v("limit")])])]),t._v(" "),a("li",[a("a",{attrs:{href:"#323-offset"}},[a("code",[t._v("offset")])])])]),t._v(" "),a("p",[t._v("If in addition to "),a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(", either "),a("code",[t._v("page")]),t._v(" or "),a("code",[t._v("hitsPerPage")]),t._v(" is also provided, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" parameters are ignored.")]),t._v(" "),a("p",[t._v("For example, given the following query parameters:")]),t._v(" "),a("ul",[a("li",[t._v("limit: 10")]),t._v(" "),a("li",[t._v("offset: 1")])]),t._v(" "),a("p",[t._v("The response objects contain these specific fields:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... 10 hits")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... other fields")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"limit"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"offset"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"estimatedTotalHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1345")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("For example, on a query with no query parameters:")]),t._v(" "),a("p",[t._v("The response objects contain these specific fields:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... 10 hits")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... other fields")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"limit"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"offset"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"estimatedTotalHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1345")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h5",{attrs:{id:"_3-1-8-1-2-page-hitsperpage-usage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-1-2-page-hitsperpage-usage"}},[t._v("#")]),t._v(" 3.1.8.1.2 page/hitsPerPage usage")]),t._v(" "),a("p",[t._v("As soon as either "),a("code",[t._v("page")]),t._v(" or "),a("code",[t._v("hitsPerPage")]),t._v(" is used as a query parameter, in the response object, "),a("code",[t._v("limit")]),t._v(", "),a("code",[t._v("offset")]),t._v(", and "),a("code",[t._v("estimatedTotalHits")]),t._v(" are removed and page selection related fields are returned:")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"#326-hitsperpage"}},[a("code",[t._v("hitsPerPage")])]),t._v(": number of results per page.")]),t._v(" "),a("li",[a("a",{attrs:{href:"#325-page"}},[a("code",[t._v("page")])]),t._v(": current search results page. The counting starts at "),a("code",[t._v("1")]),t._v(".")]),t._v(" "),a("li",[a("a",{attrs:{href:"#327-totalpages"}},[a("code",[t._v("totalPages")])]),t._v(": total number of results pages. Calculated using "),a("code",[t._v("hitsPerPage")]),t._v(" value.")]),t._v(" "),a("li",[a("a",{attrs:{href:"#328-totalhits"}},[a("code",[t._v("totalHits")])]),t._v(": total number of search results.")])]),t._v(" "),a("p",[t._v("Both "),a("code",[t._v("totalPages")]),t._v(" and "),a("code",[t._v("totalHits")]),t._v(" are computed until they reach the "),a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#https://github.com/meilisearch/specifications/blob/main/text/157-pagination-setting-api.md#311-maxtotalhits"}},[a("code",[t._v("pagination.maxTotalHits")])]),t._v(" number from the settings.")],1),t._v(" "),a("p",[t._v("If in addition to either "),a("code",[t._v("page")]),t._v(" and/or "),a("code",[t._v("hitsPerPage")]),t._v(", "),a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are provided as well, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" are ignored.")]),t._v(" "),a("p",[t._v("For example, given the following query parameters:")]),t._v(" "),a("ul",[a("li",[t._v("page: 2")]),t._v(" "),a("li",[t._v("hitsPerPage: 10")])]),t._v(" "),a("p",[t._v("The response objects contain these specific fields:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... 10 hits")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... other fields")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"page"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hitsPerPage"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2100")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalPages"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("210")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("For example, given the following query parameters:")]),t._v(" "),a("ul",[a("li",[t._v("page: 2")]),t._v(" "),a("li",[t._v("hitsPerPage: 10")]),t._v(" "),a("li",[t._v("limit: 1")])]),t._v(" "),a("p",[t._v("The response objects contain these specific fields:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... 10 hits")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... other fields")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"page"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hitsPerPage"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2100")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalPages"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("210")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("For example, given the following query parameters:")]),t._v(" "),a("ul",[a("li",[t._v("page: 0")]),t._v(" "),a("li",[t._v("hitsPerPage: 10")])]),t._v(" "),a("p",[t._v("The response objects contain these specific fields:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... other fields")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"page"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hitsPerPage"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2100")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalPages"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("210")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"_3-1-9-attributestoretrieve"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-9-attributestoretrieve"}},[t._v("#")]),t._v(" 3.1.9. "),a("code",[t._v("attributesToRetrieve")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of String (POST) | String (GET)")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v('["*"]')]),t._v(", meaning all the attributes")])]),t._v(" "),a("p",[t._v("Configures which attributes will be retrieved in the returned documents.")]),t._v(" "),a("p",[t._v("If no value is specified, the default value of "),a("code",[t._v("attributesToRetrieve")]),t._v(" is used ("),a("code",[t._v('["*"]')]),t._v("). This corresponds to the "),a("code",[t._v("displayedAttributes")]),t._v(" index setting, which by default contains all attributes found in the documents.")]),t._v(" "),a("blockquote",[a("p",[t._v("If an attribute is missing from "),a("code",[t._v("displayedAttributes")]),t._v(" index setting, "),a("code",[t._v("attributesToRetrieve")]),t._v(" silently ignore it, and the field doesn't appear in the returned search results.")])]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array of String")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("attributesToRetrieve")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_attributes_to_retrieve"}},[t._v("invalid_search_attributes_to_retrieve")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-10-attributestohighlight"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-10-attributestohighlight"}},[t._v("#")]),t._v(" 3.1.10. "),a("code",[t._v("attributesToHighlight")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of String (POST) | String(GET)")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("[]|null")])])]),t._v(" "),a("p",[t._v("Configures which fields may have highlighted parts, given that they match the requested query terms (i.e. the terms in the "),a("a",{attrs:{href:"#311-q"}},[a("code",[t._v("q")])]),t._v(" search parameter). Pre/post highlighting tags are applied around each word corresponding to a query term.")]),t._v(" "),a("p",[t._v("If "),a("code",[t._v("attributesToHighlight")]),t._v(" is present in the search query, the search results will include a "),a("code",[t._v("_formatted")]),t._v(" object containing the attributes and their highlighted parts. For more detailed regarding the "),a("code",[t._v("_formatted")]),t._v(" behavior, see the "),a("a",{attrs:{href:"#32112-formatted"}},[t._v("3.2.1.1.2. "),a("code",[t._v("_formatted")])]),t._v(" section.")]),t._v(" "),a("p",[t._v("If "),a("code",[t._v('"*"')]),t._v(" is provided as a value ("),a("code",[t._v('attributesToHighlight=["*"]')]),t._v("), all the attributes present in "),a("code",[t._v("displayedAttributes")]),t._v(" setting will be highlighted.")]),t._v(" "),a("p",[t._v("Highlighted parts are surrounded by the "),a("a",{attrs:{href:"3111-highlightpretag"}},[a("code",[t._v("highlightPreTag")])]),t._v(" and "),a("a",{attrs:{href:"#3112-highlightposttag"}},[a("code",[t._v("highlightPostTag")])]),t._v(" parameters.")]),t._v(" "),a("p",[a("code",[t._v("attributesToHighlight")]),t._v(" only works on values of the following types: "),a("code",[t._v("string")]),t._v(", "),a("code",[t._v("number")]),t._v(", "),a("code",[t._v("array")]),t._v(", "),a("code",[t._v("object")]),t._v(". When highlighted, number attributes are transformed to string.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array[String]")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("attributesToHighlight")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_attributes_to_highlight"}},[t._v("invalid_search_attributes_to_highlight")]),t._v(" error.")],1)]),t._v(" "),a("h5",{attrs:{id:"_3-1-10-1-searchableattributes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-10-1-searchableattributes"}},[t._v("#")]),t._v(" 3.1.10.1. searchableAttributes")]),t._v(" "),a("p",[t._v("Attributes not defined in the "),a("code",[t._v("searchableAttributes")]),t._v(" index setting are also highlighted if assigned to "),a("code",[t._v("attributesToHighlight")]),t._v(".")]),t._v(" "),a("h5",{attrs:{id:"_3-1-10-2-stopwords"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-10-2-stopwords"}},[t._v("#")]),t._v(" 3.1.10.2. stopWords")]),t._v(" "),a("p",[t._v("Attributes defined in the "),a("code",[t._v("stopWords")]),t._v(" index setting are also highlighted if matched.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-10-3-tokenizer-separators"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-10-3-tokenizer-separators"}},[t._v("#")]),t._v(" 3.1.10.3. Tokenizer Separators")]),t._v(" "),a("p",[t._v("Tokenizer separators are not highlighted.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-10-4-synonyms"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-10-4-synonyms"}},[t._v("#")]),t._v(" 3.1.10.4. synonyms")]),t._v(" "),a("p",[t._v("Synonyms are also highlighted.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-11-highlightpretag"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-11-highlightpretag"}},[t._v("#")]),t._v(" 3.1.11. "),a("code",[t._v("highlightPreTag")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v('""')])])]),t._v(" "),a("p",[t._v("Specifies the string to put "),a("strong",[t._v("before")]),t._v(" every highlighted query terms.")]),t._v(" "),a("p",[t._v("This parameter is applied to the fields configured in "),a("code",[t._v("attributesToHighlight")]),t._v(". If there are none, this parameter has no effect. See "),a("a",{attrs:{href:"3110-attributestohighlight"}},[t._v("3.1.10. "),a("code",[t._v("attributesToHighlight")])]),t._v(" section.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("String")]),t._v(" for "),a("code",[t._v("highlightPreTag")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_highlight_pre_tag"}},[t._v("invalid_search_highlight_pre_tag")]),t._v(" error.")],1)]),t._v(" "),a("p",[t._v("If "),a("code",[t._v("attributesToHighlight")]),t._v(" is omitted while "),a("code",[t._v("highlightPreTag")]),t._v(" is specified, there is no error.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-12-highlightposttag"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-12-highlightposttag"}},[t._v("#")]),t._v(" 3.1.12. "),a("code",[t._v("highlightPostTag")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v('""')])])]),t._v(" "),a("p",[t._v("Specifies the string to put "),a("strong",[t._v("after")]),t._v(" the highlighted query terms.")]),t._v(" "),a("p",[t._v("This parameter is applied to the fields from "),a("code",[t._v("attributesToHighlight")]),t._v(". If there are none, this parameter has no effect. See "),a("a",{attrs:{href:"3110-attributestohighlight"}},[t._v("3.1.10. "),a("code",[t._v("attributesToHighlight")])]),t._v(" section.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("String")]),t._v(" for "),a("code",[t._v("highlightPostTag")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_highlight_post_tag"}},[t._v("invalid_search_highlight_post_tag")]),t._v(" error.")],1)]),t._v(" "),a("p",[t._v("If "),a("code",[t._v("attributesToHighlight")]),t._v(" is omitted while "),a("code",[t._v("highlightPostTag")]),t._v(" is specified, there is no error.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-13-attributestocrop"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-13-attributestocrop"}},[t._v("#")]),t._v(" 3.1.13. "),a("code",[t._v("attributesToCrop")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array[String]|String")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("[]|null")])])]),t._v(" "),a("p",[t._v("Defines document attributes to be cropped. Cropped attributes have their values shortened around query terms.")]),t._v(" "),a("p",[t._v("If "),a("code",[t._v("attributesToCrop")]),t._v(" is present in the search query, the search results will include a "),a("code",[t._v("_formatted")]),t._v(" object containing the attributes and their cropped parts. For more detailed regarding the "),a("code",[t._v("_formatted")]),t._v(" behavior, see the "),a("a",{attrs:{href:"#32112-formatted"}},[t._v("3.2.1.1.2. "),a("code",[t._v("_formatted")])]),t._v(" section.")]),t._v(" "),a("p",[t._v("If "),a("code",[t._v('"*"')]),t._v(" is provided as a value ("),a("code",[t._v('attributesToCrop=["*"]')]),t._v("), all the attributes present in "),a("code",[t._v("displayedAttributes")]),t._v(" setting will be cropped.")]),t._v(" "),a("p",[t._v("The number of words contained in the cropped value is defined by the "),a("code",[t._v("cropLength")]),t._v(" parameter. See "),a("a",{attrs:{href:"#3114-croplength"}},[t._v("3.1.1.14. "),a("code",[t._v("cropLength")])]),t._v(" section.")]),t._v(" "),a("p",[t._v("The value of "),a("code",[t._v("cropLength")]),t._v(" can be customized per attribute. See "),a("a",{attrs:{href:"#31121-custom-croplength-defined-per-attribute"}},[t._v("3.1.12.1. Custom "),a("code",[t._v("cropLength")]),t._v(" Defined Per Cropped Attribute")]),t._v(" section.")]),t._v(" "),a("p",[t._v("The engine adds a marker by default in front of and/or behind the part selected by the cropper. This marker is customizable. See "),a("a",{attrs:{href:"#3115-cropmarker"}},[t._v("3.1.13. "),a("code",[t._v("cropMarker")])]),t._v(" section.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array[String]")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("attributesToCrop")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_attributes_to_crop"}},[t._v("invalid_search_attributes_to_crop")]),t._v(" error.")],1)]),t._v(" "),a("h5",{attrs:{id:"_3-1-13-2-searchableattributes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-13-2-searchableattributes"}},[t._v("#")]),t._v(" 3.1.13.2. searchableAttributes")]),t._v(" "),a("p",[t._v("Attributes configured in "),a("code",[t._v("attributesToCrop")]),t._v(" are cropped even if not present in the "),a("code",[t._v("searchableAttributes")]),t._v(" index setting.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-13-3-stopwords"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-13-3-stopwords"}},[t._v("#")]),t._v(" 3.1.13.3. stopWords")]),t._v(" "),a("p",[t._v("Terms defined in the "),a("code",[t._v("stopWords")]),t._v(" index setting are counted as words regarding "),a("code",[t._v("cropLength")]),t._v(".")]),t._v(" "),a("h5",{attrs:{id:"_3-1-13-3-tokenizer-separators"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-13-3-tokenizer-separators"}},[t._v("#")]),t._v(" 3.1.13.3. Tokenizer Separators")]),t._v(" "),a("p",[t._v("Tokenizer separators aren't counted as words regarding "),a("code",[t._v("cropLength")]),t._v(".")]),t._v(" "),a("h4",{attrs:{id:"_3-1-14-croplength"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-14-croplength"}},[t._v("#")]),t._v(" 3.1.14. "),a("code",[t._v("cropLength")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("10")])])]),t._v(" "),a("p",[t._v("Sets the total number of "),a("strong",[t._v("words")]),t._v(" to keep for the cropped part of an attribute specified in the "),a("code",[t._v("attributesToCrop")]),t._v(" parameter. It means that if "),a("code",[t._v("10")]),t._v(" is set for "),a("code",[t._v("cropLength")]),t._v(", the cropped part returned in "),a("code",[t._v("_formatted")]),t._v(" will only be 10 words long.")]),t._v(" "),a("p",[t._v("This parameter is applied to the fields from "),a("code",[t._v("attributesToCrop")]),t._v(". If there are none, this parameter has no effect. See "),a("a",{attrs:{href:"#3113-attributestocrop"}},[t._v("3.1.13. "),a("code",[t._v("attributesToCrop")])]),t._v(" section.")]),t._v(" "),a("p",[t._v("Sending a "),a("code",[t._v("0")]),t._v(" value deactivates the cropping unless a custom crop length is defined for an attribute inside "),a("code",[t._v("attributesToCrop")]),t._v(".")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("cropLength")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_crop_length"}},[t._v("invalid_search_crop_length")]),t._v(" error.")],1)]),t._v(" "),a("h5",{attrs:{id:"_3-1-14-1-custom-croplength-defined-per-attribute"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-14-1-custom-croplength-defined-per-attribute"}},[t._v("#")]),t._v(" 3.1.14.1. Custom "),a("code",[t._v("cropLength")]),t._v(" Defined Per Attribute.")]),t._v(" "),a("p",[t._v("Optionally, indicating a custom crop length for any of the listed attributes is possible:")]),t._v(" "),a("p",[a("code",[t._v('"attributesToCrop":["attributeNameA:15", "attributeNameB:30"]')])]),t._v(" "),a("p",[t._v("A custom crop length set in this way has priority over the "),a("code",[t._v("cropLength")]),t._v(" parameter.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-14-2-examples"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-14-2-examples"}},[t._v("#")]),t._v(" 3.1.14.2 Examples")]),t._v(" "),a("h6",{attrs:{id:"_3-1-14-1-1-extending-around"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-14-1-1-extending-around"}},[t._v("#")]),t._v(" 3.1.14.1.1. Extending around")]),t._v(" "),a("p",[t._v("Given an attribute defined in "),a("code",[t._v("attributesToCrop")]),t._v(" containing:")]),t._v(" "),a("p",[a("code",[t._v('"In his ravenous hatred he found no peace, and with boiling blood he scoured the umbral plains, seeking vengence afgainst the dark lords who had robbed him."')])]),t._v(" "),a("p",[t._v("With "),a("code",[t._v("croplength")]),t._v(" defined as "),a("code",[t._v("5")]),t._v(" and "),a("code",[t._v("q")]),t._v(" defined as "),a("code",[t._v("boiling blood")]),t._v(", the cropped value will be:")]),t._v(" "),a("p",[a("code",[t._v('"…and with boiling blood he…"')])]),t._v(" "),a("p",[t._v("Cropped query terms are counted as a word regarding "),a("code",[t._v("cropLength")]),t._v(".")]),t._v(" "),a("p",[t._v("Sending more query terms than the "),a("code",[t._v("cropLength")]),t._v(" value has no impact. The cropped part will contain the "),a("code",[t._v("cropLength")]),t._v(" number.")]),t._v(" "),a("h6",{attrs:{id:"_3-1-14-1-2-keeping-a-phrase-context"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-14-1-2-keeping-a-phrase-context"}},[t._v("#")]),t._v(" 3.1.14.1.2. Keeping a phrase context")]),t._v(" "),a("p",[t._v("After Meilisearch has chosen the best possible match window (some number of words < "),a("code",[t._v("cropLength")]),t._v("), it will add words from before or after the match window until the total number is equal to "),a("code",[t._v("cropLength")]),t._v(". In doing so, it will attempt to add context to the match window by choosing words from the same sentence(s) where the match window occurs.")]),t._v(" "),a("p",[t._v("For instance, for the matching word "),a("code",[t._v("Split")]),t._v(" the text:")]),t._v(" "),a("p",[a("code",[t._v('"Natalie risk her future. Split The World is a book written by Emily Henry. I never read it."')])]),t._v(" "),a("p",[t._v("will be cropped like:")]),t._v(" "),a("p",[a("code",[t._v("…Split The World is a book written by Emily Henry…")])]),t._v(" "),a("p",[t._v("and not like:")]),t._v(" "),a("p",[a("code",[t._v("Natalie risk her future. Split The World is a book…")])]),t._v(" "),a("h4",{attrs:{id:"_3-1-15-cropmarker"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-15-cropmarker"}},[t._v("#")]),t._v(" 3.1.15. "),a("code",[t._v("cropMarker")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v('"…"')]),t._v(" (U+2026)")])]),t._v(" "),a("p",[t._v("Sets which string to add before and/or after the cropped text. See "),a("a",{attrs:{href:"#3113-attributestocrop"}},[t._v("3.1.13. "),a("code",[t._v("attributesToCrop")])]),t._v(" section.")]),t._v(" "),a("p",[t._v("The specified crop marker is applied by following rules outline in section "),a("a",{attrs:{href:"#3115-cropmarker"}},[t._v("3.1.15.1. Applying "),a("code",[t._v("cropMarker")])]),t._v(".")]),t._v(" "),a("p",[t._v("Specifying "),a("code",[t._v("cropMarker")]),t._v(" to "),a("code",[t._v('""')]),t._v(" or "),a("code",[t._v("null")]),t._v(" implies that no marker will be applied to the cropped part.")]),t._v(" "),a("p",[t._v("This parameter is applied to the fields configured in "),a("code",[t._v("attributesToCrop")]),t._v(". If there are none, this parameter has no effect. See "),a("a",{attrs:{href:"#3113-attributestocrop"}},[t._v("3.1.13. "),a("code",[t._v("attributesToCrop")])]),t._v(" section.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("String")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("cropMarker")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_crop_marker"}},[t._v("invalid_search_crop_marker")]),t._v(" error.")],1)]),t._v(" "),a("h5",{attrs:{id:"_3-1-15-1-applying-cropmarker"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-15-1-applying-cropmarker"}},[t._v("#")]),t._v(" 3.1.15.1. Applying "),a("code",[t._v("cropMarker")])]),t._v(" "),a("h6",{attrs:{id:"_3-1-15-1-1-matched-part-to-be-cropped"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-15-1-1-matched-part-to-be-cropped"}},[t._v("#")]),t._v(" 3.1.15.1.1. Matched Part To Be Cropped")]),t._v(" "),a("p",[t._v("The cropping algorithm tries to match the window with the highest density of query terms within the "),a("code",[t._v("cropLength")]),t._v(" limit.")]),t._v(" "),a("p",[t._v("The cropping algorithm tries to find the crop window that contains the most relevant matches.")]),t._v(" "),a("ol",[a("li",[t._v("That has the highest count of unique matches")])]),t._v(" "),a("p",[t._v("For example, for the query terms "),a("code",[t._v("split the world")]),t._v(", then the interval "),a("code",[t._v("the split the split the")]),t._v(" has "),a("code",[t._v("5")]),t._v(" matches but only "),a("code",[t._v("2")]),t._v(" unique matches ("),a("code",[t._v("1")]),t._v(" for "),a("code",[t._v("split")]),t._v(" and "),a("code",[t._v("1")]),t._v(" for "),a("code",[t._v("the")]),t._v(") where the interval "),a("code",[t._v("split of the world")]),t._v(" has "),a("code",[t._v("3")]),t._v(" matches and "),a("code",[t._v("3")]),t._v(" unique matches. So the interval "),a("code",[t._v("split of the world")]),t._v(" is considered better.")]),t._v(" "),a("ol",{attrs:{start:"2"}},[a("li",[t._v("That have the minimum distance between matches")])]),t._v(" "),a("p",[t._v("For example, for the query terms "),a("code",[t._v("split the world")]),t._v(", then the interval "),a("code",[t._v("split of the world")]),t._v(" has a distance of "),a("code",[t._v("3")]),t._v(" ("),a("code",[t._v("2")]),t._v(" between "),a("code",[t._v("split")]),t._v(" and "),a("code",[t._v("the")]),t._v(", and "),a("code",[t._v("1")]),t._v(" between "),a("code",[t._v("the")]),t._v(" and "),a("code",[t._v("world")]),t._v(") where the interval "),a("code",[t._v("split the world")]),t._v(" has a distance of "),a("code",[t._v("2")]),t._v(". So the interval "),a("code",[t._v("split the world")]),t._v(" is considered better.")]),t._v(" "),a("ol",{attrs:{start:"3"}},[a("li",[t._v("That have the highest count of ordered matches")])]),t._v(" "),a("p",[t._v("For example, for the query terms "),a("code",[t._v("split the world")]),t._v(", then the interval "),a("code",[t._v("the world split")]),t._v(" has "),a("code",[t._v("2")]),t._v(" ordered words where the interval "),a("code",[t._v("split the world")]),t._v(" has "),a("code",[t._v("3")]),t._v(". So the interval "),a("code",[t._v("split the world")]),t._v(" is considered better.")]),t._v(" "),a("p",[t._v("Only one cropped part from an attribute is returned.")]),t._v(" "),a("p",[t._v("If no part is found when selecting a part to be cropped, the returned value in "),a("code",[t._v("_formatted")]),t._v(" will start at the beginning of the attribute and include a number of words equal to "),a("code",[t._v("cropLength")]),t._v(".")]),t._v(" "),a("h6",{attrs:{id:"_3-1-15-1-2-positioning-markers"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-15-1-2-positioning-markers"}},[t._v("#")]),t._v(" 3.1.15.1.2. Positioning Markers")]),t._v(" "),a("p",[t._v("If the cropped part has been matched against query terms and contains the beginning of the attribute to be cropped, the "),a("code",[t._v("cropMarker")]),t._v(" is not placed to the left of the cropped part.")]),t._v(" "),a("p",[t._v("If the cropped part has been matched against query terms and contains the end of the attribute to be cropped, the "),a("code",[t._v("cropMarker")]),t._v(" is not placed to the right of the cropped part.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-16-showmatchesposition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-16-showmatchesposition"}},[t._v("#")]),t._v(" 3.1.16. "),a("code",[t._v("showMatchesPosition")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Boolean")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("false")])])]),t._v(" "),a("p",[t._v("Adds a "),a("code",[t._v("_matchesPosition")]),t._v(" object to the search response that contains the location of each occurrence of queried terms across all fields. The given positions are in bytes.")]),t._v(" "),a("p",[t._v("It's useful when more control is needed than offered by the built-in highlighting/cropping features.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Boolean")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("showMatchesPosition")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_show_matches_position"}},[t._v("invalid_search_show_matches_position")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-17-showrankingscore"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-17-showrankingscore"}},[t._v("#")]),t._v(" 3.1.17. "),a("code",[t._v("showRankingScore")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Boolean")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("false")])])]),t._v(" "),a("p",[t._v("Adds a "),a("a",{attrs:{href:"#32114-rankingscore"}},[a("code",[t._v("_rankingScore")])]),t._v(" number to each document in the search response, representing the relevancy score of a document according to the applied ranking rules and relative to a search query. Higher is better.")]),t._v(" "),a("p",[a("code",[t._v("1.0")]),t._v(" indicates a perfect match, "),a("code",[t._v("0.0")]),t._v(" no match at all (Meilisearch should not return documents that don't match the query).")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Boolean")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("showRankingScore")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_show_ranking_score"}},[t._v("invalid_search_ranking_score")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-18-showrankingscoredetails"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-18-showrankingscoredetails"}},[t._v("#")]),t._v(" 3.1.18. "),a("code",[t._v("showRankingScoreDetails")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Object")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("false")])])]),t._v(" "),a("p",[t._v("Adds a "),a("a",{attrs:{href:"#32115-rankingscoredetails"}},[a("code",[t._v("_rankingScoreDetails")])]),t._v(" object to each document in the search response, containing information about the score of that document for each applied ranking rule.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Boolean")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("showRankingScoreDetails")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_show_ranking_score_details"}},[t._v("invalid_search_ranking_score_details")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-19-matchingstrategy"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-19-matchingstrategy"}},[t._v("#")]),t._v(" 3.1.19. "),a("code",[t._v("matchingStrategy")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("last")])])]),t._v(" "),a("p",[t._v("Defines which strategy to use to match the query terms within the documents as search results.")]),t._v(" "),a("p",[t._v("Two different strategies are available, "),a("code",[t._v("last")]),t._v(" and "),a("code",[t._v("all")]),t._v(". By default, the "),a("code",[t._v("last")]),t._v(" strategy is chosen.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("String")]),t._v(" and other than "),a("code",[t._v("last")]),t._v(" or "),a("code",[t._v("all")]),t._v(" as a value for "),a("code",[t._v("matchingStrategy")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_matching_strategy"}},[t._v("invalid_search_matching_strategy")]),t._v(" error.")],1)]),t._v(" "),a("h5",{attrs:{id:"_3-1-19-1-last-strategy"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-19-1-last-strategy"}},[t._v("#")]),t._v(" 3.1.19.1. "),a("code",[t._v("last")]),t._v(" strategy")]),t._v(" "),a("p",[t._v("The documents containing ALL the query words (i.e. in the "),a("code",[t._v("q")]),t._v(" parameter) are returned first by Meilisearch. If Meilisearch doesn't have enough documents to fit the requested "),a("code",[t._v("limit")]),t._v(", it iteratively ignores the query words from the last typed word to the first typed word to match more documents.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-19-2-all-strategy"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-19-2-all-strategy"}},[t._v("#")]),t._v(" 3.1.19.2. "),a("code",[t._v("all")]),t._v(" strategy")]),t._v(" "),a("p",[t._v("Only the documents containing ALL the query words (i.e. in the "),a("code",[t._v("q")]),t._v(" parameter) are returned by Meilisearch. If Meilisearch doesn't have enough documents to fit the requested "),a("code",[t._v("limit")]),t._v(", it returns the documents found without trying to match more documents.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-20-attributestosearchon"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-20-attributestosearchon"}},[t._v("#")]),t._v(" 3.1.20. "),a("code",[t._v("attributesToSearchOn")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of String (POST) | String (GET)")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v('["*"]')])])]),t._v(" "),a("p",[t._v("Defines which "),a("code",[t._v("searchableAttributes")]),t._v(" the query will search on.")]),t._v(" "),a("ul",[a("li",[t._v("If "),a("code",[t._v("attributesToSearchOn")]),t._v(" is not set, set to "),a("code",[t._v('["*"]')]),t._v(" or set to "),a("code",[t._v("null")]),t._v(", then the query will search on all "),a("code",[t._v("searchableAttributes")]),t._v(".")]),t._v(" "),a("li",[t._v("Sending the attributes in a different order than the order set in the settings "),a("code",[t._v("searchableAttributes")]),t._v(" doesn't reorder the fields' rank for the "),a("code",[t._v("Attributes")]),t._v(" ranking rule")]),t._v(" "),a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array of String")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("attributesToSearchOn")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_attributes_to_search_on"}},[t._v("invalid_attributes_to_search_on")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending an attribute that is not part of the settings "),a("code",[t._v("searchableAttributes")]),t._v(" list returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_attributes_to_search_on"}},[t._v("invalid_attributes_to_search_on")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-21-vector-experimental"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-21-vector-experimental"}},[t._v("#")]),t._v(" 3.1.21. "),a("code",[t._v("vector")]),t._v(" "),a("code",[t._v("EXPERIMENTAL")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of Float")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: []")])]),t._v(" "),a("p",[t._v("Request the nearest documents based on the query vector embedding given.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array of Float")]),t._v(" or "),a("code",[t._v("null")]),t._v(" as a value for "),a("code",[t._v("vector")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_vector"}},[t._v("invalid_search_vector")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending a value for "),a("code",[t._v("vector")]),t._v(" whose length differs from the documents "),a("code",[t._v("_vectors")]),t._v(" length returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_vector"}},[t._v("invalid_search_vector")]),t._v(" error.")],1)]),t._v(" "),a("h3",{attrs:{id:"_3-2-search-response-properties"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-search-response-properties"}},[t._v("#")]),t._v(" 3.2. Search Response Properties")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Field")]),t._v(" "),a("th",[t._v("Type")]),t._v(" "),a("th",[t._v("Required")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[a("a",{attrs:{href:"#321-hits"}},[a("code",[t._v("hits")])])]),t._v(" "),a("td",[t._v("Array[Hit]")]),t._v(" "),a("td",[t._v("True")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#322-limit"}},[a("code",[t._v("limit")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#323-offset"}},[a("code",[t._v("offset")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#324-estimatedTotalHits"}},[a("code",[t._v("estimatedTotalHits")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#325-page"}},[a("code",[t._v("page")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#326-hitsperpage"}},[a("code",[t._v("hitsPerPage")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#327-totalpages"}},[a("code",[t._v("totalPages")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#328-totalhits"}},[a("code",[t._v("totalHits")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#329-facetdistribution"}},[a("code",[t._v("facetDistribution")])])]),t._v(" "),a("td",[t._v("Object")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3210-facetstats"}},[a("code",[t._v("facetStats")])])]),t._v(" "),a("td",[t._v("Object")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3211-processingtimems"}},[a("code",[t._v("processingTimeMs")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("True")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3212-query"}},[a("code",[t._v("query")])])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("True")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3213-vector"}},[a("code",[t._v("vector")])]),t._v(" "),a("code",[t._v("EXPERIMENTAL")])]),t._v(" "),a("td",[t._v("Array of Float")]),t._v(" "),a("td",[t._v("False")])])])]),t._v(" "),a("h4",{attrs:{id:"_3-2-1-hits"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-hits"}},[t._v("#")]),t._v(" 3.2.1. "),a("code",[t._v("hits")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array[Hit]")]),t._v(" "),a("li",[t._v("Required: True")])]),t._v(" "),a("p",[t._v("Results of the search query as an array of documents.")]),t._v(" "),a("blockquote",[a("p",[t._v("Hit object represents a matched document as a search result.")])]),t._v(" "),a("blockquote",[a("p",[t._v("The search parameters "),a("code",[t._v("attributesToRetrieve")]),t._v(" influence the returned payload for a hit. See "),a("a",{attrs:{href:"#319-attributestoretrieve"}},[t._v("3.1.7. "),a("code",[t._v("attributesToRetrieve")])]),t._v(" section.")])]),t._v(" "),a("p",[t._v("A search result can contain special properties. See "),a("a",{attrs:{href:"#3211-hit-special-properties"}},[t._v("3.2.1.1. "),a("code",[t._v("hit")]),t._v(" Special Properties")]),t._v(" section.")]),t._v(" "),a("h5",{attrs:{id:"_3-2-1-1-hit-special-properties"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-hit-special-properties"}},[t._v("#")]),t._v(" 3.2.1.1. "),a("code",[t._v("hit")]),t._v(" Special Properties")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Field")]),t._v(" "),a("th",[t._v("Type")]),t._v(" "),a("th",[t._v("Required")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[a("a",{attrs:{href:"#32111-geodistance"}},[a("code",[t._v("_geoDistance")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#32112-formatted"}},[a("code",[t._v("_formatted")])])]),t._v(" "),a("td",[t._v("Object")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#32113-matchesposition"}},[a("code",[t._v("_matchesPosition")])])]),t._v(" "),a("td",[t._v("Object")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#32114-rankingscore"}},[a("code",[t._v("_rankingScore")])])]),t._v(" "),a("td",[t._v("Number")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#32115-rankingscoredetails"}},[a("code",[t._v("_rankingScoreDetails")])])]),t._v(" "),a("td",[t._v("Object")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#32116-semanticscore"}},[a("code",[t._v("_semanticScore")])]),t._v(" "),a("code",[t._v("EXPERIMENTAL")])]),t._v(" "),a("td",[t._v("Float")]),t._v(" "),a("td",[t._v("False")])])])]),t._v(" "),a("h6",{attrs:{id:"_3-2-1-1-1-geodistance"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-1-geodistance"}},[t._v("#")]),t._v(" 3.2.1.1.1. "),a("code",[t._v("_geoDistance")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Search queries using "),a("code",[t._v("_geoPoint")]),t._v(" returns a "),a("code",[t._v("_geoDistance")]),t._v(" field containing the distance in meters between the document "),a("code",[t._v("_geo")]),t._v(" coordinates and the specified "),a("code",[t._v("_geoPoint")]),t._v(".")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0059-geo-search.html"}},[t._v("GeoSearch")])],1)]),t._v(" "),a("h6",{attrs:{id:"_3-2-1-1-2-formatted"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-2-formatted"}},[t._v("#")]),t._v(" 3.2.1.1.2. "),a("code",[t._v("_formatted")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Object")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[a("code",[t._v("_formatted")]),t._v(" is an object returned in the search response, only if at least one of the following paramaters has been set in the search query:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("attributesToHighlight")])]),t._v(" "),a("li",[a("code",[t._v("attributesToCrop")])])]),t._v(" "),a("p",[t._v("If "),a("code",[t._v("attributesToHighlight")]),t._v(" and "),a("code",[t._v("attributesToCrop")]),t._v(" are not set, "),a("code",[t._v("_formatted")]),t._v(" is not returned.")]),t._v(" "),a("p",[t._v("This "),a("code",[t._v("_formatted")]),t._v(" object will be present in each returned document in the "),a("code",[t._v("hits")]),t._v(" field.")]),t._v(" "),a("p",[t._v("Example:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToCrop"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Pride and Prejudice"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"_formatted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Pride and Prejudice"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("456")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Le Petit Prince"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"_formatted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"456"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Le Petit Prince"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Which attributes are present in "),a("code",[t._v("_formatted")]),t._v("?")]),t._v(" "),a("p",[a("em",[t._v("Remember the main rule: "),a("code",[t._v("_formatted")]),t._v(" is only present if "),a("code",[t._v("attributesToHighlight")]),t._v(" or "),a("code",[t._v("attributesToCrop")]),t._v(" is set.")])]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("_formatted")]),t._v(" object contains attributes coming from the original document, depending on the parameters the users set during the search query. Indeed, "),a("strong",[a("code",[t._v("_formatted")]),t._v(" contains all the attributes present in "),a("code",[t._v("attributesToRetrieve")]),t._v(", "),a("code",[t._v("attributesToHighlight")]),t._v(", and "),a("code",[t._v("attributesToCrop")]),t._v(" combined")]),t._v(".")]),t._v(" "),a("p",[t._v("Knowing the default value of "),a("code",[t._v("attributesToRetrieve")]),t._v(" is "),a("code",[t._v('["*"]')]),t._v(" (so all the attributes present in "),a("code",[t._v("displayedAttributes")]),t._v("), if no "),a("code",[t._v("attributesToRetrieve")]),t._v(" are set in the search query, "),a("code",[t._v("_formatted")]),t._v(" will return all the "),a("code",[t._v("displayedAttributes")]),t._v(".")]),t._v(" "),a("p",[t._v("Returning attributes in the "),a("code",[t._v("_formatted")]),t._v(" object does not mean these attributes will be necessarily highlighted or cropped, see the next point.")]),t._v(" "),a("p",[t._v("Which attributes are highlighted or cropped in "),a("code",[t._v("_formatted")]),t._v("?")]),t._v(" "),a("p",[t._v("No matter which attributes are retrieved in "),a("code",[t._v("_formatted")]),t._v(' (according to the previous section "Which attributes are present in '),a("code",[t._v("_formatted")]),t._v('?"):')]),t._v(" "),a("ul",[a("li",[t._v("Only the attributes present in "),a("code",[t._v("attributesToHighlight")]),t._v(" are highlighted.")]),t._v(" "),a("li",[t._v("Only the attributes present in "),a("code",[t._v("attributesToCrop")]),t._v(" are cropped.")]),t._v(" "),a("li",[t._v("Attributes present in both are cropped and highlighted at the same time.")])]),t._v(" "),a("p",[t._v("Some edge cases:")]),t._v(" "),a("ul",[a("li",[t._v("If cumulated fields in "),a("code",[t._v("attributesToHighlight")]),t._v(" and "),a("code",[t._v("attributesToCrop")]),t._v(" resolve to only having non-existent fields, "),a("code",[t._v("_formatted")]),t._v(" is not returned.")])]),t._v(" "),a("p",[t._v("Some examples:\n"),a("em",[t._v("The examples work the same with "),a("code",[t._v("attributesToCrop")])])]),t._v(" "),a("p",[t._v("Example 1:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToHighlight"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Hobbit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"_formatted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Hobbit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("-> All the attributes (so "),a("code",[t._v("id")]),t._v(", "),a("code",[t._v("title")]),t._v(" and "),a("code",[t._v("author")]),t._v(") are returned in "),a("code",[t._v("_formatted")]),t._v(" because by default "),a("code",[t._v("attributesToRetrieve")]),t._v(" is set to "),a("code",[t._v('["*"]')]),t._v(".\n-> Only "),a("code",[t._v("title")]),t._v(" is highlighted.")]),t._v(" "),a("p",[t._v("Example 2:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToHighlight"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"*"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Hobbit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"_formatted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Hobbit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("-> "),a("code",[t._v("id")]),t._v(", "),a("code",[t._v("title")]),t._v(" and "),a("code",[t._v("author")]),t._v(" are returned in "),a("code",[t._v("_formatted")]),t._v(" because"),a("code",[t._v("attributesToHighlight")]),t._v(" is set to "),a("code",[t._v('["*"]')]),t._v(" (but also "),a("code",[t._v("attributesToRetrieve")]),t._v(" by default).\n-> Both "),a("code",[t._v("title")]),t._v(" and "),a("code",[t._v("author")]),t._v(" are highlighted because "),a("code",[t._v("attributesToHighlight")]),t._v(" is set to "),a("code",[t._v('["*"]')]),t._v(".")]),t._v(" "),a("p",[t._v("Example 3:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToRetrieve"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToHighlight"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"_formatted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Hobbit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("-> Only "),a("code",[t._v("author")]),t._v(" is returned at the root of the document because defined in the "),a("code",[t._v("attributesToRetrieve")]),t._v(".\n-> Only "),a("code",[t._v("author")]),t._v(" and "),a("code",[t._v("title")]),t._v(" are returned in "),a("code",[t._v("_formatted")]),t._v(" because the addition of "),a("code",[t._v("attributesToRetrieve")]),t._v(" and "),a("code",[t._v("attributesToHighlight")]),t._v(".\n-> Only "),a("code",[t._v("title")]),t._v(" is highlighted because the only one defined in "),a("code",[t._v("attributesToHighlight")]),t._v(".")]),t._v(" "),a("p",[t._v("Example 4:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToRetrieve"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToHighlight"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"*"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"_formatted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Hobbit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("-> No attributes are returned at the root of the document because "),a("code",[t._v("attributesToRetrieve")]),t._v(" is set to "),a("code",[t._v("[]")]),t._v(".\n-> All the attributes are returned in "),a("code",[t._v("_formatted")]),t._v(" because "),a("code",[t._v("attributesToHighlight")]),t._v(" is set to "),a("code",[t._v('["*"]')]),t._v(".\n-> All the attributes are highlighted because "),a("code",[t._v("attributesToHighlight")]),t._v(" is set to "),a("code",[t._v('["*"]')]),t._v(".")]),t._v(" "),a("h6",{attrs:{id:"_3-2-1-1-3-matchesposition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-3-matchesposition"}},[t._v("#")]),t._v(" 3.2.1.1.3. "),a("code",[t._v("_matchesPosition")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Object")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Contains the location of each occurrence of queried terms across all fields. The "),a("code",[t._v("_matchesPosition")]),t._v(" object is added to a search result when the "),a("code",[t._v("showMatchesPosition")]),t._v(" search parameter is specified to true.")]),t._v(" "),a("p",[t._v("The beginning of a matching term within a field is indicated by "),a("code",[t._v("start")]),t._v(", and its "),a("code",[t._v("length")]),t._v(" by length.")]),t._v(" "),a("p",[a("code",[t._v("start")]),t._v(" and "),a("code",[t._v("length")]),t._v(" are measured in bytes and not the number of characters. For example, "),a("code",[t._v("ü")]),t._v(" represents two bytes but one character.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#3116-showmatchesposition"}},[t._v("3.1.14. "),a("code",[t._v("showMatchesPosition")])]),t._v(" section.")])]),t._v(" "),a("h6",{attrs:{id:"_3-2-1-1-4-rankingscore"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-4-rankingscore"}},[t._v("#")]),t._v(" 3.2.1.1.4. "),a("code",[t._v("_rankingScore")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Number")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("The relevancy score of a document relative to the search query. Higher is better.")]),t._v(" "),a("p",[a("code",[t._v("1.0")]),t._v(" indicates a perfect match, "),a("code",[t._v("0.0")]),t._v(" no match at all (Meilisearch should not return documents that don't match the query).")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0195-ranking-score.html#31-ranking-score"}},[t._v("Ranking Score")]),t._v(" for details.")],1)]),t._v(" "),a("h6",{attrs:{id:"_3-2-1-1-5-rankingscoredetails"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-5-rankingscoredetails"}},[t._v("#")]),t._v(" 3.2.1.1.5. "),a("code",[t._v("_rankingScoreDetails")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Object")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("The ranking score of a document per each ranking rule and relative to the search query.")]),t._v(" "),a("p",[t._v("This object features one field for each applied ranking rule, whose values are an object with at least the field "),a("code",[t._v("order")]),t._v(" indicating in which order this ranking rule has been applied.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0195-ranking-score.html#32-ranking-score-details"}},[t._v("Ranking Score details")]),t._v(" for details.")],1)]),t._v(" "),a("h6",{attrs:{id:"_3-2-1-1-6-semanticscore-experimental"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-6-semanticscore-experimental"}},[t._v("#")]),t._v(" 3.2.1.1.6. "),a("code",[t._v("_semanticScore")]),t._v(" "),a("code",[t._v("EXPERIMENTAL")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Float")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Contains the semantic similarity score of the document for a vector search when "),a("code",[t._v("vector")]),t._v(" has been provided. The score is represented as a dot product.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#3118-vector-experimental"}},[t._v("3.1.18 "),a("code",[t._v("vector")])])])]),t._v(" "),a("h4",{attrs:{id:"_3-2-2-limit"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-limit"}},[t._v("#")]),t._v(" 3.2.2. "),a("code",[t._v("limit")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the "),a("code",[t._v("limit")]),t._v(" search parameter used for the query.\nThis field is returned only when:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are used as query parameters.")]),t._v(" "),a("li",[t._v("None of "),a("code",[t._v("limit")]),t._v(", "),a("code",[t._v("offset")]),t._v(", "),a("code",[t._v("page")]),t._v(", "),a("code",[t._v("hitsPerPage")]),t._v(" are used as a query parameter")])]),t._v(" "),a("p",[t._v("See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(" on the different ways of navigating search results.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#315-limit"}},[t._v("3.1.5. "),a("code",[t._v("limit")])]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-3-offset"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-offset"}},[t._v("#")]),t._v(" 3.2.3. "),a("code",[t._v("offset")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the "),a("code",[t._v("offset")]),t._v(" search parameter used for the query.\nThis field is returned only when none of "),a("code",[t._v("page")]),t._v(" and "),a("code",[t._v("hitsPerPage")]),t._v(" are used as a query parameter.")]),t._v(" "),a("p",[t._v("See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("explanation")]),t._v(" on the different ways of navigating search results.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#316-offset"}},[t._v("3.1.6. "),a("code",[t._v("offset")]),t._v(" section")]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-4-estimatedtotalhits"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-estimatedtotalhits"}},[t._v("#")]),t._v(" 3.2.4. "),a("code",[t._v("estimatedTotalHits")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the estimated number of candidates for the search query. This field is returned only when "),a("code",[t._v("limit")]),t._v(" or/and "),a("code",[t._v("offset")]),t._v(" are used as a query parameter.")]),t._v(" "),a("p",[t._v("This field is returned only when:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are used as query parameters.")]),t._v(" "),a("li",[t._v("None of "),a("code",[t._v("limit")]),t._v(", "),a("code",[t._v("offset")]),t._v(", "),a("code",[t._v("page")]),t._v(", "),a("code",[t._v("hitsPerPage")]),t._v(" are used as a query parameter")])]),t._v(" "),a("p",[t._v("See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(" on the different ways of navigation search results.")]),t._v(" "),a("h4",{attrs:{id:"_3-2-5-page"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-5-page"}},[t._v("#")]),t._v(" 3.2.5. "),a("code",[t._v("page")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the current search results page. This field is returned only when the "),a("code",[t._v("page selection")]),t._v(" feature is enabled; see "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(".")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#317-page"}},[t._v("3.1.7. "),a("code",[t._v("page")]),t._v(" section")]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-6-hitsperpage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-6-hitsperpage"}},[t._v("#")]),t._v(" 3.2.6. "),a("code",[t._v("hitsPerPage")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the number of results per page. This field is returned only when the "),a("code",[t._v("page selection")]),t._v(" feature is enabled; see "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(".")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#318-hitsperpage"}},[t._v("3.1.7. "),a("code",[t._v("hitsPerPage")]),t._v(" section")]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-7-totalpages"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-7-totalpages"}},[t._v("#")]),t._v(" 3.2.7. "),a("code",[t._v("totalPages")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the total number of results pages. Calculated using ["),a("code",[t._v("hitsPerPage")]),t._v("]. Both "),a("code",[t._v("totalPages")]),t._v(" and "),a("code",[t._v("totalHits")]),t._v(" are computed until they reach the "),a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#https://github.com/meilisearch/specifications/blob/main/text/157-pagination-setting-api.md#311-maxtotalhits"}},[a("code",[t._v("pagination.maxTotalHits")])]),t._v(" number from the settings.")],1),t._v(" "),a("p",[t._v("This field is returned only when the "),a("code",[t._v("page selection")]),t._v(" feature is enabled; see "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(".")]),t._v(" "),a("h4",{attrs:{id:"_3-2-8-totalhits"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-8-totalhits"}},[t._v("#")]),t._v(" 3.2.8. "),a("code",[t._v("totalHits")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the total number of search results. Both "),a("code",[t._v("totalPages")]),t._v(" and "),a("code",[t._v("totalHits")]),t._v(" are computed until they reach the "),a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#https://github.com/meilisearch/specifications/blob/main/text/157-pagination-setting-api.md#311-maxtotalhits"}},[a("code",[t._v("pagination.maxTotalHits")])]),t._v(" number from the settings.")],1),t._v(" "),a("p",[t._v("This field is returned only when the "),a("code",[t._v("page selection")]),t._v(" feature is enabled, see "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(".")]),t._v(" "),a("h4",{attrs:{id:"_3-2-9-facetdistribution"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-9-facetdistribution"}},[t._v("#")]),t._v(" 3.2.9. "),a("code",[t._v("facetDistribution")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Object")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Added to the search response when "),a("code",[t._v("facets")]),t._v(" is set for a search query. It contains the number of remaining candidates for each specified facet in the "),a("code",[t._v("facets")]),t._v(" search parameter.")]),t._v(" "),a("p",[t._v("If a field distributed as a facet contains no value, it is returned as a "),a("code",[t._v("facetDistribution")]),t._v(" field with an empty object as value.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#314-facets"}},[t._v("3.1.4. "),a("code",[t._v("facets")])]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-10-facetstats"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-10-facetstats"}},[t._v("#")]),t._v(" 3.2.10. "),a("code",[t._v("facetStats")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Object")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("When using the "),a("code",[t._v("facets")]),t._v(" parameter, the distributed facets that contain some numeric values are displayed in a "),a("code",[t._v("facetStats")]),t._v(" object that contains, per facet, the numeric "),a("code",[t._v("min")]),t._v(" and "),a("code",[t._v("max")]),t._v(" values for that facet of all documents matching the search query.")]),t._v(" "),a("p",[t._v("If none of the hits returned by the search query have a numeric value for a facet, this facet is not part of the "),a("code",[t._v("facetStats")]),t._v(" object.")]),t._v(" "),a("p",[t._v("It ignores string values even if parseable. e.g "),a("code",[t._v('"21"')]),t._v(" isn't considered by the engine when computing the "),a("code",[t._v("facetStats")]),t._v(" "),a("code",[t._v("min")]),t._v(" and "),a("code",[t._v("max")]),t._v(".")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#314-facets"}},[t._v("3.1.4. "),a("code",[t._v("facets")])]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-11-processingtimems"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-11-processingtimems"}},[t._v("#")]),t._v(" 3.2.11. "),a("code",[t._v("processingTimeMs")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: True")])]),t._v(" "),a("p",[t._v("Processing time of the search query in "),a("strong",[t._v("milliseconds")]),t._v(".")]),t._v(" "),a("h4",{attrs:{id:"_3-2-12-query"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-12-query"}},[t._v("#")]),t._v(" 3.2.12. "),a("code",[t._v("query")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String")]),t._v(" "),a("li",[t._v("Required: True")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v('""')])])]),t._v(" "),a("p",[t._v("Query originating the response. Equals to the "),a("code",[t._v("q")]),t._v(" search parameter.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#311-q"}},[t._v("3.1.1. "),a("code",[t._v("q")])]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-13-vector-experimental"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-13-vector-experimental"}},[t._v("#")]),t._v(" 3.2.13. "),a("code",[t._v("vector")]),t._v(" "),a("code",[t._v("EXPERIMENTAL")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of Float")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Vector query embedding originating the response. Equals to the "),a("code",[t._v("vector")]),t._v(" search parameter if specified.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#3118-vector-experimental"}},[t._v("3.1.18. "),a("code",[t._v("vector")])])])]),t._v(" "),a("h2",{attrs:{id:"_2-technical-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-details"}},[t._v("#")]),t._v(" 2. Technical Details")]),t._v(" "),a("p",[t._v("n/a")]),t._v(" "),a("h2",{attrs:{id:"_3-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[t._v("#")]),t._v(" 3. Future Possibilities")]),t._v(" "),a("ul",[a("li",[t._v("Add dedicated errors to replace "),a("code",[t._v("bad_request")]),t._v(" error.")])]),t._v(" "),a("h3",{attrs:{id:"_3-1-formatting-search-results"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-formatting-search-results"}},[t._v("#")]),t._v(" 3.1. Formatting Search Results")]),t._v(" "),a("ul",[a("li",[t._v("Replaces "),a("code",[t._v("_matchesPosition")]),t._v(" with chars position instead of bytes. It could also be a "),a("code",[t._v("mode")]),t._v(" to choose "),a("code",[t._v("byte")]),t._v(" or "),a("code",[t._v("char")]),t._v(".")]),t._v(" "),a("li",[t._v("Move "),a("code",[t._v("attributesToHighlight")]),t._v(", "),a("code",[t._v("highlightPreTag")]),t._v(", "),a("code",[t._v("highlightPostTag")]),t._v(", "),a("code",[t._v("attributesToCrop")]),t._v(", "),a("code",[t._v("cropLength")]),t._v(" and "),a("code",[t._v("cropMarker")]),t._v(" into a "),a("code",[t._v("formatter")]),t._v(" objet.")]),t._v(" "),a("li",[t._v("Add an option to only highlight complete query term.")]),t._v(" "),a("li",[t._v("Expose the "),a("code",[t._v("formatter")]),t._v(" resource as an index setting.")]),t._v(" "),a("li",[t._v("Highlight a phrase search as a single highlighted section.")])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[34],{458:function(t,e,a){"use strict";a.r(e);var s=a(62),r=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"search-api"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#search-api"}},[t._v("#")]),t._v(" Search API")]),t._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),a("p",[t._v("The search endpoints retrieve documents from an index. Their returned documents are considered relevant based on the settings of the index and the provided search parameters.")]),t._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),a("p",[t._v("N/A")]),t._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),a("p",[t._v("Meilisearch exposes 2 routes to perform search requests:")]),t._v(" "),a("ul",[a("li",[a("p",[t._v("GET "),a("code",[t._v("indexes/:index_uid/search")])])]),t._v(" "),a("li",[a("p",[t._v("POST "),a("code",[t._v("indexes/:index_uid/search")])])]),t._v(" "),a("li",[a("p",[t._v("🔴 Sending an invalid index uid format for the "),a("code",[t._v(":index_uid")]),t._v(" path parameter returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[t._v("invalid_index_uid")]),t._v(" error.")],1)]),t._v(" "),a("li",[a("p",[t._v("🔴 If the index does not exist, the API returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[t._v("index_not_found")]),t._v(" error.")],1)])]),t._v(" "),a("p",[t._v("If a master key is used to secure a Meilisearch instance, the auth layer returns the following errors:")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Accessing these routes without the "),a("code",[t._v("Authorization")]),t._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Accessing these routes with a key that does not have permissions (i.e. other than the master key) returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),a("p",[a("code",[t._v("POST")]),t._v(" HTTP verb errors:")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Omitting the Content-Type header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[t._v("missing_content_type")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending an empty Content-Type returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[t._v("invalid_content_type")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending a different Content-Type than "),a("code",[t._v("application/json")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[t._v("invalid_content_type")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending an empty payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[t._v("missing_payload")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending an invalid JSON payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[t._v("malformed_payload")]),t._v(" error.")],1)]),t._v(" "),a("h3",{attrs:{id:"_3-1-search-payload-parameters"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-search-payload-parameters"}},[t._v("#")]),t._v(" 3.1. Search Payload Parameters")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Field")]),t._v(" "),a("th",[t._v("Type")]),t._v(" "),a("th",[t._v("Required")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[a("a",{attrs:{href:"#311-q"}},[a("code",[t._v("q")])])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#312-filter"}},[a("code",[t._v("filter")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#313-sort"}},[a("code",[t._v("sort")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#314-facets"}},[a("code",[t._v("facets")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#315-limit"}},[a("code",[t._v("limit")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#316-offset"}},[a("code",[t._v("offset")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#317-page"}},[a("code",[t._v("page")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#318-hitsperpage"}},[a("code",[t._v("hitsPerPage")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#319-attributestoretrieve"}},[a("code",[t._v("attributesToRetrieve")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3110-attributestohighlight"}},[a("code",[t._v("attributesToHighlight")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3111-highlightpretag"}},[a("code",[t._v("highlightPreTag")])])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3112-highlightposttag"}},[a("code",[t._v("highlightPostTag")])])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3113-attributestocrop"}},[a("code",[t._v("attributesToCrop")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3114-croplength"}},[a("code",[t._v("cropLength")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3115-cropmarker"}},[a("code",[t._v("cropMarker")])])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3116-showmatchesposition"}},[a("code",[t._v("showMatchesPosition")])])]),t._v(" "),a("td",[t._v("Boolean")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3117-showrankingscore"}},[a("code",[t._v("showRankingScore")])])]),t._v(" "),a("td",[t._v("Boolean")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3118-showrankingscoredetails"}},[a("code",[t._v("showRankingScoreDetails")])])]),t._v(" "),a("td",[t._v("Boolean")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3119-matchingStrategy"}},[a("code",[t._v("matchingStrategy")])])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3120-attributesToSearchOn"}},[a("code",[t._v("attributesToSearchOn")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3121-vector"}},[a("code",[t._v("vector")])]),t._v(" "),a("code",[t._v("EXPERIMENTAL")])]),t._v(" "),a("td",[t._v("Array of Float")]),t._v(" "),a("td",[t._v("False")])])])]),t._v(" "),a("h4",{attrs:{id:"_3-1-1-q"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-q"}},[t._v("#")]),t._v(" 3.1.1. "),a("code",[t._v("q")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("null")])])]),t._v(" "),a("p",[a("code",[t._v("q")]),t._v(" contains the terms to search within the index documents.")]),t._v(" "),a("blockquote",[a("p",[t._v("When q isn't specified, Meilisearch performs a "),a("strong",[t._v("placeholder search")]),t._v(". A placeholder search returns all searchable documents in an index, modified by any search parameters used and sorted by that index's custom ranking rules. If the index has no sort search parameter or custom ranking rules, the results are returned in the order of their internal database position.")])]),t._v(" "),a("blockquote",[a("p",[t._v("Meilisearch only considers the first ten words of any given search query to deliver a fast search-as-you-type experience.")])]),t._v(" "),a("blockquote",[a("p",[a("code",[t._v("q")]),t._v(" supports the "),a("RouterLink",{attrs:{to:"/specifications/text/0043-phrase-query.html"}},[t._v("Phrase Query")]),t._v(" expression.")],1)]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("String")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("q")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_q"}},[t._v("invalid_search_q")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-2-filter"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-filter"}},[t._v("#")]),t._v(" 3.1.2. "),a("code",[t._v("filter")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String (POST/GET) | Array of (String, Array of String) (POST)")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("[]|null")])])]),t._v(" "),a("p",[a("code",[t._v("filter")]),t._v(" contains a filter expression written as a string or an array of (strings and array of strings). Its purpose is to refine search results by selecting documents that match the given filter and running the search query only on those documents.")]),t._v(" "),a("p",[t._v("Attributes used as filter criteria must be added to the "),a("code",[t._v("filterableAttributes")]),t._v(" list of an index settings. See "),a("RouterLink",{attrs:{to:"/specifications/text/0123-filterable-attributes-setting-api.html"}},[t._v("Filterable Attributes Setting API")]),t._v(".")],1),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("String")]),t._v("(GET/POST), "),a("code",[t._v("Array of (Array of String, String) (POST)")]),t._v(", or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("filter")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_filter"}},[t._v("invalid_search_filter")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending an invalid syntax for "),a("code",[t._v("filter")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_filter"}},[t._v("invalid_search_filter")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending a field not defined as a "),a("code",[t._v("filterableAttributes")]),t._v(" for "),a("code",[t._v("filter")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_filter"}},[t._v("invalid_search_filter")]),t._v(" error.")],1)]),t._v(" "),a("h5",{attrs:{id:"_3-1-2-1-string-syntax"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-string-syntax"}},[t._v("#")]),t._v(" 3.1.2.1. String Syntax")]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-1-grammar"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-1-grammar"}},[t._v("#")]),t._v(" 3.1.2.1.1 Grammar")]),t._v(" "),a("p",[t._v("The grammar of the filter syntax is given below in pseudo-BNF form:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('filter = expression EOF\nexpression = or\nor = and ("OR" WS+ and)*\nand = not ("AND" WS+ not)*\nnot = ("NOT" WS+ not) | primary\nprimary = "(" WS* expression WS* ")" | geoRadius | geoBoundingBox | in | condition | exists | not_exists | to\nin = attribute "IN" WS* "[" value_list "]"\ncondition = attribute ("=" | "!=" | ">" | ">=" | "<" | "<=") value\nexists = attribute "EXISTS"\nnot_exists = attribute "NOT" WS+ "EXISTS"\nto = attribute value "TO" WS+ value\nvalue = WS* ( word | singleQuoted | doubleQuoted) WS+\nattribute = value\nvalue_list = (value ("," value)* ","?)?\nsingleQuoted = "\'" single_quoted_string "\'"\ndoubleQuoted = "\\"" double_quoted_string "\\""\nword = ([a-zA-Z0-9] | "_" | "-" | ".")+\ngeoRadius = "_geoRadius(" WS* float WS* "," WS* float WS* "," float WS* ")"\nfloat = [+-]?[0-9]*("."[0-9]+)?(("E"|"e") [+-]?[0-9]+)?\nWS = \' \' | \'\\t\' | \'\\r\' | \'\\n\'\n')])])]),a("p",[t._v("where "),a("code",[t._v("single_quoted_string")]),t._v(" and "),a("code",[t._v("double_quoted_string")]),t._v(" can contain anything except unescaped single quotes "),a("code",[t._v("'")]),t._v(" and unescaped double quotes "),a("code",[t._v('"')]),t._v(", respectively. Quotes are escaped by a preceding backslash. For example: "),a("code",[t._v('"escaped \\" double quote" "')]),t._v(" and "),a("code",[t._v("escaped \\' single quote")]),t._v(". If a backslash is not followed by the correct quote, it is kept in the string.")]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-2-naming-a-filterable-attribute"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-2-naming-a-filterable-attribute"}},[t._v("#")]),t._v(" 3.1.2.1.2 Naming a filterable attribute")]),t._v(" "),a("p",[t._v("A filterable attribute can appear in a filter by its unquoted name if it only contains ascii alphanumeric characters, dots, hyphens, and underscores.")]),t._v(" "),a("p",[t._v("For example, each filter below selects the documents where the given filterable attribute (on the left side of the equal) is equal to a specific value (on the right side):")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('genres = "film"\ngenre.subgenre = "adventure"\n_geo.lat = 1.23\n101 = "abc"\n')])])]),a("p",[t._v("If the filterable attribute is composed of multiple words or contains other characters, it must be quoted, either using single quotes or double quotes:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('"place of birth" = Berlin\n"∆" = 2.1\n"Friend\'s name" = Albus\n\'opinion on "the best search engine"\' = "meilisearch"\n')])])]),a("p",[t._v("If the filterable attribute contains the same quote character that surrounds the attribute, then this quote character must be escaped by a preceding backslash:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("'Friend\\'s name' = Albus\n")])])]),a("h5",{attrs:{id:"_3-1-2-1-3-naming-the-value-of-a-filterable-attribute"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-3-naming-the-value-of-a-filterable-attribute"}},[t._v("#")]),t._v(" 3.1.2.1.3 Naming the value of a filterable attribute")]),t._v(" "),a("p",[t._v("The grammar for the value of a filterable attribute is the same as the grammar for filterable attributes themselves.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-2-1-4-list-of-supported-operators"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-4-list-of-supported-operators"}},[t._v("#")]),t._v(" 3.1.2.1.4 List of supported operators")]),t._v(" "),a("ul",[a("li",[t._v("Equality: "),a("code",[t._v("attribute = value")])]),t._v(" "),a("li",[t._v("Inequality: "),a("code",[t._v("attribute != value")])]),t._v(" "),a("li",[t._v("Comparison:\n"),a("ul",[a("li",[a("code",[t._v("attribute < value")])]),t._v(" "),a("li",[a("code",[t._v("attribute <= value")])]),t._v(" "),a("li",[a("code",[t._v("attribute > value")])]),t._v(" "),a("li",[a("code",[t._v("attribute >= value")])]),t._v(" "),a("li",[a("code",[t._v("attribute value TO value")])])])]),t._v(" "),a("li",[t._v("Exists:\n"),a("ul",[a("li",[a("code",[t._v("attribute EXISTS")])]),t._v(" "),a("li",[a("code",[t._v("attribute NOT EXISTS")])])])]),t._v(" "),a("li",[t._v("IN:\n"),a("ul",[a("li",[a("code",[t._v("attribute IN[value, value, etc.]")])]),t._v(" "),a("li",[a("code",[t._v("attribute NOT IN[value, value, etc.]")])])])]),t._v(" "),a("li",[t._v("IS EMPTY:\n"),a("ul",[a("li",[a("code",[t._v("attribute IS EMPTY")])]),t._v(" "),a("li",[a("code",[t._v("attribute IS NOT EMPTY")])])])]),t._v(" "),a("li",[t._v("IS NULL:\n"),a("ul",[a("li",[a("code",[t._v("attribute IS NULL")])]),t._v(" "),a("li",[a("code",[t._v("attribute IS NOT NULL")])])])]),t._v(" "),a("li",[t._v("AND: "),a("code",[t._v("filter AND filter")])]),t._v(" "),a("li",[t._v("OR: "),a("code",[t._v("filter OR filter")])]),t._v(" "),a("li",[t._v("NOT: "),a("code",[t._v("NOT filter")])]),t._v(" "),a("li",[t._v("GeoSearch: "),a("code",[t._v("_geoRadius(lat, lng, distance)")])]),t._v(" "),a("li",[t._v("GeoSearch: "),a("code",[t._v("_geoBoundingBox([lat, lng], [lat, lng])")])])]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-5-equality"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-5-equality"}},[t._v("#")]),t._v(" 3.1.2.1.5 Equality")]),t._v(" "),a("p",[t._v("The equality operator, "),a("code",[t._v("=")]),t._v(", selects the documents for which:")]),t._v(" "),a("ol",[a("li",[t._v("the given filterable attribute exists; and")]),t._v(" "),a("li",[t._v("the attribute contains a value that is equal to a specific value")])]),t._v(" "),a("p",[t._v("It is an infix operator that takes an attribute name on the left hand side and a value on the right hand side.")]),t._v(" "),a("p",[t._v("For example, given the documents:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"size"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"size"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"L"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"size"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"small"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"shop_distance"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1.2e+5")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("then the filter:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("size = 1\n")])])]),a("p",[t._v("will select the documents with ids "),a("code",[t._v("0")]),t._v(" and "),a("code",[t._v("1")]),t._v(".")]),t._v(" "),a("p",[t._v("Note that there is no way to specify whether the value on the right hand side of the equality should be interpreted as a string or as a number. Meilisearch will always try to match both. And since unquoted values cannot contain the "),a("code",[t._v("+")]),t._v(" character, it is in fact necessary to quote floating point numbers that have positive exponents:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('shop_distance = "1.2e+5"\n')])])]),a("p",[t._v("will select the document with id "),a("code",[t._v("3")]),t._v(".")]),t._v(" "),a("p",[t._v("Furthermore, there is no way to check whether an attribute has a value that is "),a("code",[t._v("null")]),t._v(" or an array. An attribute whose value is "),a("code",[t._v("null")]),t._v(" or an empty array is considered not to have any value and will therefore never be matched by an equality operator.")]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-6-inequality"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-6-inequality"}},[t._v("#")]),t._v(" 3.1.2.1.6 Inequality")]),t._v(" "),a("p",[t._v("The inequality operator selects all documents that are not selected by the equality operator.\nWith the same documents given as examples to the equality operator, the following filter:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("size != 1\n")])])]),a("p",[t._v("will select the documents with ids "),a("code",[t._v("2")]),t._v(" and "),a("code",[t._v("3")]),t._v(".")]),t._v(" "),a("p",[t._v("Note that "),a("code",[t._v("attribute != value")]),t._v(" is equivalent to "),a("code",[t._v("NOT attribute = value")]),t._v(".")]),t._v(" "),a("p",[t._v("Furthermore, there is no way to write a filter to select documents which contain a value that is different than a given string or number. In the example above, "),a("code",[t._v("size != 1")]),t._v(" did not select the document with id "),a("code",[t._v("1")]),t._v(", even though its "),a("code",[t._v("size")]),t._v(" attribute contains the value "),a("code",[t._v('"L"')]),t._v(", which is different than "),a("code",[t._v("1")]),t._v(".")]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-7-comparison"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-7-comparison"}},[t._v("#")]),t._v(" 3.1.2.1.7 Comparison")]),t._v(" "),a("p",[t._v("The comparison operators select the documents for which:")]),t._v(" "),a("ol",[a("li",[t._v("the filterable attribute exists; and")]),t._v(" "),a("li",[t._v("the attribute contains a number that satisfies the comparison")])]),t._v(" "),a("p",[t._v("Note that the right hand side of the comparison must be a valid floating point number.")]),t._v(" "),a("p",[t._v("For example, with the documents:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"size"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"small"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"blue"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"size"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"size"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Then the following filters will select these documents:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("size > 1 -> selects [1]\nsize >= 1 -> selects [1,2]\nsize < 2 -> selects [0,1]\nsize <= 2 -> selects [0,1,2]\nsize -1 TO 2 -> equivalent to size >= -1 AND size <= 2 -> selects [0,1,2]\n")])])]),a("p",[t._v("And the following filters are invalid:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('size > "small"\nsize "larga" TO "largz"\n')])])]),a("h5",{attrs:{id:"_3-1-2-1-8-combining-filter-conditions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-8-combining-filter-conditions"}},[t._v("#")]),t._v(" 3.1.2.1.8 Combining filter conditions")]),t._v(" "),a("p",[t._v("Multiple filters can be combined together using the operators "),a("code",[t._v("AND")]),t._v(" and "),a("code",[t._v("OR")]),t._v(". These infix operators take two sub-filters as arguments.")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("AND")]),t._v(" operator selects the documents that are selected by both subfilters at the same time. In other words, it is an intersection of the two sets of documents selected by the sub-filters.")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("OR")]),t._v(" operator selects the documents that are selected by either operator. In other words, it is a union of the two sets of documents selected by the sub-filters.")]),t._v(" "),a("p",[t._v("Note that "),a("code",[t._v("AND")]),t._v(" has a higher precedence than "),a("code",[t._v("OR")]),t._v(". Therefore, the following filter:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("x = 1 AND y = 2 OR z = 3\n")])])]),a("p",[t._v("will be interepreted as:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("(x = 1 AND y = 2) OR (z = 3)\n")])])]),a("p",[t._v("With the same documents given as examples for the comparison operators, the following filters will select these documents:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('size = 0 OR size = 1 -> selects [0,1]\nsize = 0 AND (size = 2 OR colour = "blue") -> selects []\nsize = 0 AND size = 2 OR colour = "blue" -> selects [0]\nsize > 5 AND size < 5 -> selects [2]\n')])])]),a("h6",{attrs:{id:"_3-1-2-1-9-negating-a-filter"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-9-negating-a-filter"}},[t._v("#")]),t._v(" 3.1.2.1.9 Negating a filter")]),t._v(" "),a("p",[t._v("The negation operator, "),a("code",[t._v("NOT")]),t._v(", is used to select all documents that are not selected by a sub-filter. It is a prefix operator that takes one argument. Its precedence is higher than both "),a("code",[t._v("AND")]),t._v(" and "),a("code",[t._v("OR")]),t._v(".")]),t._v(" "),a("p",[t._v("With the same documents given as examples for the comparison operators, the following filters will select these documents:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('NOT size = 0 -> selects [1,2]\nNOT (size = 0 OR size = 1) -> selects [2]\nNOT size = 0 OR size = 1 -> selects [1,2]\nNOT (size < 2 AND colour = "blue") -> selects [1,2]\nNOT size < 2 AND colour = "blue" -> selects []\nsize = 0 OR NOT size = 2 -> selects [0,1]\nNOT (NOT size = 0) -> selects [0]\n')])])]),a("h6",{attrs:{id:"_3-1-2-1-10-exists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-10-exists"}},[t._v("#")]),t._v(" 3.1.2.1.10 EXISTS")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("EXISTS")]),t._v(" operator selects the documents for which the filterable attribute exists, even if its value is "),a("code",[t._v("null")]),t._v(" or an empty array. It is a postfix operator that takes an attribute name as argument.")]),t._v(" "),a("p",[t._v("The negated form of "),a("code",[t._v("EXISTS")]),t._v(" can be written in two ways:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("attribute NOT EXISTS\nNOT attribute EXISTS\n")])])]),a("p",[t._v("Both forms are equivalent. They select the documents for which the attribute does not exist.")]),t._v(" "),a("p",[t._v("For example, with the documents:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Then the filter "),a("code",[t._v("colour EXISTS")]),t._v(" selects the document ids "),a("code",[t._v("[0,1]")]),t._v(" while the filter "),a("code",[t._v("colour NOT EXISTS")]),t._v(" or "),a("code",[t._v("NOT colour EXISTS")]),t._v(" selects the document ids "),a("code",[t._v("[2]")]),t._v(".")]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-11-in"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-11-in"}},[t._v("#")]),t._v(" 3.1.2.1.11 IN")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("IN[..]")]),t._v(" operator is a more concise way to combine equality operators. It is a postfix operator that takes an attribute name on the left hand side and an array of values on the right hand side. An array of value is a comma-separated list of values delimited by square brackets.")]),t._v(" "),a("p",[t._v("The two filters below are equivalent:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("attribute IN[value1, value2, value3,]\n\nattribute = value1 OR attribute = value2 OR attribute = value3\n")])])]),a("p",[t._v("In short, "),a("code",[t._v("IN")]),t._v(" selects the documents for which:")]),t._v(" "),a("ol",[a("li",[t._v("the filterable attribute exists; and")]),t._v(" "),a("li",[t._v("the attribute contains a value that is equal to any of the values in the array")])]),t._v(" "),a("p",[t._v("The negated form of "),a("code",[t._v("IN")]),t._v(" can be written in two different ways:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("attribute NOT IN [value1, value2, etc.]\nNOT attribute IN [value1, value2, etc.]\n")])])]),a("p",[t._v("and it is equivalent to:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("attribute != value1 AND attribute != value2 AND ...\n")])])]),a("h6",{attrs:{id:"_3-1-2-1-12-geo-search"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-12-geo-search"}},[t._v("#")]),t._v(" 3.1.2.1.12 Geo Search")]),t._v(" "),a("ul",[a("li",[t._v("The "),a("code",[t._v("_geoRadius")]),t._v(" operator selects the documents whose geographical coordinates fall within a certain range of a given coordinate. See "),a("RouterLink",{attrs:{to:"/specifications/text/0059-geo-search.html"}},[t._v("GeoSearch")]),t._v(" for more information.")],1),t._v(" "),a("li",[t._v("The "),a("code",[t._v("_geoBoundingBox")]),t._v(" operator selects the documents whose geographical coordinates fall within a square described by the given coordinates. See "),a("RouterLink",{attrs:{to:"/specifications/text/0059-geo-search.html"}},[t._v("GeoSearch")]),t._v(" for more information.")],1)]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-12-is-empty"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-12-is-empty"}},[t._v("#")]),t._v(" 3.1.2.1.12 IS EMPTY")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("IS EMPTY")]),t._v(" operator selects the documents for which the filterable attribute exists and is empty. If the attribute doesn't exists then it is not empty and the document will not be returned. It is a postfix operator that takes an attribute name as argument.")]),t._v(" "),a("p",[t._v("The negated form of "),a("code",[t._v("IS EMPTY")]),t._v(" can be written in two ways:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("attribute IS NOT EMPTY\nNOT attribute IS EMPTY\n")])])]),a("p",[t._v("Both forms are equivalent. They select the documents for which the attribute is not empty.")]),t._v(" "),a("p",[t._v("Here is the list of JSON values that are considered empty:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v('""')])]),t._v(" "),a("li",[a("code",[t._v("[]")])]),t._v(" "),a("li",[a("code",[t._v("{}")])])]),t._v(" "),a("p",[t._v("For example, with the documents:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("4")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Then the filter "),a("code",[t._v("colour IS EMPTY")]),t._v(" selects the document ids "),a("code",[t._v("[0,2,3]")]),t._v(" while the filter "),a("code",[t._v("colour IS NOT EMPTY")]),t._v(" or "),a("code",[t._v("NOT colour IS EMPTY")]),t._v(" selects the document ids "),a("code",[t._v("[1,4]")]),t._v(".")]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-13-is-null"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-13-is-null"}},[t._v("#")]),t._v(" 3.1.2.1.13 IS NULL")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("IS NULL")]),t._v(" operator selects the documents for which the filterable attribute exists and is "),a("code",[t._v("null")]),t._v(". If the attribute doesn't exists then it is not "),a("code",[t._v("null")]),t._v(" and the document will not be returned. It is a postfix operator that takes an attribute name as argument.")]),t._v(" "),a("p",[t._v("The negated form of "),a("code",[t._v("IS NULL")]),t._v(" can be written in two ways:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("attribute IS NOT NULL\nNOT attribute IS NULL\n")])])]),a("p",[t._v("Both forms are equivalent. They select the documents for which the attribute is not "),a("code",[t._v("null")]),t._v(".")]),t._v(" "),a("p",[t._v("For example, with the documents:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("4")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Then the filter "),a("code",[t._v("colour IS NULL")]),t._v(" selects the document ids "),a("code",[t._v("[1]")]),t._v(" while the filter "),a("code",[t._v("colour IS NOT NULL")]),t._v(" or "),a("code",[t._v("NOT colour IS NULL")]),t._v(" selects the document ids "),a("code",[t._v("[0,2,3,4]")]),t._v(".")]),t._v(" "),a("h5",{attrs:{id:"_3-1-2-2-array-syntax"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-2-array-syntax"}},[t._v("#")]),t._v(" 3.1.2.2. Array Syntax")]),t._v(" "),a("p",[t._v("The array syntax is an alternative way to combine different filters with "),a("code",[t._v("OR")]),t._v(" and "),a("code",[t._v("AND")]),t._v(" operators.")]),t._v(" "),a("ul",[a("li",[t._v("Elements in the outer array are connected by "),a("code",[t._v("AND")]),t._v(" operators")]),t._v(" "),a("li",[t._v("Elements in the inner arrays are connected by "),a("code",[t._v("OR")]),t._v(" operators")])]),t._v(" "),a("p",[t._v("Example:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"genres = Comedy"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"genres = Romance"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"director = 'Mati Diop'\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("is equivalent to:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"(genres = Comedy OR genres = Romance) AND (director = 'Mati Diop')\"")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"_3-1-3-sort"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-sort"}},[t._v("#")]),t._v(" 3.1.3. "),a("code",[t._v("sort")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of String (POST) | String (GET)")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("[]|null")])])]),t._v(" "),a("p",[a("code",[t._v("sort")]),t._v(" contains a sort expression written as a string or an array of strings. It sorts the search results at query time according to the specified attributes and indicated order.")]),t._v(" "),a("p",[t._v("Attributes used as sort criteria must be added to the `sortableAttributes list of an index settings. See "),a("RouterLink",{attrs:{to:"/specifications/text/0123-sortable-attributes-setting-api.html"}},[t._v("Sortable Attributes Setting API")]),t._v(".")],1),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array of String")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("sort")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_sort"}},[t._v("invalid_search_sort")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending an invalid syntax for "),a("code",[t._v("sort")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_sort"}},[t._v("invalid_search_sort")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending a field not defined as a "),a("code",[t._v("sortableAttributes")]),t._v(" for "),a("code",[t._v("sort")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_sort"}},[t._v("invalid_search_sort")]),t._v(" error.")],1)]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0055-sort.html"}},[t._v("Sort")])],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-4-facets"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-facets"}},[t._v("#")]),t._v(" 3.1.4. "),a("code",[t._v("facets")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of String (POST) | String (GET)")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("[]|null")])])]),t._v(" "),a("p",[a("code",[t._v("facets")]),t._v(" permits to specify facets to be computed for the current search query.")]),t._v(" "),a("p",[t._v("It returns the number of documents matching the current search query for each specified facet.")]),t._v(" "),a("p",[t._v("This parameter can take two values:")]),t._v(" "),a("ul",[a("li",[t._v("An array of attributes: "),a("code",[t._v('facets=["attributeA", "attributeB", …]')])]),t._v(" "),a("li",[t._v("A wildcard "),a("code",[t._v('"*"')]),t._v(" — this returns a count for all facets present in "),a("code",[t._v("filterableAttributes")])])]),t._v(" "),a("p",[t._v("Attributes used in "),a("code",[t._v("facets")]),t._v(" must be added to the "),a("code",[t._v("filterableAttributes")]),t._v(" list of an index settings. See "),a("RouterLink",{attrs:{to:"/specifications/text/0123-filterable-attributes-setting-api.html"}},[t._v("Filterable Attributes Setting API")]),t._v(".")],1),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array of String")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("facets")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_facets"}},[t._v("invalid_search_facets")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending a field not defined as a "),a("code",[t._v("filterableAttributes")]),t._v(" for "),a("code",[t._v("facets")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_facets"}},[t._v("invalid_search_facets")]),t._v(" error.")],1)]),t._v(" "),a("p",[t._v("The distribution of the different facets is returned in the "),a("code",[t._v("facetDistribution")]),t._v(" response parameter.")]),t._v(" "),a("p",[t._v("Statistics are computed and returned within the "),a("code",[t._v("facetStats")]),t._v(" object for distributed facets. See "),a("a",{attrs:{href:"#3210-facetstats"}},[a("code",[t._v("facetStats")])]),t._v(" section.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-5-limit"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-5-limit"}},[t._v("#")]),t._v(" 3.1.5. "),a("code",[t._v("limit")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("20")])])]),t._v(" "),a("p",[t._v("Sets the maximum number of documents to be returned for the search query.")]),t._v(" "),a("p",[t._v("If in addition to either "),a("code",[t._v("page")]),t._v(" and/or "),a("code",[t._v("hitsPerPage")]),t._v(", "),a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are provided as well, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" are ignored. See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("explaination")]),t._v(".")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("limit")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_limit"}},[t._v("invalid_search_limit")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-6-offset"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-6-offset"}},[t._v("#")]),t._v(" 3.1.6. "),a("code",[t._v("offset")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("0")])])]),t._v(" "),a("p",[t._v("Sets the starting point in the search results, effectively skipping over a given number of documents.")]),t._v(" "),a("p",[t._v("If in addition to either "),a("code",[t._v("page")]),t._v(" and/or "),a("code",[t._v("hitsPerPage")]),t._v(", "),a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are provided as well, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" are ignored. See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(".")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("offset")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_offset"}},[t._v("invalid_search_offset")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-7-page"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-7-page"}},[t._v("#")]),t._v(" 3.1.7. "),a("code",[t._v("page")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("null")])])]),t._v(" "),a("p",[t._v("Sets the specific results page to fetch.")]),t._v(" "),a("p",[t._v("By default, page is "),a("code",[t._v("null")]),t._v(", or "),a("code",[t._v("1")]),t._v(" if "),a("code",[t._v("hitsPerPage")]),t._v(" is provided.\nThe first page has a value of "),a("code",[t._v("1")]),t._v(", the second "),a("code",[t._v("2")]),t._v(", etc... When "),a("code",[t._v("0")]),t._v(" is provided as a value, no hits are returned.")]),t._v(" "),a("p",[t._v("When providing "),a("code",[t._v("page")]),t._v(" or "),a("code",[t._v("hitsPerPage")]),t._v(" in the query parameters, the "),a("code",[t._v("page selection")]),t._v(" system is enabled, which makes it possible to navigate through the search results pages. See explanation on the "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[a("code",[t._v("page selection")])]),t._v(".")]),t._v(" "),a("p",[t._v("If in addition to either "),a("code",[t._v("page")]),t._v(" and/or "),a("code",[t._v("hitsPerPage")]),t._v(", "),a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are provided as well, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" are ignored. See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("explanation")]),t._v(".")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("page")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_page"}},[t._v("invalid_search_page")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-8-hitsperpage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-hitsperpage"}},[t._v("#")]),t._v(" 3.1.8. "),a("code",[t._v("hitsPerPage")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("null")])])]),t._v(" "),a("p",[t._v("Sets the number of results returned for a query.")]),t._v(" "),a("p",[t._v("By default, "),a("code",[t._v("hitsPerPage")]),t._v(" is "),a("code",[t._v("null")]),t._v(", or "),a("code",[t._v("20")]),t._v(" if "),a("code",[t._v("page")]),t._v(" is provided. When "),a("code",[t._v("0")]),t._v(" is provided as a value, no hits are returned.")]),t._v(" "),a("p",[t._v("When providing "),a("code",[t._v("page")]),t._v(" or "),a("code",[t._v("hitsPerPage")]),t._v(" in the query parameters, the "),a("code",[t._v("page selection")]),t._v(" system is enabled, which makes it possible to navigate through the search results pages. See explanation on the "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[a("code",[t._v("page selection")])]),t._v(".")]),t._v(" "),a("p",[t._v("If in addition to either "),a("code",[t._v("page")]),t._v(" and/or "),a("code",[t._v("hitsPerPage")]),t._v(", "),a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are provided as well, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" are ignored. See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("explaination")]),t._v(".")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("hitsPerPage")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_hits_per_page"}},[t._v("invalid_search_hits_per_page")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-8-1-navigating-search-results-by-page-selection"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-1-navigating-search-results-by-page-selection"}},[t._v("#")]),t._v(" 3.1.8.1. Navigating search results by page selection")]),t._v(" "),a("p",[t._v("By default, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" are used to navigate search results. While being performant, it lacks exhaustiveness to create a seamless page selection navigation. Upon using "),a("code",[t._v("limit")]),t._v("/"),a("code",[t._v("offset")]),t._v(", "),a("code",[t._v("estimatedTotalHits")]),t._v(" is returned, which provides a rough estimation of how many hits may be candidates for a given request. See "),a("a",{attrs:{href:"#31811-limitoffset-usage"}},[a("code",[t._v("limit")]),t._v("/"),a("code",[t._v("offset")]),t._v(" usage")]),t._v(" for further explanation.")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("page selection")]),t._v(" system provides an alternative that tackles the above-mentioned issue when reliable information is needed to navigate results with a page selector. e.g. A page selector component "),a("code",[t._v("<< < 1, 2, 3, ...14 > >>")]),t._v(". Nonetheless, it's considered less performant on a larger number of results as the engine needs to compute the "),a("code",[t._v("totalHits")]),t._v(" exhaustively.\nWith this page selection system, it is possible to jump from one page to another using the "),a("code",[t._v("page")]),t._v(" parameter and decide how many results should be returned per page with the "),a("code",[t._v("hitsPerPage")]),t._v(" parameter. See "),a("a",{attrs:{href:"#31812-pagehitsperpage-usage"}},[a("code",[t._v("page")]),t._v("/"),a("code",[t._v("hitsPerPage")]),t._v(" usage")]),t._v(" for further explanation.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-8-1-1-limit-offset-usage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-1-1-limit-offset-usage"}},[t._v("#")]),t._v(" 3.1.8.1.1. Limit/offset usage")]),t._v(" "),a("p",[t._v("When either "),a("code",[t._v("limit")]),t._v(" or "),a("code",[t._v("offset")]),t._v(" is specified or when neither "),a("code",[t._v("limit")]),t._v(", "),a("code",[t._v("offset")]),t._v(", "),a("code",[t._v("page")]),t._v(" and "),a("code",[t._v("hitsPerPage")]),t._v(" are specified, the response object contains the related fields:")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"#324-estimatedtotalhits"}},[a("code",[t._v("estimatedTotalHits")])])]),t._v(" "),a("li",[a("a",{attrs:{href:"#322-limit"}},[a("code",[t._v("limit")])])]),t._v(" "),a("li",[a("a",{attrs:{href:"#323-offset"}},[a("code",[t._v("offset")])])])]),t._v(" "),a("p",[t._v("If in addition to "),a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(", either "),a("code",[t._v("page")]),t._v(" or "),a("code",[t._v("hitsPerPage")]),t._v(" is also provided, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" parameters are ignored.")]),t._v(" "),a("p",[t._v("For example, given the following query parameters:")]),t._v(" "),a("ul",[a("li",[t._v("limit: 10")]),t._v(" "),a("li",[t._v("offset: 1")])]),t._v(" "),a("p",[t._v("The response objects contain these specific fields:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... 10 hits")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... other fields")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"limit"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"offset"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"estimatedTotalHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1345")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("For example, on a query with no query parameters:")]),t._v(" "),a("p",[t._v("The response objects contain these specific fields:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... 10 hits")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... other fields")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"limit"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"offset"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"estimatedTotalHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1345")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h5",{attrs:{id:"_3-1-8-1-2-page-hitsperpage-usage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-1-2-page-hitsperpage-usage"}},[t._v("#")]),t._v(" 3.1.8.1.2 page/hitsPerPage usage")]),t._v(" "),a("p",[t._v("As soon as either "),a("code",[t._v("page")]),t._v(" or "),a("code",[t._v("hitsPerPage")]),t._v(" is used as a query parameter, in the response object, "),a("code",[t._v("limit")]),t._v(", "),a("code",[t._v("offset")]),t._v(", and "),a("code",[t._v("estimatedTotalHits")]),t._v(" are removed and page selection related fields are returned:")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"#326-hitsperpage"}},[a("code",[t._v("hitsPerPage")])]),t._v(": number of results per page.")]),t._v(" "),a("li",[a("a",{attrs:{href:"#325-page"}},[a("code",[t._v("page")])]),t._v(": current search results page. The counting starts at "),a("code",[t._v("1")]),t._v(".")]),t._v(" "),a("li",[a("a",{attrs:{href:"#327-totalpages"}},[a("code",[t._v("totalPages")])]),t._v(": total number of results pages. Calculated using "),a("code",[t._v("hitsPerPage")]),t._v(" value.")]),t._v(" "),a("li",[a("a",{attrs:{href:"#328-totalhits"}},[a("code",[t._v("totalHits")])]),t._v(": total number of search results.")])]),t._v(" "),a("p",[t._v("Both "),a("code",[t._v("totalPages")]),t._v(" and "),a("code",[t._v("totalHits")]),t._v(" are computed until they reach the "),a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#https://github.com/meilisearch/specifications/blob/main/text/157-pagination-setting-api.md#311-maxtotalhits"}},[a("code",[t._v("pagination.maxTotalHits")])]),t._v(" number from the settings.")],1),t._v(" "),a("p",[t._v("If in addition to either "),a("code",[t._v("page")]),t._v(" and/or "),a("code",[t._v("hitsPerPage")]),t._v(", "),a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are provided as well, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" are ignored.")]),t._v(" "),a("p",[t._v("For example, given the following query parameters:")]),t._v(" "),a("ul",[a("li",[t._v("page: 2")]),t._v(" "),a("li",[t._v("hitsPerPage: 10")])]),t._v(" "),a("p",[t._v("The response objects contain these specific fields:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... 10 hits")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... other fields")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"page"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hitsPerPage"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2100")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalPages"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("210")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("For example, given the following query parameters:")]),t._v(" "),a("ul",[a("li",[t._v("page: 2")]),t._v(" "),a("li",[t._v("hitsPerPage: 10")]),t._v(" "),a("li",[t._v("limit: 1")])]),t._v(" "),a("p",[t._v("The response objects contain these specific fields:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... 10 hits")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... other fields")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"page"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hitsPerPage"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2100")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalPages"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("210")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("For example, given the following query parameters:")]),t._v(" "),a("ul",[a("li",[t._v("page: 0")]),t._v(" "),a("li",[t._v("hitsPerPage: 10")])]),t._v(" "),a("p",[t._v("The response objects contain these specific fields:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... other fields")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"page"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hitsPerPage"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2100")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalPages"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("210")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"_3-1-9-attributestoretrieve"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-9-attributestoretrieve"}},[t._v("#")]),t._v(" 3.1.9. "),a("code",[t._v("attributesToRetrieve")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of String (POST) | String (GET)")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v('["*"]')]),t._v(", meaning all the attributes")])]),t._v(" "),a("p",[t._v("Configures which attributes will be retrieved in the returned documents.")]),t._v(" "),a("p",[t._v("If no value is specified, the default value of "),a("code",[t._v("attributesToRetrieve")]),t._v(" is used ("),a("code",[t._v('["*"]')]),t._v("). This corresponds to the "),a("code",[t._v("displayedAttributes")]),t._v(" index setting, which by default contains all attributes found in the documents.")]),t._v(" "),a("blockquote",[a("p",[t._v("If an attribute is missing from "),a("code",[t._v("displayedAttributes")]),t._v(" index setting, "),a("code",[t._v("attributesToRetrieve")]),t._v(" silently ignore it, and the field doesn't appear in the returned search results.")])]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array of String")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("attributesToRetrieve")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_attributes_to_retrieve"}},[t._v("invalid_search_attributes_to_retrieve")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-10-attributestohighlight"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-10-attributestohighlight"}},[t._v("#")]),t._v(" 3.1.10. "),a("code",[t._v("attributesToHighlight")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of String (POST) | String(GET)")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("[]|null")])])]),t._v(" "),a("p",[t._v("Configures which fields may have highlighted parts, given that they match the requested query terms (i.e. the terms in the "),a("a",{attrs:{href:"#311-q"}},[a("code",[t._v("q")])]),t._v(" search parameter). Pre/post highlighting tags are applied around each word corresponding to a query term.")]),t._v(" "),a("p",[t._v("If "),a("code",[t._v("attributesToHighlight")]),t._v(" is present in the search query, the search results will include a "),a("code",[t._v("_formatted")]),t._v(" object containing the attributes and their highlighted parts. For more detailed regarding the "),a("code",[t._v("_formatted")]),t._v(" behavior, see the "),a("a",{attrs:{href:"#32112-formatted"}},[t._v("3.2.1.1.2. "),a("code",[t._v("_formatted")])]),t._v(" section.")]),t._v(" "),a("p",[t._v("If "),a("code",[t._v('"*"')]),t._v(" is provided as a value ("),a("code",[t._v('attributesToHighlight=["*"]')]),t._v("), all the attributes present in "),a("code",[t._v("displayedAttributes")]),t._v(" setting will be highlighted.")]),t._v(" "),a("p",[t._v("Highlighted parts are surrounded by the "),a("a",{attrs:{href:"3111-highlightpretag"}},[a("code",[t._v("highlightPreTag")])]),t._v(" and "),a("a",{attrs:{href:"#3112-highlightposttag"}},[a("code",[t._v("highlightPostTag")])]),t._v(" parameters.")]),t._v(" "),a("p",[a("code",[t._v("attributesToHighlight")]),t._v(" only works on values of the following types: "),a("code",[t._v("string")]),t._v(", "),a("code",[t._v("number")]),t._v(", "),a("code",[t._v("array")]),t._v(", "),a("code",[t._v("object")]),t._v(". When highlighted, number attributes are transformed to string.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array[String]")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("attributesToHighlight")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_attributes_to_highlight"}},[t._v("invalid_search_attributes_to_highlight")]),t._v(" error.")],1)]),t._v(" "),a("h5",{attrs:{id:"_3-1-10-1-searchableattributes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-10-1-searchableattributes"}},[t._v("#")]),t._v(" 3.1.10.1. searchableAttributes")]),t._v(" "),a("p",[t._v("Attributes not defined in the "),a("code",[t._v("searchableAttributes")]),t._v(" index setting are also highlighted if assigned to "),a("code",[t._v("attributesToHighlight")]),t._v(".")]),t._v(" "),a("h5",{attrs:{id:"_3-1-10-2-stopwords"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-10-2-stopwords"}},[t._v("#")]),t._v(" 3.1.10.2. stopWords")]),t._v(" "),a("p",[t._v("Attributes defined in the "),a("code",[t._v("stopWords")]),t._v(" index setting are also highlighted if matched.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-10-3-tokenizer-separators"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-10-3-tokenizer-separators"}},[t._v("#")]),t._v(" 3.1.10.3. Tokenizer Separators")]),t._v(" "),a("p",[t._v("Tokenizer separators are not highlighted.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-10-4-synonyms"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-10-4-synonyms"}},[t._v("#")]),t._v(" 3.1.10.4. synonyms")]),t._v(" "),a("p",[t._v("Synonyms are also highlighted.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-11-highlightpretag"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-11-highlightpretag"}},[t._v("#")]),t._v(" 3.1.11. "),a("code",[t._v("highlightPreTag")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v('""')])])]),t._v(" "),a("p",[t._v("Specifies the string to put "),a("strong",[t._v("before")]),t._v(" every highlighted query terms.")]),t._v(" "),a("p",[t._v("This parameter is applied to the fields configured in "),a("code",[t._v("attributesToHighlight")]),t._v(". If there are none, this parameter has no effect. See "),a("a",{attrs:{href:"3110-attributestohighlight"}},[t._v("3.1.10. "),a("code",[t._v("attributesToHighlight")])]),t._v(" section.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("String")]),t._v(" for "),a("code",[t._v("highlightPreTag")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_highlight_pre_tag"}},[t._v("invalid_search_highlight_pre_tag")]),t._v(" error.")],1)]),t._v(" "),a("p",[t._v("If "),a("code",[t._v("attributesToHighlight")]),t._v(" is omitted while "),a("code",[t._v("highlightPreTag")]),t._v(" is specified, there is no error.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-12-highlightposttag"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-12-highlightposttag"}},[t._v("#")]),t._v(" 3.1.12. "),a("code",[t._v("highlightPostTag")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v('""')])])]),t._v(" "),a("p",[t._v("Specifies the string to put "),a("strong",[t._v("after")]),t._v(" the highlighted query terms.")]),t._v(" "),a("p",[t._v("This parameter is applied to the fields from "),a("code",[t._v("attributesToHighlight")]),t._v(". If there are none, this parameter has no effect. See "),a("a",{attrs:{href:"3110-attributestohighlight"}},[t._v("3.1.10. "),a("code",[t._v("attributesToHighlight")])]),t._v(" section.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("String")]),t._v(" for "),a("code",[t._v("highlightPostTag")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_highlight_post_tag"}},[t._v("invalid_search_highlight_post_tag")]),t._v(" error.")],1)]),t._v(" "),a("p",[t._v("If "),a("code",[t._v("attributesToHighlight")]),t._v(" is omitted while "),a("code",[t._v("highlightPostTag")]),t._v(" is specified, there is no error.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-13-attributestocrop"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-13-attributestocrop"}},[t._v("#")]),t._v(" 3.1.13. "),a("code",[t._v("attributesToCrop")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array[String]|String")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("[]|null")])])]),t._v(" "),a("p",[t._v("Defines document attributes to be cropped. Cropped attributes have their values shortened around query terms.")]),t._v(" "),a("p",[t._v("If "),a("code",[t._v("attributesToCrop")]),t._v(" is present in the search query, the search results will include a "),a("code",[t._v("_formatted")]),t._v(" object containing the attributes and their cropped parts. For more detailed regarding the "),a("code",[t._v("_formatted")]),t._v(" behavior, see the "),a("a",{attrs:{href:"#32112-formatted"}},[t._v("3.2.1.1.2. "),a("code",[t._v("_formatted")])]),t._v(" section.")]),t._v(" "),a("p",[t._v("If "),a("code",[t._v('"*"')]),t._v(" is provided as a value ("),a("code",[t._v('attributesToCrop=["*"]')]),t._v("), all the attributes present in "),a("code",[t._v("displayedAttributes")]),t._v(" setting will be cropped.")]),t._v(" "),a("p",[t._v("The number of words contained in the cropped value is defined by the "),a("code",[t._v("cropLength")]),t._v(" parameter. See "),a("a",{attrs:{href:"#3114-croplength"}},[t._v("3.1.1.14. "),a("code",[t._v("cropLength")])]),t._v(" section.")]),t._v(" "),a("p",[t._v("The value of "),a("code",[t._v("cropLength")]),t._v(" can be customized per attribute. See "),a("a",{attrs:{href:"#31121-custom-croplength-defined-per-attribute"}},[t._v("3.1.12.1. Custom "),a("code",[t._v("cropLength")]),t._v(" Defined Per Cropped Attribute")]),t._v(" section.")]),t._v(" "),a("p",[t._v("The engine adds a marker by default in front of and/or behind the part selected by the cropper. This marker is customizable. See "),a("a",{attrs:{href:"#3115-cropmarker"}},[t._v("3.1.13. "),a("code",[t._v("cropMarker")])]),t._v(" section.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array[String]")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("attributesToCrop")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_attributes_to_crop"}},[t._v("invalid_search_attributes_to_crop")]),t._v(" error.")],1)]),t._v(" "),a("h5",{attrs:{id:"_3-1-13-2-searchableattributes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-13-2-searchableattributes"}},[t._v("#")]),t._v(" 3.1.13.2. searchableAttributes")]),t._v(" "),a("p",[t._v("Attributes configured in "),a("code",[t._v("attributesToCrop")]),t._v(" are cropped even if not present in the "),a("code",[t._v("searchableAttributes")]),t._v(" index setting.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-13-3-stopwords"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-13-3-stopwords"}},[t._v("#")]),t._v(" 3.1.13.3. stopWords")]),t._v(" "),a("p",[t._v("Terms defined in the "),a("code",[t._v("stopWords")]),t._v(" index setting are counted as words regarding "),a("code",[t._v("cropLength")]),t._v(".")]),t._v(" "),a("h5",{attrs:{id:"_3-1-13-3-tokenizer-separators"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-13-3-tokenizer-separators"}},[t._v("#")]),t._v(" 3.1.13.3. Tokenizer Separators")]),t._v(" "),a("p",[t._v("Tokenizer separators aren't counted as words regarding "),a("code",[t._v("cropLength")]),t._v(".")]),t._v(" "),a("h4",{attrs:{id:"_3-1-14-croplength"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-14-croplength"}},[t._v("#")]),t._v(" 3.1.14. "),a("code",[t._v("cropLength")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("10")])])]),t._v(" "),a("p",[t._v("Sets the total number of "),a("strong",[t._v("words")]),t._v(" to keep for the cropped part of an attribute specified in the "),a("code",[t._v("attributesToCrop")]),t._v(" parameter. It means that if "),a("code",[t._v("10")]),t._v(" is set for "),a("code",[t._v("cropLength")]),t._v(", the cropped part returned in "),a("code",[t._v("_formatted")]),t._v(" will only be 10 words long.")]),t._v(" "),a("p",[t._v("This parameter is applied to the fields from "),a("code",[t._v("attributesToCrop")]),t._v(". If there are none, this parameter has no effect. See "),a("a",{attrs:{href:"#3113-attributestocrop"}},[t._v("3.1.13. "),a("code",[t._v("attributesToCrop")])]),t._v(" section.")]),t._v(" "),a("p",[t._v("Sending a "),a("code",[t._v("0")]),t._v(" value deactivates the cropping unless a custom crop length is defined for an attribute inside "),a("code",[t._v("attributesToCrop")]),t._v(".")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("cropLength")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_crop_length"}},[t._v("invalid_search_crop_length")]),t._v(" error.")],1)]),t._v(" "),a("h5",{attrs:{id:"_3-1-14-1-custom-croplength-defined-per-attribute"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-14-1-custom-croplength-defined-per-attribute"}},[t._v("#")]),t._v(" 3.1.14.1. Custom "),a("code",[t._v("cropLength")]),t._v(" Defined Per Attribute.")]),t._v(" "),a("p",[t._v("Optionally, indicating a custom crop length for any of the listed attributes is possible:")]),t._v(" "),a("p",[a("code",[t._v('"attributesToCrop":["attributeNameA:15", "attributeNameB:30"]')])]),t._v(" "),a("p",[t._v("A custom crop length set in this way has priority over the "),a("code",[t._v("cropLength")]),t._v(" parameter.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-14-2-examples"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-14-2-examples"}},[t._v("#")]),t._v(" 3.1.14.2 Examples")]),t._v(" "),a("h6",{attrs:{id:"_3-1-14-1-1-extending-around"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-14-1-1-extending-around"}},[t._v("#")]),t._v(" 3.1.14.1.1. Extending around")]),t._v(" "),a("p",[t._v("Given an attribute defined in "),a("code",[t._v("attributesToCrop")]),t._v(" containing:")]),t._v(" "),a("p",[a("code",[t._v('"In his ravenous hatred he found no peace, and with boiling blood he scoured the umbral plains, seeking vengence afgainst the dark lords who had robbed him."')])]),t._v(" "),a("p",[t._v("With "),a("code",[t._v("croplength")]),t._v(" defined as "),a("code",[t._v("5")]),t._v(" and "),a("code",[t._v("q")]),t._v(" defined as "),a("code",[t._v("boiling blood")]),t._v(", the cropped value will be:")]),t._v(" "),a("p",[a("code",[t._v('"…and with boiling blood he…"')])]),t._v(" "),a("p",[t._v("Cropped query terms are counted as a word regarding "),a("code",[t._v("cropLength")]),t._v(".")]),t._v(" "),a("p",[t._v("Sending more query terms than the "),a("code",[t._v("cropLength")]),t._v(" value has no impact. The cropped part will contain the "),a("code",[t._v("cropLength")]),t._v(" number.")]),t._v(" "),a("h6",{attrs:{id:"_3-1-14-1-2-keeping-a-phrase-context"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-14-1-2-keeping-a-phrase-context"}},[t._v("#")]),t._v(" 3.1.14.1.2. Keeping a phrase context")]),t._v(" "),a("p",[t._v("After Meilisearch has chosen the best possible match window (some number of words < "),a("code",[t._v("cropLength")]),t._v("), it will add words from before or after the match window until the total number is equal to "),a("code",[t._v("cropLength")]),t._v(". In doing so, it will attempt to add context to the match window by choosing words from the same sentence(s) where the match window occurs.")]),t._v(" "),a("p",[t._v("For instance, for the matching word "),a("code",[t._v("Split")]),t._v(" the text:")]),t._v(" "),a("p",[a("code",[t._v('"Natalie risk her future. Split The World is a book written by Emily Henry. I never read it."')])]),t._v(" "),a("p",[t._v("will be cropped like:")]),t._v(" "),a("p",[a("code",[t._v("…Split The World is a book written by Emily Henry…")])]),t._v(" "),a("p",[t._v("and not like:")]),t._v(" "),a("p",[a("code",[t._v("Natalie risk her future. Split The World is a book…")])]),t._v(" "),a("h4",{attrs:{id:"_3-1-15-cropmarker"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-15-cropmarker"}},[t._v("#")]),t._v(" 3.1.15. "),a("code",[t._v("cropMarker")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v('"…"')]),t._v(" (U+2026)")])]),t._v(" "),a("p",[t._v("Sets which string to add before and/or after the cropped text. See "),a("a",{attrs:{href:"#3113-attributestocrop"}},[t._v("3.1.13. "),a("code",[t._v("attributesToCrop")])]),t._v(" section.")]),t._v(" "),a("p",[t._v("The specified crop marker is applied by following rules outline in section "),a("a",{attrs:{href:"#3115-cropmarker"}},[t._v("3.1.15.1. Applying "),a("code",[t._v("cropMarker")])]),t._v(".")]),t._v(" "),a("p",[t._v("Specifying "),a("code",[t._v("cropMarker")]),t._v(" to "),a("code",[t._v('""')]),t._v(" or "),a("code",[t._v("null")]),t._v(" implies that no marker will be applied to the cropped part.")]),t._v(" "),a("p",[t._v("This parameter is applied to the fields configured in "),a("code",[t._v("attributesToCrop")]),t._v(". If there are none, this parameter has no effect. See "),a("a",{attrs:{href:"#3113-attributestocrop"}},[t._v("3.1.13. "),a("code",[t._v("attributesToCrop")])]),t._v(" section.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("String")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("cropMarker")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_crop_marker"}},[t._v("invalid_search_crop_marker")]),t._v(" error.")],1)]),t._v(" "),a("h5",{attrs:{id:"_3-1-15-1-applying-cropmarker"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-15-1-applying-cropmarker"}},[t._v("#")]),t._v(" 3.1.15.1. Applying "),a("code",[t._v("cropMarker")])]),t._v(" "),a("h6",{attrs:{id:"_3-1-15-1-1-matched-part-to-be-cropped"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-15-1-1-matched-part-to-be-cropped"}},[t._v("#")]),t._v(" 3.1.15.1.1. Matched Part To Be Cropped")]),t._v(" "),a("p",[t._v("The cropping algorithm tries to match the window with the highest density of query terms within the "),a("code",[t._v("cropLength")]),t._v(" limit.")]),t._v(" "),a("p",[t._v("The cropping algorithm tries to find the crop window that contains the most relevant matches.")]),t._v(" "),a("ol",[a("li",[t._v("That has the highest count of unique matches")])]),t._v(" "),a("p",[t._v("For example, for the query terms "),a("code",[t._v("split the world")]),t._v(", then the interval "),a("code",[t._v("the split the split the")]),t._v(" has "),a("code",[t._v("5")]),t._v(" matches but only "),a("code",[t._v("2")]),t._v(" unique matches ("),a("code",[t._v("1")]),t._v(" for "),a("code",[t._v("split")]),t._v(" and "),a("code",[t._v("1")]),t._v(" for "),a("code",[t._v("the")]),t._v(") where the interval "),a("code",[t._v("split of the world")]),t._v(" has "),a("code",[t._v("3")]),t._v(" matches and "),a("code",[t._v("3")]),t._v(" unique matches. So the interval "),a("code",[t._v("split of the world")]),t._v(" is considered better.")]),t._v(" "),a("ol",{attrs:{start:"2"}},[a("li",[t._v("That have the minimum distance between matches")])]),t._v(" "),a("p",[t._v("For example, for the query terms "),a("code",[t._v("split the world")]),t._v(", then the interval "),a("code",[t._v("split of the world")]),t._v(" has a distance of "),a("code",[t._v("3")]),t._v(" ("),a("code",[t._v("2")]),t._v(" between "),a("code",[t._v("split")]),t._v(" and "),a("code",[t._v("the")]),t._v(", and "),a("code",[t._v("1")]),t._v(" between "),a("code",[t._v("the")]),t._v(" and "),a("code",[t._v("world")]),t._v(") where the interval "),a("code",[t._v("split the world")]),t._v(" has a distance of "),a("code",[t._v("2")]),t._v(". So the interval "),a("code",[t._v("split the world")]),t._v(" is considered better.")]),t._v(" "),a("ol",{attrs:{start:"3"}},[a("li",[t._v("That have the highest count of ordered matches")])]),t._v(" "),a("p",[t._v("For example, for the query terms "),a("code",[t._v("split the world")]),t._v(", then the interval "),a("code",[t._v("the world split")]),t._v(" has "),a("code",[t._v("2")]),t._v(" ordered words where the interval "),a("code",[t._v("split the world")]),t._v(" has "),a("code",[t._v("3")]),t._v(". So the interval "),a("code",[t._v("split the world")]),t._v(" is considered better.")]),t._v(" "),a("p",[t._v("Only one cropped part from an attribute is returned.")]),t._v(" "),a("p",[t._v("If no part is found when selecting a part to be cropped, the returned value in "),a("code",[t._v("_formatted")]),t._v(" will start at the beginning of the attribute and include a number of words equal to "),a("code",[t._v("cropLength")]),t._v(".")]),t._v(" "),a("h6",{attrs:{id:"_3-1-15-1-2-positioning-markers"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-15-1-2-positioning-markers"}},[t._v("#")]),t._v(" 3.1.15.1.2. Positioning Markers")]),t._v(" "),a("p",[t._v("If the cropped part has been matched against query terms and contains the beginning of the attribute to be cropped, the "),a("code",[t._v("cropMarker")]),t._v(" is not placed to the left of the cropped part.")]),t._v(" "),a("p",[t._v("If the cropped part has been matched against query terms and contains the end of the attribute to be cropped, the "),a("code",[t._v("cropMarker")]),t._v(" is not placed to the right of the cropped part.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-16-showmatchesposition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-16-showmatchesposition"}},[t._v("#")]),t._v(" 3.1.16. "),a("code",[t._v("showMatchesPosition")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Boolean")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("false")])])]),t._v(" "),a("p",[t._v("Adds a "),a("code",[t._v("_matchesPosition")]),t._v(" object to the search response that contains the location of each occurrence of queried terms across all fields. The given positions are in bytes.")]),t._v(" "),a("p",[t._v("It's useful when more control is needed than offered by the built-in highlighting/cropping features.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Boolean")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("showMatchesPosition")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_show_matches_position"}},[t._v("invalid_search_show_matches_position")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-17-showrankingscore"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-17-showrankingscore"}},[t._v("#")]),t._v(" 3.1.17. "),a("code",[t._v("showRankingScore")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Boolean")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("false")])])]),t._v(" "),a("p",[t._v("Adds a "),a("a",{attrs:{href:"#32114-rankingscore"}},[a("code",[t._v("_rankingScore")])]),t._v(" number to each document in the search response, representing the relevancy score of a document according to the applied ranking rules and relative to a search query. Higher is better.")]),t._v(" "),a("p",[a("code",[t._v("1.0")]),t._v(" indicates a perfect match, "),a("code",[t._v("0.0")]),t._v(" no match at all (Meilisearch should not return documents that don't match the query).")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Boolean")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("showRankingScore")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_show_ranking_score"}},[t._v("invalid_search_ranking_score")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-18-showrankingscoredetails"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-18-showrankingscoredetails"}},[t._v("#")]),t._v(" 3.1.18. "),a("code",[t._v("showRankingScoreDetails")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Object")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("false")])])]),t._v(" "),a("p",[t._v("Adds a "),a("a",{attrs:{href:"#32115-rankingscoredetails"}},[a("code",[t._v("_rankingScoreDetails")])]),t._v(" object to each document in the search response, containing information about the score of that document for each applied ranking rule.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Boolean")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("showRankingScoreDetails")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_show_ranking_score_details"}},[t._v("invalid_search_ranking_score_details")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-19-matchingstrategy"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-19-matchingstrategy"}},[t._v("#")]),t._v(" 3.1.19. "),a("code",[t._v("matchingStrategy")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("last")])])]),t._v(" "),a("p",[t._v("Defines which strategy to use to match the query terms within the documents as search results.")]),t._v(" "),a("p",[t._v("Two different strategies are available, "),a("code",[t._v("last")]),t._v(" and "),a("code",[t._v("all")]),t._v(". By default, the "),a("code",[t._v("last")]),t._v(" strategy is chosen.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("String")]),t._v(" and other than "),a("code",[t._v("last")]),t._v(" or "),a("code",[t._v("all")]),t._v(" as a value for "),a("code",[t._v("matchingStrategy")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_matching_strategy"}},[t._v("invalid_search_matching_strategy")]),t._v(" error.")],1)]),t._v(" "),a("h5",{attrs:{id:"_3-1-19-1-last-strategy"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-19-1-last-strategy"}},[t._v("#")]),t._v(" 3.1.19.1. "),a("code",[t._v("last")]),t._v(" strategy")]),t._v(" "),a("p",[t._v("The documents containing ALL the query words (i.e. in the "),a("code",[t._v("q")]),t._v(" parameter) are returned first by Meilisearch. If Meilisearch doesn't have enough documents to fit the requested "),a("code",[t._v("limit")]),t._v(", it iteratively ignores the query words from the last typed word to the first typed word to match more documents.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-19-2-all-strategy"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-19-2-all-strategy"}},[t._v("#")]),t._v(" 3.1.19.2. "),a("code",[t._v("all")]),t._v(" strategy")]),t._v(" "),a("p",[t._v("Only the documents containing ALL the query words (i.e. in the "),a("code",[t._v("q")]),t._v(" parameter) are returned by Meilisearch. If Meilisearch doesn't have enough documents to fit the requested "),a("code",[t._v("limit")]),t._v(", it returns the documents found without trying to match more documents.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-20-attributestosearchon"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-20-attributestosearchon"}},[t._v("#")]),t._v(" 3.1.20. "),a("code",[t._v("attributesToSearchOn")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of String (POST) | String (GET)")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v('["*"]')])])]),t._v(" "),a("p",[t._v("Defines which "),a("code",[t._v("searchableAttributes")]),t._v(" the query will search on.")]),t._v(" "),a("ul",[a("li",[t._v("If "),a("code",[t._v("attributesToSearchOn")]),t._v(" is not set, set to "),a("code",[t._v('["*"]')]),t._v(" or set to "),a("code",[t._v("null")]),t._v(", then the query will search on all "),a("code",[t._v("searchableAttributes")]),t._v(".")]),t._v(" "),a("li",[t._v("Sending the attributes in a different order than the order set in the settings "),a("code",[t._v("searchableAttributes")]),t._v(" doesn't reorder the fields' rank for the "),a("code",[t._v("Attributes")]),t._v(" ranking rule")]),t._v(" "),a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array of String")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("attributesToSearchOn")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_attributes_to_search_on"}},[t._v("invalid_attributes_to_search_on")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending an attribute that is not part of the settings "),a("code",[t._v("searchableAttributes")]),t._v(" list returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_attributes_to_search_on"}},[t._v("invalid_attributes_to_search_on")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-21-vector-experimental"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-21-vector-experimental"}},[t._v("#")]),t._v(" 3.1.21. "),a("code",[t._v("vector")]),t._v(" "),a("code",[t._v("EXPERIMENTAL")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of Float")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: []")])]),t._v(" "),a("p",[t._v("Request the nearest documents based on the query vector embedding given.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array of Float")]),t._v(" or "),a("code",[t._v("null")]),t._v(" as a value for "),a("code",[t._v("vector")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_vector"}},[t._v("invalid_search_vector")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending a value for "),a("code",[t._v("vector")]),t._v(" whose length differs from the documents "),a("code",[t._v("_vectors")]),t._v(" length returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_vector"}},[t._v("invalid_search_vector")]),t._v(" error.")],1)]),t._v(" "),a("h3",{attrs:{id:"_3-2-search-response-properties"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-search-response-properties"}},[t._v("#")]),t._v(" 3.2. Search Response Properties")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Field")]),t._v(" "),a("th",[t._v("Type")]),t._v(" "),a("th",[t._v("Required")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[a("a",{attrs:{href:"#321-hits"}},[a("code",[t._v("hits")])])]),t._v(" "),a("td",[t._v("Array[Hit]")]),t._v(" "),a("td",[t._v("True")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#322-limit"}},[a("code",[t._v("limit")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#323-offset"}},[a("code",[t._v("offset")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#324-estimatedTotalHits"}},[a("code",[t._v("estimatedTotalHits")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#325-page"}},[a("code",[t._v("page")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#326-hitsperpage"}},[a("code",[t._v("hitsPerPage")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#327-totalpages"}},[a("code",[t._v("totalPages")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#328-totalhits"}},[a("code",[t._v("totalHits")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#329-facetdistribution"}},[a("code",[t._v("facetDistribution")])])]),t._v(" "),a("td",[t._v("Object")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3210-facetstats"}},[a("code",[t._v("facetStats")])])]),t._v(" "),a("td",[t._v("Object")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3211-processingtimems"}},[a("code",[t._v("processingTimeMs")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("True")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3212-query"}},[a("code",[t._v("query")])])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("True")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3213-vector"}},[a("code",[t._v("vector")])]),t._v(" "),a("code",[t._v("EXPERIMENTAL")])]),t._v(" "),a("td",[t._v("Array of Float")]),t._v(" "),a("td",[t._v("False")])])])]),t._v(" "),a("h4",{attrs:{id:"_3-2-1-hits"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-hits"}},[t._v("#")]),t._v(" 3.2.1. "),a("code",[t._v("hits")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array[Hit]")]),t._v(" "),a("li",[t._v("Required: True")])]),t._v(" "),a("p",[t._v("Results of the search query as an array of documents.")]),t._v(" "),a("blockquote",[a("p",[t._v("Hit object represents a matched document as a search result.")])]),t._v(" "),a("blockquote",[a("p",[t._v("The search parameters "),a("code",[t._v("attributesToRetrieve")]),t._v(" influence the returned payload for a hit. See "),a("a",{attrs:{href:"#319-attributestoretrieve"}},[t._v("3.1.7. "),a("code",[t._v("attributesToRetrieve")])]),t._v(" section.")])]),t._v(" "),a("p",[t._v("A search result can contain special properties. See "),a("a",{attrs:{href:"#3211-hit-special-properties"}},[t._v("3.2.1.1. "),a("code",[t._v("hit")]),t._v(" Special Properties")]),t._v(" section.")]),t._v(" "),a("h5",{attrs:{id:"_3-2-1-1-hit-special-properties"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-hit-special-properties"}},[t._v("#")]),t._v(" 3.2.1.1. "),a("code",[t._v("hit")]),t._v(" Special Properties")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Field")]),t._v(" "),a("th",[t._v("Type")]),t._v(" "),a("th",[t._v("Required")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[a("a",{attrs:{href:"#32111-geodistance"}},[a("code",[t._v("_geoDistance")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#32112-formatted"}},[a("code",[t._v("_formatted")])])]),t._v(" "),a("td",[t._v("Object")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#32113-matchesposition"}},[a("code",[t._v("_matchesPosition")])])]),t._v(" "),a("td",[t._v("Object")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#32114-rankingscore"}},[a("code",[t._v("_rankingScore")])])]),t._v(" "),a("td",[t._v("Number")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#32115-rankingscoredetails"}},[a("code",[t._v("_rankingScoreDetails")])])]),t._v(" "),a("td",[t._v("Object")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#32116-semanticscore"}},[a("code",[t._v("_semanticScore")])]),t._v(" "),a("code",[t._v("EXPERIMENTAL")])]),t._v(" "),a("td",[t._v("Float")]),t._v(" "),a("td",[t._v("False")])])])]),t._v(" "),a("h6",{attrs:{id:"_3-2-1-1-1-geodistance"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-1-geodistance"}},[t._v("#")]),t._v(" 3.2.1.1.1. "),a("code",[t._v("_geoDistance")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Search queries using "),a("code",[t._v("_geoPoint")]),t._v(" returns a "),a("code",[t._v("_geoDistance")]),t._v(" field containing the distance in meters between the document "),a("code",[t._v("_geo")]),t._v(" coordinates and the specified "),a("code",[t._v("_geoPoint")]),t._v(".")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0059-geo-search.html"}},[t._v("GeoSearch")])],1)]),t._v(" "),a("h6",{attrs:{id:"_3-2-1-1-2-formatted"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-2-formatted"}},[t._v("#")]),t._v(" 3.2.1.1.2. "),a("code",[t._v("_formatted")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Object")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[a("code",[t._v("_formatted")]),t._v(" is an object returned in the search response, only if at least one of the following paramaters has been set in the search query:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("attributesToHighlight")])]),t._v(" "),a("li",[a("code",[t._v("attributesToCrop")])])]),t._v(" "),a("p",[t._v("If "),a("code",[t._v("attributesToHighlight")]),t._v(" and "),a("code",[t._v("attributesToCrop")]),t._v(" are not set, "),a("code",[t._v("_formatted")]),t._v(" is not returned.")]),t._v(" "),a("p",[t._v("This "),a("code",[t._v("_formatted")]),t._v(" object will be present in each returned document in the "),a("code",[t._v("hits")]),t._v(" field.")]),t._v(" "),a("p",[t._v("Example:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToCrop"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Pride and Prejudice"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"_formatted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Pride and Prejudice"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("456")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Le Petit Prince"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"_formatted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"456"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Le Petit Prince"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Which attributes are present in "),a("code",[t._v("_formatted")]),t._v("?")]),t._v(" "),a("p",[a("em",[t._v("Remember the main rule: "),a("code",[t._v("_formatted")]),t._v(" is only present if "),a("code",[t._v("attributesToHighlight")]),t._v(" or "),a("code",[t._v("attributesToCrop")]),t._v(" is set.")])]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("_formatted")]),t._v(" object contains attributes coming from the original document, depending on the parameters the users set during the search query. Indeed, "),a("strong",[a("code",[t._v("_formatted")]),t._v(" contains all the attributes present in "),a("code",[t._v("attributesToRetrieve")]),t._v(", "),a("code",[t._v("attributesToHighlight")]),t._v(", and "),a("code",[t._v("attributesToCrop")]),t._v(" combined")]),t._v(".")]),t._v(" "),a("p",[t._v("Knowing the default value of "),a("code",[t._v("attributesToRetrieve")]),t._v(" is "),a("code",[t._v('["*"]')]),t._v(" (so all the attributes present in "),a("code",[t._v("displayedAttributes")]),t._v("), if no "),a("code",[t._v("attributesToRetrieve")]),t._v(" are set in the search query, "),a("code",[t._v("_formatted")]),t._v(" will return all the "),a("code",[t._v("displayedAttributes")]),t._v(".")]),t._v(" "),a("p",[t._v("Returning attributes in the "),a("code",[t._v("_formatted")]),t._v(" object does not mean these attributes will be necessarily highlighted or cropped, see the next point.")]),t._v(" "),a("p",[t._v("Which attributes are highlighted or cropped in "),a("code",[t._v("_formatted")]),t._v("?")]),t._v(" "),a("p",[t._v("No matter which attributes are retrieved in "),a("code",[t._v("_formatted")]),t._v(' (according to the previous section "Which attributes are present in '),a("code",[t._v("_formatted")]),t._v('?"):')]),t._v(" "),a("ul",[a("li",[t._v("Only the attributes present in "),a("code",[t._v("attributesToHighlight")]),t._v(" are highlighted.")]),t._v(" "),a("li",[t._v("Only the attributes present in "),a("code",[t._v("attributesToCrop")]),t._v(" are cropped.")]),t._v(" "),a("li",[t._v("Attributes present in both are cropped and highlighted at the same time.")])]),t._v(" "),a("p",[t._v("Some edge cases:")]),t._v(" "),a("ul",[a("li",[t._v("If cumulated fields in "),a("code",[t._v("attributesToHighlight")]),t._v(" and "),a("code",[t._v("attributesToCrop")]),t._v(" resolve to only having non-existent fields, "),a("code",[t._v("_formatted")]),t._v(" is not returned.")])]),t._v(" "),a("p",[t._v("Some examples:\n"),a("em",[t._v("The examples work the same with "),a("code",[t._v("attributesToCrop")])])]),t._v(" "),a("p",[t._v("Example 1:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToHighlight"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Hobbit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"_formatted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Hobbit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("-> All the attributes (so "),a("code",[t._v("id")]),t._v(", "),a("code",[t._v("title")]),t._v(" and "),a("code",[t._v("author")]),t._v(") are returned in "),a("code",[t._v("_formatted")]),t._v(" because by default "),a("code",[t._v("attributesToRetrieve")]),t._v(" is set to "),a("code",[t._v('["*"]')]),t._v(".\n-> Only "),a("code",[t._v("title")]),t._v(" is highlighted.")]),t._v(" "),a("p",[t._v("Example 2:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToHighlight"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"*"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Hobbit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"_formatted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Hobbit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("-> "),a("code",[t._v("id")]),t._v(", "),a("code",[t._v("title")]),t._v(" and "),a("code",[t._v("author")]),t._v(" are returned in "),a("code",[t._v("_formatted")]),t._v(" because"),a("code",[t._v("attributesToHighlight")]),t._v(" is set to "),a("code",[t._v('["*"]')]),t._v(" (but also "),a("code",[t._v("attributesToRetrieve")]),t._v(" by default).\n-> Both "),a("code",[t._v("title")]),t._v(" and "),a("code",[t._v("author")]),t._v(" are highlighted because "),a("code",[t._v("attributesToHighlight")]),t._v(" is set to "),a("code",[t._v('["*"]')]),t._v(".")]),t._v(" "),a("p",[t._v("Example 3:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToRetrieve"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToHighlight"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"_formatted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Hobbit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("-> Only "),a("code",[t._v("author")]),t._v(" is returned at the root of the document because defined in the "),a("code",[t._v("attributesToRetrieve")]),t._v(".\n-> Only "),a("code",[t._v("author")]),t._v(" and "),a("code",[t._v("title")]),t._v(" are returned in "),a("code",[t._v("_formatted")]),t._v(" because the addition of "),a("code",[t._v("attributesToRetrieve")]),t._v(" and "),a("code",[t._v("attributesToHighlight")]),t._v(".\n-> Only "),a("code",[t._v("title")]),t._v(" is highlighted because the only one defined in "),a("code",[t._v("attributesToHighlight")]),t._v(".")]),t._v(" "),a("p",[t._v("Example 4:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToRetrieve"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToHighlight"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"*"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"_formatted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Hobbit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("-> No attributes are returned at the root of the document because "),a("code",[t._v("attributesToRetrieve")]),t._v(" is set to "),a("code",[t._v("[]")]),t._v(".\n-> All the attributes are returned in "),a("code",[t._v("_formatted")]),t._v(" because "),a("code",[t._v("attributesToHighlight")]),t._v(" is set to "),a("code",[t._v('["*"]')]),t._v(".\n-> All the attributes are highlighted because "),a("code",[t._v("attributesToHighlight")]),t._v(" is set to "),a("code",[t._v('["*"]')]),t._v(".")]),t._v(" "),a("h6",{attrs:{id:"_3-2-1-1-3-matchesposition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-3-matchesposition"}},[t._v("#")]),t._v(" 3.2.1.1.3. "),a("code",[t._v("_matchesPosition")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Object")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Contains the location of each occurrence of queried terms across all fields. The "),a("code",[t._v("_matchesPosition")]),t._v(" object is added to a search result when the "),a("code",[t._v("showMatchesPosition")]),t._v(" search parameter is specified to true.")]),t._v(" "),a("p",[t._v("The beginning of a matching term within a field is indicated by "),a("code",[t._v("start")]),t._v(", and its "),a("code",[t._v("length")]),t._v(" by length.")]),t._v(" "),a("p",[a("code",[t._v("start")]),t._v(" and "),a("code",[t._v("length")]),t._v(" are measured in bytes and not the number of characters. For example, "),a("code",[t._v("ü")]),t._v(" represents two bytes but one character.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#3116-showmatchesposition"}},[t._v("3.1.14. "),a("code",[t._v("showMatchesPosition")])]),t._v(" section.")])]),t._v(" "),a("h6",{attrs:{id:"_3-2-1-1-4-rankingscore"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-4-rankingscore"}},[t._v("#")]),t._v(" 3.2.1.1.4. "),a("code",[t._v("_rankingScore")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Number")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("The relevancy score of a document relative to the search query. Higher is better.")]),t._v(" "),a("p",[a("code",[t._v("1.0")]),t._v(" indicates a perfect match, "),a("code",[t._v("0.0")]),t._v(" no match at all (Meilisearch should not return documents that don't match the query).")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0195-ranking-score.html#31-ranking-score"}},[t._v("Ranking Score")]),t._v(" for details.")],1)]),t._v(" "),a("h6",{attrs:{id:"_3-2-1-1-5-rankingscoredetails"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-5-rankingscoredetails"}},[t._v("#")]),t._v(" 3.2.1.1.5. "),a("code",[t._v("_rankingScoreDetails")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Object")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("The ranking score of a document per each ranking rule and relative to the search query.")]),t._v(" "),a("p",[t._v("This object features one field for each applied ranking rule, whose values are an object with at least the field "),a("code",[t._v("order")]),t._v(" indicating in which order this ranking rule has been applied.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0195-ranking-score.html#32-ranking-score-details"}},[t._v("Ranking Score details")]),t._v(" for details.")],1)]),t._v(" "),a("h6",{attrs:{id:"_3-2-1-1-6-semanticscore-experimental"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-6-semanticscore-experimental"}},[t._v("#")]),t._v(" 3.2.1.1.6. "),a("code",[t._v("_semanticScore")]),t._v(" "),a("code",[t._v("EXPERIMENTAL")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Float")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Contains the semantic similarity score of the document for a vector search when "),a("code",[t._v("vector")]),t._v(" has been provided. The score is represented as a dot product.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#3118-vector-experimental"}},[t._v("3.1.18 "),a("code",[t._v("vector")])])])]),t._v(" "),a("h4",{attrs:{id:"_3-2-2-limit"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-limit"}},[t._v("#")]),t._v(" 3.2.2. "),a("code",[t._v("limit")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the "),a("code",[t._v("limit")]),t._v(" search parameter used for the query.\nThis field is returned only when:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are used as query parameters.")]),t._v(" "),a("li",[t._v("None of "),a("code",[t._v("limit")]),t._v(", "),a("code",[t._v("offset")]),t._v(", "),a("code",[t._v("page")]),t._v(", "),a("code",[t._v("hitsPerPage")]),t._v(" are used as a query parameter")])]),t._v(" "),a("p",[t._v("See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(" on the different ways of navigating search results.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#315-limit"}},[t._v("3.1.5. "),a("code",[t._v("limit")])]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-3-offset"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-offset"}},[t._v("#")]),t._v(" 3.2.3. "),a("code",[t._v("offset")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the "),a("code",[t._v("offset")]),t._v(" search parameter used for the query.\nThis field is returned only when none of "),a("code",[t._v("page")]),t._v(" and "),a("code",[t._v("hitsPerPage")]),t._v(" are used as a query parameter.")]),t._v(" "),a("p",[t._v("See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("explanation")]),t._v(" on the different ways of navigating search results.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#316-offset"}},[t._v("3.1.6. "),a("code",[t._v("offset")]),t._v(" section")]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-4-estimatedtotalhits"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-estimatedtotalhits"}},[t._v("#")]),t._v(" 3.2.4. "),a("code",[t._v("estimatedTotalHits")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the estimated number of candidates for the search query. This field is returned only when "),a("code",[t._v("limit")]),t._v(" or/and "),a("code",[t._v("offset")]),t._v(" are used as a query parameter.")]),t._v(" "),a("p",[t._v("This field is returned only when:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are used as query parameters.")]),t._v(" "),a("li",[t._v("None of "),a("code",[t._v("limit")]),t._v(", "),a("code",[t._v("offset")]),t._v(", "),a("code",[t._v("page")]),t._v(", "),a("code",[t._v("hitsPerPage")]),t._v(" are used as a query parameter")])]),t._v(" "),a("p",[t._v("See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(" on the different ways of navigation search results.")]),t._v(" "),a("h4",{attrs:{id:"_3-2-5-page"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-5-page"}},[t._v("#")]),t._v(" 3.2.5. "),a("code",[t._v("page")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the current search results page. This field is returned only when the "),a("code",[t._v("page selection")]),t._v(" feature is enabled; see "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(".")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#317-page"}},[t._v("3.1.7. "),a("code",[t._v("page")]),t._v(" section")]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-6-hitsperpage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-6-hitsperpage"}},[t._v("#")]),t._v(" 3.2.6. "),a("code",[t._v("hitsPerPage")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the number of results per page. This field is returned only when the "),a("code",[t._v("page selection")]),t._v(" feature is enabled; see "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(".")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#318-hitsperpage"}},[t._v("3.1.7. "),a("code",[t._v("hitsPerPage")]),t._v(" section")]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-7-totalpages"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-7-totalpages"}},[t._v("#")]),t._v(" 3.2.7. "),a("code",[t._v("totalPages")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the total number of results pages. Calculated using ["),a("code",[t._v("hitsPerPage")]),t._v("]. Both "),a("code",[t._v("totalPages")]),t._v(" and "),a("code",[t._v("totalHits")]),t._v(" are computed until they reach the "),a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#https://github.com/meilisearch/specifications/blob/main/text/157-pagination-setting-api.md#311-maxtotalhits"}},[a("code",[t._v("pagination.maxTotalHits")])]),t._v(" number from the settings.")],1),t._v(" "),a("p",[t._v("This field is returned only when the "),a("code",[t._v("page selection")]),t._v(" feature is enabled; see "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(".")]),t._v(" "),a("h4",{attrs:{id:"_3-2-8-totalhits"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-8-totalhits"}},[t._v("#")]),t._v(" 3.2.8. "),a("code",[t._v("totalHits")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the total number of search results. Both "),a("code",[t._v("totalPages")]),t._v(" and "),a("code",[t._v("totalHits")]),t._v(" are computed until they reach the "),a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#https://github.com/meilisearch/specifications/blob/main/text/157-pagination-setting-api.md#311-maxtotalhits"}},[a("code",[t._v("pagination.maxTotalHits")])]),t._v(" number from the settings.")],1),t._v(" "),a("p",[t._v("This field is returned only when the "),a("code",[t._v("page selection")]),t._v(" feature is enabled, see "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(".")]),t._v(" "),a("h4",{attrs:{id:"_3-2-9-facetdistribution"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-9-facetdistribution"}},[t._v("#")]),t._v(" 3.2.9. "),a("code",[t._v("facetDistribution")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Object")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Added to the search response when "),a("code",[t._v("facets")]),t._v(" is set for a search query. It contains the number of remaining candidates for each specified facet in the "),a("code",[t._v("facets")]),t._v(" search parameter.")]),t._v(" "),a("p",[t._v("If a field distributed as a facet contains no value, it is returned as a "),a("code",[t._v("facetDistribution")]),t._v(" field with an empty object as value.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#314-facets"}},[t._v("3.1.4. "),a("code",[t._v("facets")])]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-10-facetstats"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-10-facetstats"}},[t._v("#")]),t._v(" 3.2.10. "),a("code",[t._v("facetStats")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Object")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("When using the "),a("code",[t._v("facets")]),t._v(" parameter, the distributed facets that contain some numeric values are displayed in a "),a("code",[t._v("facetStats")]),t._v(" object that contains, per facet, the numeric "),a("code",[t._v("min")]),t._v(" and "),a("code",[t._v("max")]),t._v(" values for that facet of all documents matching the search query.")]),t._v(" "),a("p",[t._v("If none of the hits returned by the search query have a numeric value for a facet, this facet is not part of the "),a("code",[t._v("facetStats")]),t._v(" object.")]),t._v(" "),a("p",[t._v("It ignores string values even if parseable. e.g "),a("code",[t._v('"21"')]),t._v(" isn't considered by the engine when computing the "),a("code",[t._v("facetStats")]),t._v(" "),a("code",[t._v("min")]),t._v(" and "),a("code",[t._v("max")]),t._v(".")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#314-facets"}},[t._v("3.1.4. "),a("code",[t._v("facets")])]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-11-processingtimems"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-11-processingtimems"}},[t._v("#")]),t._v(" 3.2.11. "),a("code",[t._v("processingTimeMs")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: True")])]),t._v(" "),a("p",[t._v("Processing time of the search query in "),a("strong",[t._v("milliseconds")]),t._v(".")]),t._v(" "),a("h4",{attrs:{id:"_3-2-12-query"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-12-query"}},[t._v("#")]),t._v(" 3.2.12. "),a("code",[t._v("query")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String")]),t._v(" "),a("li",[t._v("Required: True")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v('""')])])]),t._v(" "),a("p",[t._v("Query originating the response. Equals to the "),a("code",[t._v("q")]),t._v(" search parameter.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#311-q"}},[t._v("3.1.1. "),a("code",[t._v("q")])]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-13-vector-experimental"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-13-vector-experimental"}},[t._v("#")]),t._v(" 3.2.13. "),a("code",[t._v("vector")]),t._v(" "),a("code",[t._v("EXPERIMENTAL")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of Float")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Vector query embedding originating the response. Equals to the "),a("code",[t._v("vector")]),t._v(" search parameter if specified.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#3118-vector-experimental"}},[t._v("3.1.18. "),a("code",[t._v("vector")])])])]),t._v(" "),a("h2",{attrs:{id:"_2-technical-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-details"}},[t._v("#")]),t._v(" 2. Technical Details")]),t._v(" "),a("p",[t._v("n/a")]),t._v(" "),a("h2",{attrs:{id:"_3-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[t._v("#")]),t._v(" 3. Future Possibilities")]),t._v(" "),a("ul",[a("li",[t._v("Add dedicated errors to replace "),a("code",[t._v("bad_request")]),t._v(" error.")])]),t._v(" "),a("h3",{attrs:{id:"_3-1-formatting-search-results"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-formatting-search-results"}},[t._v("#")]),t._v(" 3.1. Formatting Search Results")]),t._v(" "),a("ul",[a("li",[t._v("Replaces "),a("code",[t._v("_matchesPosition")]),t._v(" with chars position instead of bytes. It could also be a "),a("code",[t._v("mode")]),t._v(" to choose "),a("code",[t._v("byte")]),t._v(" or "),a("code",[t._v("char")]),t._v(".")]),t._v(" "),a("li",[t._v("Move "),a("code",[t._v("attributesToHighlight")]),t._v(", "),a("code",[t._v("highlightPreTag")]),t._v(", "),a("code",[t._v("highlightPostTag")]),t._v(", "),a("code",[t._v("attributesToCrop")]),t._v(", "),a("code",[t._v("cropLength")]),t._v(" and "),a("code",[t._v("cropMarker")]),t._v(" into a "),a("code",[t._v("formatter")]),t._v(" objet.")]),t._v(" "),a("li",[t._v("Add an option to only highlight complete query term.")]),t._v(" "),a("li",[t._v("Expose the "),a("code",[t._v("formatter")]),t._v(" resource as an index setting.")]),t._v(" "),a("li",[t._v("Highlight a phrase search as a single highlighted section.")])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/35.09e8f62f.js b/docs/assets/js/35.6f79f9fa.js similarity index 99% rename from docs/assets/js/35.09e8f62f.js rename to docs/assets/js/35.6f79f9fa.js index c1dc4853f..1e586d4ff 100644 --- a/docs/assets/js/35.09e8f62f.js +++ b/docs/assets/js/35.6f79f9fa.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[35],{458:function(e,t,a){"use strict";a.r(t);var s=a(62),i=Object(s.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("ul",[a("li",[e._v("Title: Instance options")]),e._v(" "),a("li",[e._v("Start Date: 2022-03-01")])]),e._v(" "),a("h1",{attrs:{id:"instance-options"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#instance-options"}},[e._v("#")]),e._v(" Instance options")]),e._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("The instance options let the users configure Meilisearch when launching the search engine using")]),e._v(" "),a("ul",[a("li",[e._v("environment variables")]),e._v(" "),a("li",[e._v("command-line options")])]),e._v(" "),a("p",[e._v("An example when setting an environment variable to change the folder path where the Meilisearch data are stored:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("MEILI_DB_PATH")]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("./meilifiles\n./meilisearch\n")])])]),a("p",[e._v("Same behavior using the command-line option:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("./meilisearch --db-path ./meilifiles\n")])])]),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[e._v("When Meilisearch is launched, the default configuration may not meet the specific needs of users. Meilisearch exposes configurable options to allow users to fine-tune the behavior of the search engine.")]),e._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("p",[e._v("The users can configure Meilisearch when launching the search engine using")]),e._v(" "),a("ul",[a("li",[a("strong",[e._v("environment variables")]),e._v(". Ex: "),a("code",[e._v("--db-path")])]),e._v(" "),a("li",[a("strong",[e._v("command-line options or CLI options")]),e._v(". Ex: "),a("code",[e._v("MEILI_DB_PATH")])])]),e._v(" "),a("p",[e._v("There are 2 categories of CLI (command-line interface) options:")]),e._v(" "),a("ul",[a("li",[e._v("the ones that expect a value. Ex: "),a("code",[e._v('--db-path "./my_path"')]),e._v(".")]),e._v(" "),a("li",[e._v('the ones that don\'t expect any value, called also "flags". Ex: '),a("code",[e._v("--no-analytics")]),e._v(". Their implicit values are booleans.")])]),e._v(" "),a("h3",{attrs:{id:"_3-1-some-specific-behaviors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-some-specific-behaviors"}},[e._v("#")]),e._v(" 3.1. Some specific behaviors")]),e._v(" "),a("h4",{attrs:{id:"_3-1-1-priority-between-cli-options-and-environment-variables"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-priority-between-cli-options-and-environment-variables"}},[e._v("#")]),e._v(" 3.1.1. Priority between CLI options and environment variables")]),e._v(" "),a("p",[e._v("Command-line options take precedence over environment variables. If the same configuration option is specified both as a command-line option and as an environment variable, Meilisearch will use the command-line option and its respective value.")]),e._v(" "),a("h4",{attrs:{id:"_3-1-2-flags-accepted-values-for-the-corresponding-environment-variable"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-flags-accepted-values-for-the-corresponding-environment-variable"}},[e._v("#")]),e._v(" 3.1.2. Flags: accepted values for the corresponding environment variable")]),e._v(" "),a("p",[e._v("The options that do not expect any value when using the command-line option accepts the following value when using the corresponding environment variable: "),a("code",[e._v("n")]),e._v(", "),a("code",[e._v("no")]),e._v(", "),a("code",[e._v("f")]),e._v(", "),a("code",[e._v("false")]),e._v(", "),a("code",[e._v("off")]),e._v(", and "),a("code",[e._v("0")]),e._v(" as "),a("code",[e._v("false")]),e._v(". An absent environment variable will also be considered as "),a("code",[e._v("false")]),e._v(". Everything else is considered "),a("code",[e._v("true")]),e._v(".")]),e._v(" "),a("p",[e._v("Example with the option to make SSL mandatory:")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("export MEILI_SSL_REQUIRE_AUTH=yes")]),e._v(" means that mandatory SSL is enabled.")]),e._v(" "),a("li",[a("code",[e._v("export MEILI_SSL_REQUIRE_AUTH=off")]),e._v(" means that mandatory SSL is disabled.")]),e._v(" "),a("li",[e._v("No variable set means that mandatory SSL is disabled.")])]),e._v(" "),a("h3",{attrs:{id:"_3-2-error-behavior"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-error-behavior"}},[e._v("#")]),e._v(" 3.2. Error behavior")]),e._v(" "),a("ol",[a("li",[e._v("Some configuration options must specify a value to be valid. Using such a command-line option or an environment variable without specifying a value will throw an error and interrupt the launch process.")])]),e._v(" "),a("p",[e._v("Example:")]),e._v(" "),a("p",[e._v("❌ Wrong")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("./meilisearch --db-path\n\nerror: The argument "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v("'--db-path '")]),e._v(" requires a value but none was supplied\n")])])]),a("p",[e._v("✅ Correct")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("./meilisearch --db-path ./meilifiles\n")])])]),a("ol",{attrs:{start:"2"}},[a("li",[e._v("Some command-line options take an implicit boolean as a value. In this case, the users should not set any value when using the option.")])]),e._v(" "),a("p",[e._v("❌ Wrong")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("./meilisearch --ssl-require-auth "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("yes")]),e._v("\n\nerror: Found argument "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v("'yes'")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("which")]),e._v(" wasn"),a("span",{pre:!0,attrs:{class:"token string"}},[e._v("'t expected, or isn'")]),e._v("t valid "),a("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("in")]),e._v(" this context\n")])])]),a("p",[e._v("✅ Correct")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("./meilisearch --ssl-require-auth\n")])])]),a("p",[e._v("The expected behavior of each flag is described in the list above.")]),e._v(" "),a("h3",{attrs:{id:"_3-3-exhaustive-list-of-options"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-exhaustive-list-of-options"}},[e._v("#")]),e._v(" 3.3. Exhaustive list of options")]),e._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"#331-database-path"}},[e._v("Database path")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#332-environment"}},[e._v("Environment")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#333-http-address--port-binding"}},[e._v("HTTP address & port binding")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#334-master-key"}},[e._v("Master key")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#335-disable-analytics"}},[e._v("Disable analytics")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#336-dump-directory"}},[e._v("Dump directory")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#337-import-dump"}},[e._v("Import dump")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#338-ignore-missing-dump"}},[e._v("Ignore missing dump")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#339-ignore-dump-if-db-exists"}},[e._v("Ignore dump if DB exists")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3310-log-level"}},[e._v("Log level")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3311-payload-limit-size"}},[e._v("Payload limit size")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3312-schedule-snapshot-creation"}},[e._v("Schedule snapshot creation")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3313-snapshot-destination"}},[e._v("Snapshot destination")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3314-import-snapshot"}},[e._v("Import snapshot")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3315-ignore-missing-snapshot"}},[e._v("Ignore missing snapshot")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3316-ignore-snapshot-if-db-exists"}},[e._v("Ignore snapshot if DB exists")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3317-max-memory-usage-when-indexing"}},[e._v("Max memory usage when indexing")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3318-max-indexing-threads"}},[e._v("Max indexing threads")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3319-ssl-authentication-path"}},[e._v("SSL authentication path")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3320-ssl-certificates-path"}},[e._v("SSL certificates path")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3321-ssl-key-path"}},[e._v("SSL key path")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3322-ssl-ocsp-path"}},[e._v("SSL OCSP path")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3323-ssl-require-auth"}},[e._v("SSL require auth")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3324-ssl-resumption"}},[e._v("SSL resumption")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3325-ssl-tickets"}},[e._v("SSL tickets")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3326-config-file-path"}},[e._v("Config file path")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3327-experimental-enable-metrics"}},[e._v("Experimental enable Metrics")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3328-experimental-reduce-indexing-memory-usage"}},[e._v("Experimental reduce indexing memory usage")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3329-task-webhook-url"}},[e._v("Task webhook url")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3330-task-webhook-authorization-header"}},[e._v("Task webhook authorization header")])])]),e._v(" "),a("h4",{attrs:{id:"_3-3-1-database-path"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-database-path"}},[e._v("#")]),e._v(" 3.3.1. Database path")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_DB_PATH")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--db-path")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v('"data.ms/"')]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": a filepath")]),e._v(" "),a("p",[e._v("Designates the location where database files will be created and retrieved.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-2-environment"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-environment"}},[e._v("#")]),e._v(" 3.3.2. Environment")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_ENV")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--env")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v("development")]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": "),a("code",[e._v("production")]),e._v(" or "),a("code",[e._v("development")])]),e._v(" "),a("p",[e._v("Configures the instance's environment. Value must be either "),a("code",[e._v("production")]),e._v(" or "),a("code",[e._v("development")]),e._v(".")]),e._v(" "),a("p",[a("code",[e._v("production")]),e._v(":")]),e._v(" "),a("ul",[a("li",[e._v("Setting a master key of at least 16 bytes is "),a("strong",[e._v("mandatory")])]),e._v(" "),a("li",[e._v("The search preview interface is disabled")])]),e._v(" "),a("p",[a("code",[e._v("development")]),e._v(":")]),e._v(" "),a("ul",[a("li",[e._v("Setting a master key is "),a("strong",[e._v("optional")])]),e._v(" "),a("li",[e._v("Setting a master key of at least 16 bytes is "),a("strong",[e._v("optional")])]),e._v(" "),a("li",[e._v("Search preview is enabled")])]),e._v(" "),a("h4",{attrs:{id:"_3-3-3-http-address-port-binding"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-http-address-port-binding"}},[e._v("#")]),e._v(" 3.3.3. HTTP address & port binding")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_HTTP_ADDR")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--http-addr")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v('"localhost:7700"')]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": an HTTP address and port")]),e._v(" "),a("p",[e._v("Sets the HTTP address and port Meilisearch will use.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-4-master-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-master-key"}},[e._v("#")]),e._v(" 3.3.4. Master key")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_MASTER_KEY")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--master-key")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v("None")]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": an alphanumeric string")]),e._v(" "),a("p",[e._v("Sets the instance's master key, automatically protecting all routes except "),a("RouterLink",{attrs:{to:"/reference/api/health.html"}},[a("code",[e._v("GET /health")])]),e._v(". This means you will need an API key to access endpoints such as "),a("code",[e._v("POST /search")]),e._v(" and "),a("code",[e._v("GET /documents")]),e._v(".")],1),e._v(" "),a("p",[e._v("You must supply an alphanumeric string when using this option.")]),e._v(" "),a("p",[e._v("If no master key is provided in a "),a("code",[e._v("development")]),e._v(" environment, all routes will be unprotected and publicly accessible.")]),e._v(" "),a("h5",{attrs:{id:"_3-3-4-1-error-and-warning-messages"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-1-error-and-warning-messages"}},[e._v("#")]),e._v(" 3.3.4.1. Error and Warning messages")]),e._v(" "),a("p",[e._v("Providing a master key of at least 16 bytes is mandatory when "),a("code",[e._v("--env")]),e._v(" is set to "),a("code",[e._v("production")]),e._v("; if none is given, Meilisearch will throw an error and refuse to launch.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("Error: You must provide a master key to secure your instance in a production environment. It can be specified via the MEILI_MASTER_KEY environment variable or the --master-key launch option.\n\nWe generated a secure master key for you (you can safely use this token):\n\n>> --master-key `:suggestedMasterKey` <<\n")])])]),a("p",[e._v("Providing a master key of at least 16 bytes is mandatory when "),a("code",[e._v("--env")]),e._v(" is set to "),a("code",[e._v("production")]),e._v("; if it is given but too short then, Meilisearch will throw an error and refuse to launch.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("Error: The master key must be at least 16 bytes in a production environment. The provided key is only `:numBytes` bytes.\n\nWe generated a secure master key for you (you can safely use this token):\n\n>> --master-key `:suggestedMasterKey` <<\n")])])]),a("p",[e._v("Providing a master key of less than 16 bytes when "),a("code",[e._v("--env")]),e._v(" is set to "),a("code",[e._v("development")]),e._v(" displays a warning message.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("Meilisearch started with a master key considered unsafe for use in a production environment.\n\nA master key of at least 16 bytes will be required when switching to a production environment.\n\nWe generated a new secure master key for you (you can safely use this token):\n\n>> --master-key `:suggestedMasterKey` <<\n\nRestart Meilisearch with the argument above to use this new and secure master key.\n")])])]),a("p",[e._v("Not providing a master key when "),a("code",[e._v("--env")]),e._v(" is set to "),a("code",[e._v("development")]),e._v(" displays a warning message.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("No master key was found. The server will accept unidentified requests.\n\nA master key of at least 16 bytes will be required when switching to a production environment.\n\nIf you need protection in a development environment, we generated a secure master key for you (you can safely use this token):\n\n>> --master-key `:suggestedMasterKey` <<\n\nRestart Meilisearch with the argument above to use this new and secure master key.\n")])])]),a("h4",{attrs:{id:"_3-3-5-disable-analytics"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-5-disable-analytics"}},[e._v("#")]),e._v(" 3.3.5. Disable analytics")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_NO_ANALYTICS")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--no-analytics")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Enabled")]),e._v(" "),a("p",[e._v("⚠️ This command-line option does not take any values. Assigning a value will throw an error.")]),e._v(" "),a("p",[e._v("Deactivates Meilisearch's built-in telemetry collect when enabled.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-6-dump-directory"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-6-dump-directory"}},[e._v("#")]),e._v(" 3.3.6. Dump directory")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_DUMP_DIR")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--dump-dir")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v("dumps/")]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": a filepath pointing to a valid directory")]),e._v(" "),a("p",[e._v("Sets the directory where Meilisearch will create dump files. If the directory does not exist when a dump is generated it will be created.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-7-import-dump"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-7-import-dump"}},[e._v("#")]),e._v(" 3.3.7. Import dump")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_IMPORT_DUMP")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--import-dump")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v("none")]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": a filepath pointing to a "),a("code",[e._v(".dump")]),e._v(" file")]),e._v(" "),a("p",[e._v("Imports the dump file located at the specified path. Path must point to a "),a("code",[e._v(".dump")]),e._v(" file.")]),e._v(" "),a("p",[e._v("Meilisearch will only launch once the dump data has been fully indexed.")]),e._v(" "),a("p",[e._v("More regarding dump behaviors in this "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/blob/develop/text/0105-dumps-api.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("spec"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("h4",{attrs:{id:"_3-3-8-ignore-missing-dump"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-8-ignore-missing-dump"}},[e._v("#")]),e._v(" 3.3.8. Ignore missing dump")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_IGNORE_MISSING_DUMP")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--ignore-missing-dump")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Disabled")]),e._v(" "),a("p",[e._v("⚠️ This command-line option does not take any values. Assigning a value will throw an error.")]),e._v(" "),a("p",[e._v("Prevents a Meilisearch instance from throwing an error when "),a("code",[e._v("--import-dump")]),e._v(" does not point to a valid dump file.")]),e._v(" "),a("p",[e._v("This command will throw an error if "),a("code",[e._v("--import-dump")]),e._v(" is not defined.")]),e._v(" "),a("p",[e._v("More information in this "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/blob/develop/text/0105-dumps-api.md#138---ignore-missing-dump",target:"_blank",rel:"noopener noreferrer"}},[e._v("section of the spec"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("h4",{attrs:{id:"_3-3-9-ignore-dump-if-db-exists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-9-ignore-dump-if-db-exists"}},[e._v("#")]),e._v(" 3.3.9. Ignore dump if DB exists")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_IGNORE_DUMP_IF_DB_EXISTS")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--ignore-dump-if-db-exists")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Disabled")]),e._v(" "),a("p",[e._v("⚠️ This command-line option does not take any values. Assigning a value will throw an error.")]),e._v(" "),a("p",[e._v("Prevents a Meilisearch instance with an existing database from throwing an error when using "),a("code",[e._v("--import-dump")]),e._v(". Instead, the dump will be ignored and Meilisearch will launch using the existing database.")]),e._v(" "),a("p",[e._v("This command will throw an error if "),a("code",[e._v("--import-dump")]),e._v(" is not defined.")]),e._v(" "),a("p",[e._v("More information in this "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/blob/develop/text/0105-dumps-api.md#137---ignore-dump-if-db-exists",target:"_blank",rel:"noopener noreferrer"}},[e._v("section of the spec"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("h4",{attrs:{id:"_3-3-10-log-level"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-10-log-level"}},[e._v("#")]),e._v(" 3.3.10. Log level")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_LOG_LEVEL")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--log-level")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v("'INFO'")]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": one of "),a("code",[e._v("ERROR")]),e._v(", "),a("code",[e._v("WARN")]),e._v(", "),a("code",[e._v("INFO")]),e._v(", "),a("code",[e._v("DEBUG")]),e._v(", "),a("code",[e._v("TRACE")]),e._v(", or "),a("code",[e._v("OFF")])]),e._v(" "),a("p",[e._v("Defines how much detail should be present in Meilisearch's logs.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-11-payload-limit-size"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-11-payload-limit-size"}},[e._v("#")]),e._v(" 3.3.11. Payload limit size")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_HTTP_PAYLOAD_SIZE_LIMIT")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--http-payload-size-limit")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v("104857600")]),e._v(" (~100MB)\n"),a("strong",[e._v("Expected value")]),e._v(": an integer ("),a("code",[e._v("104857600")]),e._v(") or a human readable size ("),a("code",[e._v("100Mb")]),e._v(")")]),e._v(" "),a("p",[e._v("Sets the maximum size of accepted payloads. Value must be given in bytes or explicitly stating a base unit. For example, the default value can be written as "),a("code",[e._v("107374182400")]),e._v(", "),a("code",[e._v("'107.7Gb'")]),e._v(", or "),a("code",[e._v("'107374 Mb'")]),e._v(".")]),e._v(" "),a("h4",{attrs:{id:"_3-3-12-schedule-snapshot-creation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-12-schedule-snapshot-creation"}},[e._v("#")]),e._v(" 3.3.12. Schedule snapshot creation")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_SCHEDULE_SNAPSHOT")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--schedule-snapshot")]),e._v(" "),a("strong",[e._v("Default when absent")]),e._v(": Disabled\n"),a("strong",[e._v("Optional value")]),e._v(": an integer")]),e._v(" "),a("p",[e._v("⚠️ This command-line option takes an "),a("strong",[e._v("optional")]),e._v(" integer value. Passing the flag with no value implies the default value of 86400.")]),e._v(" "),a("ul",[a("li",[e._v("Omitting the flag, not defining "),a("code",[e._v("MEILI_SCHEDULE_SNAPSHOT")]),e._v(", or specifying "),a("code",[e._v("schedule_snapshot=false")]),e._v(" in the configuration file disables the scheduled snapshots, and is the default behavior.")]),e._v(" "),a("li",[e._v("Passing the flag without a value or specifying "),a("code",[e._v("schedule_snapshot=true")]),e._v(" in the configuration file enables the scheduled snapshot with the default interval of 86400 seconds between each snapshot.")]),e._v(" "),a("li",[e._v("Passing the flag with an integer value, defining the "),a("code",[e._v("MEILI_SCHEDULE_SNAPSHOT")]),e._v(" to an integer value, or specifying "),a("code",[e._v("schedule_snapshot=x")]),e._v(" with "),a("code",[e._v("x")]),e._v(" an integer value in the configuration file enables the scheduled snapshots with an interval between each snapshot of the specified integer value, in seconds.")])]),e._v(" "),a("h4",{attrs:{id:"_3-3-13-snapshot-destination"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-13-snapshot-destination"}},[e._v("#")]),e._v(" 3.3.13. Snapshot destination")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_SNAPSHOT_DIR")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--snapshot-dir")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v("snapshots/")]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": a filepath pointing to a valid directory")]),e._v(" "),a("p",[e._v("Sets the directory where Meilisearch will store snapshots. If the directory does not exist when a snapshot is generated it will be created.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-14-import-snapshot"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-14-import-snapshot"}},[e._v("#")]),e._v(" 3.3.14. Import snapshot")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_IMPORT_SNAPSHOT")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--import-snapshot")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v("None")]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": a filepath pointing to a snapshot file")]),e._v(" "),a("p",[e._v("Launches Meilisearch after importing a previously-generated snapshot at the given filepath.")]),e._v(" "),a("p",[e._v("This command will throw an error if:")]),e._v(" "),a("ul",[a("li",[e._v("A database already exists")]),e._v(" "),a("li",[e._v("No valid snapshot can be found in the specified path")])]),e._v(" "),a("p",[e._v("This behavior can be modified with the "),a("code",[e._v("--ignore-snapshot-if-db-exists")]),e._v(" and "),a("code",[e._v("--ignore-missing-snapshot")]),e._v(" options, respectively.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-15-ignore-missing-snapshot"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-15-ignore-missing-snapshot"}},[e._v("#")]),e._v(" 3.3.15. Ignore missing snapshot")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_IGNORE_MISSING_SNAPSHOT")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--ignore-missing-snapshot")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Disabled")]),e._v(" "),a("p",[e._v("⚠️ This command-line option does not take any values. Assigning a value will throw an error.")]),e._v(" "),a("p",[e._v("Prevents a Meilisearch instance from throwing an error when "),a("code",[e._v("--import-snapshot")]),e._v(" does not point to a valid snapshot file.")]),e._v(" "),a("p",[e._v("This command will throw an error if "),a("code",[e._v("--import-snapshot")]),e._v(" is not defined.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-16-ignore-snapshot-if-db-exists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-16-ignore-snapshot-if-db-exists"}},[e._v("#")]),e._v(" 3.3.16. Ignore snapshot if DB exists")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_IGNORE_SNAPSHOT_IF_DB_EXISTS")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--ignore-snapshot-if-db-exists")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Disabled")]),e._v(" "),a("p",[e._v("⚠️ This command-line option does not take any values. Assigning a value will throw an error.")]),e._v(" "),a("p",[e._v("Prevents a Meilisearch instance with an existing database from throwing an error when using "),a("code",[e._v("--import-snapshot")]),e._v(". Instead, the snapshot will be ignored and Meilisearch will launch using the existing database.")]),e._v(" "),a("p",[e._v("This command will throw an error if "),a("code",[e._v("--import-snapshot")]),e._v(" is not defined.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-17-max-memory-usage-when-indexing"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-17-max-memory-usage-when-indexing"}},[e._v("#")]),e._v(" 3.3.17. Max memory usage when indexing")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_MAX_INDEXING_MEMORY")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--max-indexing-memory")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": 2/3 of the available RAM of the machine\n"),a("strong",[e._v("Expected value")]),e._v(": an integer ("),a("code",[e._v("104857600")]),e._v(") or a human readable size ("),a("code",[e._v("100Mb")]),e._v(")")]),e._v(" "),a("p",[e._v("Set the maximum size of the RAM used by Meilisearch when indexing. By default, Meilisearch adapts its behavior to make the indexation use at maximum two-thirds of the available resources.")]),e._v(" "),a("p",[e._v("Value must be given in bytes or explicitly stating a base unit. For example, the default value can be written as "),a("code",[e._v("107374182400")]),e._v(", "),a("code",[e._v("'107.7Gb'")]),e._v(", or "),a("code",[e._v("'107374 Mb'")]),e._v(".")]),e._v(" "),a("p",[e._v("⚠️ WARNINGS")]),e._v(" "),a("ul",[a("li",[e._v("We do not recommend setting the full RAM size of your machine. For example, when running Meilisearch on a machine with 4GB of RAM, do not set this options to "),a("code",[e._v("4Gb")])]),e._v(" "),a("li",[e._v("This command-line option does not perfectly ensure the RAM usage but helps you manage multiple Meilisearch engines on the same machine (for example, using Kubernetes). The search engine cannot guarantee the exact usage of the RAM.")]),e._v(" "),a("li",[e._v("If the number set is higher than the real available RAM in the machine, we cannot prevent Meilisearch from crashing.")])]),e._v(" "),a("h4",{attrs:{id:"_3-3-18-max-indexing-threads"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-18-max-indexing-threads"}},[e._v("#")]),e._v(" 3.3.18. Max indexing threads")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_MAX_INDEXING_THREADS")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--max-indexing-threads")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": half of the available threads of the machine\n"),a("strong",[e._v("Expected value")]),e._v(": an integer")]),e._v(" "),a("p",[e._v("Sets the maximum number of threads available to use during the indexation.")]),e._v(" "),a("p",[e._v("By default, in machines with multi-core processors, the indexer avoids using more than half of the available processing units. For example, if your machine has twelve cores, the indexer will try to use six of them at most. This ensures Meilisearch is always ready to perform searches, even while you are updating an index.\nUsers have to be aware that requiring the totality of the threads for the indexation can lead to a huge impact on the search experience.")]),e._v(" "),a("p",[e._v("Obviously, multi-threading is not possible in machines with only one processor core.")]),e._v(" "),a("p",[e._v("If the number set is higher than the real number of core available in the machine, Meilisearch will use the maximum number of available cores.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-19-ssl-authentication-path"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-19-ssl-authentication-path"}},[e._v("#")]),e._v(" 3.3.19. SSL authentication path")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_SSL_AUTH_PATH")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--ssl-auth-path")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v("None")]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": a filepath")]),e._v(" "),a("p",[e._v("Enables client authentication in the specified path.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-20-ssl-certificates-path"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-20-ssl-certificates-path"}},[e._v("#")]),e._v(" 3.3.20. SSL certificates path")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_SSL_CERT_PATH")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--ssl-cert-path")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v("None")]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": a filepath pointing to a valid SSL certificate")]),e._v(" "),a("p",[e._v("Sets the server's SSL certificates.")]),e._v(" "),a("p",[e._v("Value must be a path to PEM-formatted certificates. The first certificate should certify the KEYFILE supplied by "),a("code",[e._v("--ssl-key-path")]),e._v(". The last certificate should be a root CA.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-21-ssl-key-path"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-21-ssl-key-path"}},[e._v("#")]),e._v(" 3.3.21. SSL key path")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_SSL_KEY_PATH")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--ssl-key-path")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v("None")]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": a filepath pointing to a valid SSL keyfile")]),e._v(" "),a("p",[e._v("Sets the server's SSL keyfiles.")]),e._v(" "),a("p",[e._v("Value must be a path to an RSA private key or PKCS8-encoded private key, both in PEM format.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-22-ssl-ocsp-path"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-22-ssl-ocsp-path"}},[e._v("#")]),e._v(" 3.3.22. SSL OCSP path")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_SSL_OCSP_PATH")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--ssl-ocsp-path")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v("None")]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": a filepath pointing to a valid OCSP certificate")]),e._v(" "),a("p",[e._v("Sets the server's OCSP file. "),a("em",[e._v("Optional")])]),e._v(" "),a("p",[e._v("Reads DER-encoded OCSP response from OCSPFILE and staple to certificate.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-23-ssl-require-auth"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-23-ssl-require-auth"}},[e._v("#")]),e._v(" 3.3.23. SSL require auth")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_SSL_REQUIRE_AUTH")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--ssl-require-auth")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Disabled")]),e._v(" "),a("p",[e._v("⚠️ This command-line option does not take any values. Assigning a value will throw an error.")]),e._v(" "),a("p",[e._v("Makes SSL authentication mandatory.")]),e._v(" "),a("p",[e._v("Sends a fatal alert if the client does not complete client authentication.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-24-ssl-resumption"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-24-ssl-resumption"}},[e._v("#")]),e._v(" 3.3.24. SSL resumption")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_SSL_RESUMPTION")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--ssl-resumption")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Disabled")]),e._v(" "),a("p",[e._v("⚠️ This command-line option does not take any values. Assigning a value will throw an error.")]),e._v(" "),a("p",[e._v("Activates SSL session resumption.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-25-ssl-tickets"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-25-ssl-tickets"}},[e._v("#")]),e._v(" 3.3.25. SSL tickets")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_SSL_TICKETS")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--ssl-tickets")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Disabled")]),e._v(" "),a("p",[e._v("⚠️ This command-line option does not take any values. Assigning a value will throw an error.")]),e._v(" "),a("p",[e._v("Activates SSL tickets.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-26-config-file-path"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-26-config-file-path"}},[e._v("#")]),e._v(" 3.3.26. Config file path")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_CONFIG_FILE_PATH")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--config-file-path")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": "),a("code",[e._v("./config.toml")])]),e._v(" "),a("p",[e._v("Define the config file to load at Meilisearch launch.")]),e._v(" "),a("p",[e._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0185-configuration-file.html"}},[e._v("Configuration File")]),e._v(" specification details.")],1),e._v(" "),a("h4",{attrs:{id:"_3-3-27-experimental-enable-metrics"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-27-experimental-enable-metrics"}},[e._v("#")]),e._v(" 3.3.27. Experimental enable Metrics")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_EXPERIMENTAL_ENABLE_METRICS")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--experimental-enable-metrics")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Disabled")]),e._v(" "),a("p",[e._v("⚠️ This command-line option does not take any values. Assigning a value will throw an error.")]),e._v(" "),a("p",[e._v("Activate the "),a("code",[e._v("/metrics")]),e._v(" endpoint to collect Meilisearch metrics for monitoring purposes. See "),a("RouterLink",{attrs:{to:"/specifications/text/0174-metrics-api.html"}},[e._v("0174-metrics-api.md")]),e._v(".")],1),e._v(" "),a("h4",{attrs:{id:"_3-3-28-experimental-reduce-indexing-memory-usage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-28-experimental-reduce-indexing-memory-usage"}},[e._v("#")]),e._v(" 3.3.28. Experimental Reduce Indexing Memory Usage")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_EXPERIMENTAL_REDUCE_INDEXING_MEMORY_USAGE")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--experimental-reduce-indexing-memory-usage")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Disabled")]),e._v(" "),a("p",[e._v("⚠️ This command-line option does not take any values. Assigning a value will throw an error.")]),e._v(" "),a("p",[e._v("Enables the "),a("code",[e._v("MDB_WRITEMAP")]),e._v(" option of LMDB, making the internal key-value store use much less RAM than usual.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-29-experimental-replication-parameters"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-29-experimental-replication-parameters"}},[e._v("#")]),e._v(" 3.3.29. Experimental replication parameters")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_EXPERIMENTAL_REPLICATION_PARAMETERS")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--experimental-replication-parameters")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Disabled")]),e._v(" "),a("p",[e._v("⚠️ This command-line option does not take any values. Assigning a value will throw an error.")]),e._v(" "),a("p",[e._v("Enable a bunch of features to help you run meilisearch in a replicated environment.\nSee the following discussion: "),a("a",{attrs:{href:"https://github.com/orgs/meilisearch/discussions/725",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://github.com/orgs/meilisearch/discussions/725"),a("OutboundLink")],1)]),e._v(" "),a("h4",{attrs:{id:"_3-3-29-task-webhook-url"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-29-task-webhook-url"}},[e._v("#")]),e._v(" 3.3.29. Task webhook url")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_TASK_WEBHOOK_URL")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--task-webhook-url")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Disabled\n"),a("strong",[e._v("Expected value")]),e._v(": an url to your server")]),e._v(" "),a("p",[e._v("Sets the URL where Meilisearch will send a notification every time it processes a batch of tasks.\n⚠️ If the URL is not correctly formatted, it'll throw an error before starting.\n⚠️ If the URL is correctly formatted but doesn't point to a valid server, Meilisearch won't return an error but will log one every time it processes a batch of tasks.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-30-experimental-logs-mode"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-30-experimental-logs-mode"}},[e._v("#")]),e._v(" 3.3.30. Experimental Logs Mode")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_EXPERIMENTAL_LOGS_MODE")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--experimental-logs-mode")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": "),a("code",[e._v("human")])]),e._v(" "),a("p",[e._v("Lets you customize the mode in which meilisearch should output its logs.\nOnly two values are possible:")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("human")]),e._v(" => The default one; it's easy to read for a human")]),e._v(" "),a("li",[a("code",[e._v("json")]),e._v(" => It's better if you're going to send your logs to a log storage software")])]),e._v(" "),a("h4",{attrs:{id:"_3-3-31-task-webhook-authorization-header"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-31-task-webhook-authorization-header"}},[e._v("#")]),e._v(" 3.3.31. Task webhook authorization header")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_TASK_WEBHOOK_AUTHORIZATION_HEADER")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--task-webhook-authorization-header")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Disabled\n"),a("strong",[e._v("Expected value")]),e._v(": a string representing the value of the authorization header you want to send with the processed tasks")]),e._v(" "),a("p",[e._v("Sets the authorization header value that meilisearch must send with the processed tasks.")]),e._v(" "),a("h2",{attrs:{id:"_4-technical-aspects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-aspects"}},[e._v("#")]),e._v(" 4. Technical Aspects")]),e._v(" "),a("p",[e._v("N/A")]),e._v(" "),a("h2",{attrs:{id:"_5-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),a("ul",[a("li",[e._v("Redo the command-line to create a more interactive CLI")]),e._v(" "),a("li",[e._v("Autocomplete for the options when using the Meilisearch CLI")])])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[35],{459:function(e,t,a){"use strict";a.r(t);var s=a(62),i=Object(s.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("ul",[a("li",[e._v("Title: Instance options")]),e._v(" "),a("li",[e._v("Start Date: 2022-03-01")])]),e._v(" "),a("h1",{attrs:{id:"instance-options"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#instance-options"}},[e._v("#")]),e._v(" Instance options")]),e._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("The instance options let the users configure Meilisearch when launching the search engine using")]),e._v(" "),a("ul",[a("li",[e._v("environment variables")]),e._v(" "),a("li",[e._v("command-line options")])]),e._v(" "),a("p",[e._v("An example when setting an environment variable to change the folder path where the Meilisearch data are stored:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("MEILI_DB_PATH")]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("./meilifiles\n./meilisearch\n")])])]),a("p",[e._v("Same behavior using the command-line option:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("./meilisearch --db-path ./meilifiles\n")])])]),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[e._v("When Meilisearch is launched, the default configuration may not meet the specific needs of users. Meilisearch exposes configurable options to allow users to fine-tune the behavior of the search engine.")]),e._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("p",[e._v("The users can configure Meilisearch when launching the search engine using")]),e._v(" "),a("ul",[a("li",[a("strong",[e._v("environment variables")]),e._v(". Ex: "),a("code",[e._v("--db-path")])]),e._v(" "),a("li",[a("strong",[e._v("command-line options or CLI options")]),e._v(". Ex: "),a("code",[e._v("MEILI_DB_PATH")])])]),e._v(" "),a("p",[e._v("There are 2 categories of CLI (command-line interface) options:")]),e._v(" "),a("ul",[a("li",[e._v("the ones that expect a value. Ex: "),a("code",[e._v('--db-path "./my_path"')]),e._v(".")]),e._v(" "),a("li",[e._v('the ones that don\'t expect any value, called also "flags". Ex: '),a("code",[e._v("--no-analytics")]),e._v(". Their implicit values are booleans.")])]),e._v(" "),a("h3",{attrs:{id:"_3-1-some-specific-behaviors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-some-specific-behaviors"}},[e._v("#")]),e._v(" 3.1. Some specific behaviors")]),e._v(" "),a("h4",{attrs:{id:"_3-1-1-priority-between-cli-options-and-environment-variables"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-priority-between-cli-options-and-environment-variables"}},[e._v("#")]),e._v(" 3.1.1. Priority between CLI options and environment variables")]),e._v(" "),a("p",[e._v("Command-line options take precedence over environment variables. If the same configuration option is specified both as a command-line option and as an environment variable, Meilisearch will use the command-line option and its respective value.")]),e._v(" "),a("h4",{attrs:{id:"_3-1-2-flags-accepted-values-for-the-corresponding-environment-variable"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-flags-accepted-values-for-the-corresponding-environment-variable"}},[e._v("#")]),e._v(" 3.1.2. Flags: accepted values for the corresponding environment variable")]),e._v(" "),a("p",[e._v("The options that do not expect any value when using the command-line option accepts the following value when using the corresponding environment variable: "),a("code",[e._v("n")]),e._v(", "),a("code",[e._v("no")]),e._v(", "),a("code",[e._v("f")]),e._v(", "),a("code",[e._v("false")]),e._v(", "),a("code",[e._v("off")]),e._v(", and "),a("code",[e._v("0")]),e._v(" as "),a("code",[e._v("false")]),e._v(". An absent environment variable will also be considered as "),a("code",[e._v("false")]),e._v(". Everything else is considered "),a("code",[e._v("true")]),e._v(".")]),e._v(" "),a("p",[e._v("Example with the option to make SSL mandatory:")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("export MEILI_SSL_REQUIRE_AUTH=yes")]),e._v(" means that mandatory SSL is enabled.")]),e._v(" "),a("li",[a("code",[e._v("export MEILI_SSL_REQUIRE_AUTH=off")]),e._v(" means that mandatory SSL is disabled.")]),e._v(" "),a("li",[e._v("No variable set means that mandatory SSL is disabled.")])]),e._v(" "),a("h3",{attrs:{id:"_3-2-error-behavior"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-error-behavior"}},[e._v("#")]),e._v(" 3.2. Error behavior")]),e._v(" "),a("ol",[a("li",[e._v("Some configuration options must specify a value to be valid. Using such a command-line option or an environment variable without specifying a value will throw an error and interrupt the launch process.")])]),e._v(" "),a("p",[e._v("Example:")]),e._v(" "),a("p",[e._v("❌ Wrong")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("./meilisearch --db-path\n\nerror: The argument "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v("'--db-path '")]),e._v(" requires a value but none was supplied\n")])])]),a("p",[e._v("✅ Correct")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("./meilisearch --db-path ./meilifiles\n")])])]),a("ol",{attrs:{start:"2"}},[a("li",[e._v("Some command-line options take an implicit boolean as a value. In this case, the users should not set any value when using the option.")])]),e._v(" "),a("p",[e._v("❌ Wrong")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("./meilisearch --ssl-require-auth "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("yes")]),e._v("\n\nerror: Found argument "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v("'yes'")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("which")]),e._v(" wasn"),a("span",{pre:!0,attrs:{class:"token string"}},[e._v("'t expected, or isn'")]),e._v("t valid "),a("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("in")]),e._v(" this context\n")])])]),a("p",[e._v("✅ Correct")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("./meilisearch --ssl-require-auth\n")])])]),a("p",[e._v("The expected behavior of each flag is described in the list above.")]),e._v(" "),a("h3",{attrs:{id:"_3-3-exhaustive-list-of-options"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-exhaustive-list-of-options"}},[e._v("#")]),e._v(" 3.3. Exhaustive list of options")]),e._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"#331-database-path"}},[e._v("Database path")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#332-environment"}},[e._v("Environment")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#333-http-address--port-binding"}},[e._v("HTTP address & port binding")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#334-master-key"}},[e._v("Master key")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#335-disable-analytics"}},[e._v("Disable analytics")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#336-dump-directory"}},[e._v("Dump directory")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#337-import-dump"}},[e._v("Import dump")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#338-ignore-missing-dump"}},[e._v("Ignore missing dump")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#339-ignore-dump-if-db-exists"}},[e._v("Ignore dump if DB exists")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3310-log-level"}},[e._v("Log level")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3311-payload-limit-size"}},[e._v("Payload limit size")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3312-schedule-snapshot-creation"}},[e._v("Schedule snapshot creation")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3313-snapshot-destination"}},[e._v("Snapshot destination")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3314-import-snapshot"}},[e._v("Import snapshot")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3315-ignore-missing-snapshot"}},[e._v("Ignore missing snapshot")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3316-ignore-snapshot-if-db-exists"}},[e._v("Ignore snapshot if DB exists")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3317-max-memory-usage-when-indexing"}},[e._v("Max memory usage when indexing")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3318-max-indexing-threads"}},[e._v("Max indexing threads")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3319-ssl-authentication-path"}},[e._v("SSL authentication path")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3320-ssl-certificates-path"}},[e._v("SSL certificates path")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3321-ssl-key-path"}},[e._v("SSL key path")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3322-ssl-ocsp-path"}},[e._v("SSL OCSP path")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3323-ssl-require-auth"}},[e._v("SSL require auth")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3324-ssl-resumption"}},[e._v("SSL resumption")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3325-ssl-tickets"}},[e._v("SSL tickets")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3326-config-file-path"}},[e._v("Config file path")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3327-experimental-enable-metrics"}},[e._v("Experimental enable Metrics")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3328-experimental-reduce-indexing-memory-usage"}},[e._v("Experimental reduce indexing memory usage")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3329-task-webhook-url"}},[e._v("Task webhook url")])]),e._v(" "),a("li",[a("a",{attrs:{href:"#3330-task-webhook-authorization-header"}},[e._v("Task webhook authorization header")])])]),e._v(" "),a("h4",{attrs:{id:"_3-3-1-database-path"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-database-path"}},[e._v("#")]),e._v(" 3.3.1. Database path")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_DB_PATH")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--db-path")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v('"data.ms/"')]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": a filepath")]),e._v(" "),a("p",[e._v("Designates the location where database files will be created and retrieved.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-2-environment"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-environment"}},[e._v("#")]),e._v(" 3.3.2. Environment")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_ENV")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--env")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v("development")]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": "),a("code",[e._v("production")]),e._v(" or "),a("code",[e._v("development")])]),e._v(" "),a("p",[e._v("Configures the instance's environment. Value must be either "),a("code",[e._v("production")]),e._v(" or "),a("code",[e._v("development")]),e._v(".")]),e._v(" "),a("p",[a("code",[e._v("production")]),e._v(":")]),e._v(" "),a("ul",[a("li",[e._v("Setting a master key of at least 16 bytes is "),a("strong",[e._v("mandatory")])]),e._v(" "),a("li",[e._v("The search preview interface is disabled")])]),e._v(" "),a("p",[a("code",[e._v("development")]),e._v(":")]),e._v(" "),a("ul",[a("li",[e._v("Setting a master key is "),a("strong",[e._v("optional")])]),e._v(" "),a("li",[e._v("Setting a master key of at least 16 bytes is "),a("strong",[e._v("optional")])]),e._v(" "),a("li",[e._v("Search preview is enabled")])]),e._v(" "),a("h4",{attrs:{id:"_3-3-3-http-address-port-binding"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-http-address-port-binding"}},[e._v("#")]),e._v(" 3.3.3. HTTP address & port binding")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_HTTP_ADDR")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--http-addr")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v('"localhost:7700"')]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": an HTTP address and port")]),e._v(" "),a("p",[e._v("Sets the HTTP address and port Meilisearch will use.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-4-master-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-master-key"}},[e._v("#")]),e._v(" 3.3.4. Master key")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_MASTER_KEY")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--master-key")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v("None")]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": an alphanumeric string")]),e._v(" "),a("p",[e._v("Sets the instance's master key, automatically protecting all routes except "),a("RouterLink",{attrs:{to:"/reference/api/health.html"}},[a("code",[e._v("GET /health")])]),e._v(". This means you will need an API key to access endpoints such as "),a("code",[e._v("POST /search")]),e._v(" and "),a("code",[e._v("GET /documents")]),e._v(".")],1),e._v(" "),a("p",[e._v("You must supply an alphanumeric string when using this option.")]),e._v(" "),a("p",[e._v("If no master key is provided in a "),a("code",[e._v("development")]),e._v(" environment, all routes will be unprotected and publicly accessible.")]),e._v(" "),a("h5",{attrs:{id:"_3-3-4-1-error-and-warning-messages"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-1-error-and-warning-messages"}},[e._v("#")]),e._v(" 3.3.4.1. Error and Warning messages")]),e._v(" "),a("p",[e._v("Providing a master key of at least 16 bytes is mandatory when "),a("code",[e._v("--env")]),e._v(" is set to "),a("code",[e._v("production")]),e._v("; if none is given, Meilisearch will throw an error and refuse to launch.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("Error: You must provide a master key to secure your instance in a production environment. It can be specified via the MEILI_MASTER_KEY environment variable or the --master-key launch option.\n\nWe generated a secure master key for you (you can safely use this token):\n\n>> --master-key `:suggestedMasterKey` <<\n")])])]),a("p",[e._v("Providing a master key of at least 16 bytes is mandatory when "),a("code",[e._v("--env")]),e._v(" is set to "),a("code",[e._v("production")]),e._v("; if it is given but too short then, Meilisearch will throw an error and refuse to launch.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("Error: The master key must be at least 16 bytes in a production environment. The provided key is only `:numBytes` bytes.\n\nWe generated a secure master key for you (you can safely use this token):\n\n>> --master-key `:suggestedMasterKey` <<\n")])])]),a("p",[e._v("Providing a master key of less than 16 bytes when "),a("code",[e._v("--env")]),e._v(" is set to "),a("code",[e._v("development")]),e._v(" displays a warning message.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("Meilisearch started with a master key considered unsafe for use in a production environment.\n\nA master key of at least 16 bytes will be required when switching to a production environment.\n\nWe generated a new secure master key for you (you can safely use this token):\n\n>> --master-key `:suggestedMasterKey` <<\n\nRestart Meilisearch with the argument above to use this new and secure master key.\n")])])]),a("p",[e._v("Not providing a master key when "),a("code",[e._v("--env")]),e._v(" is set to "),a("code",[e._v("development")]),e._v(" displays a warning message.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("No master key was found. The server will accept unidentified requests.\n\nA master key of at least 16 bytes will be required when switching to a production environment.\n\nIf you need protection in a development environment, we generated a secure master key for you (you can safely use this token):\n\n>> --master-key `:suggestedMasterKey` <<\n\nRestart Meilisearch with the argument above to use this new and secure master key.\n")])])]),a("h4",{attrs:{id:"_3-3-5-disable-analytics"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-5-disable-analytics"}},[e._v("#")]),e._v(" 3.3.5. Disable analytics")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_NO_ANALYTICS")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--no-analytics")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Enabled")]),e._v(" "),a("p",[e._v("⚠️ This command-line option does not take any values. Assigning a value will throw an error.")]),e._v(" "),a("p",[e._v("Deactivates Meilisearch's built-in telemetry collect when enabled.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-6-dump-directory"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-6-dump-directory"}},[e._v("#")]),e._v(" 3.3.6. Dump directory")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_DUMP_DIR")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--dump-dir")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v("dumps/")]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": a filepath pointing to a valid directory")]),e._v(" "),a("p",[e._v("Sets the directory where Meilisearch will create dump files. If the directory does not exist when a dump is generated it will be created.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-7-import-dump"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-7-import-dump"}},[e._v("#")]),e._v(" 3.3.7. Import dump")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_IMPORT_DUMP")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--import-dump")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v("none")]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": a filepath pointing to a "),a("code",[e._v(".dump")]),e._v(" file")]),e._v(" "),a("p",[e._v("Imports the dump file located at the specified path. Path must point to a "),a("code",[e._v(".dump")]),e._v(" file.")]),e._v(" "),a("p",[e._v("Meilisearch will only launch once the dump data has been fully indexed.")]),e._v(" "),a("p",[e._v("More regarding dump behaviors in this "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/blob/develop/text/0105-dumps-api.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("spec"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("h4",{attrs:{id:"_3-3-8-ignore-missing-dump"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-8-ignore-missing-dump"}},[e._v("#")]),e._v(" 3.3.8. Ignore missing dump")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_IGNORE_MISSING_DUMP")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--ignore-missing-dump")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Disabled")]),e._v(" "),a("p",[e._v("⚠️ This command-line option does not take any values. Assigning a value will throw an error.")]),e._v(" "),a("p",[e._v("Prevents a Meilisearch instance from throwing an error when "),a("code",[e._v("--import-dump")]),e._v(" does not point to a valid dump file.")]),e._v(" "),a("p",[e._v("This command will throw an error if "),a("code",[e._v("--import-dump")]),e._v(" is not defined.")]),e._v(" "),a("p",[e._v("More information in this "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/blob/develop/text/0105-dumps-api.md#138---ignore-missing-dump",target:"_blank",rel:"noopener noreferrer"}},[e._v("section of the spec"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("h4",{attrs:{id:"_3-3-9-ignore-dump-if-db-exists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-9-ignore-dump-if-db-exists"}},[e._v("#")]),e._v(" 3.3.9. Ignore dump if DB exists")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_IGNORE_DUMP_IF_DB_EXISTS")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--ignore-dump-if-db-exists")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Disabled")]),e._v(" "),a("p",[e._v("⚠️ This command-line option does not take any values. Assigning a value will throw an error.")]),e._v(" "),a("p",[e._v("Prevents a Meilisearch instance with an existing database from throwing an error when using "),a("code",[e._v("--import-dump")]),e._v(". Instead, the dump will be ignored and Meilisearch will launch using the existing database.")]),e._v(" "),a("p",[e._v("This command will throw an error if "),a("code",[e._v("--import-dump")]),e._v(" is not defined.")]),e._v(" "),a("p",[e._v("More information in this "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/blob/develop/text/0105-dumps-api.md#137---ignore-dump-if-db-exists",target:"_blank",rel:"noopener noreferrer"}},[e._v("section of the spec"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("h4",{attrs:{id:"_3-3-10-log-level"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-10-log-level"}},[e._v("#")]),e._v(" 3.3.10. Log level")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_LOG_LEVEL")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--log-level")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v("'INFO'")]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": one of "),a("code",[e._v("ERROR")]),e._v(", "),a("code",[e._v("WARN")]),e._v(", "),a("code",[e._v("INFO")]),e._v(", "),a("code",[e._v("DEBUG")]),e._v(", "),a("code",[e._v("TRACE")]),e._v(", or "),a("code",[e._v("OFF")])]),e._v(" "),a("p",[e._v("Defines how much detail should be present in Meilisearch's logs.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-11-payload-limit-size"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-11-payload-limit-size"}},[e._v("#")]),e._v(" 3.3.11. Payload limit size")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_HTTP_PAYLOAD_SIZE_LIMIT")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--http-payload-size-limit")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v("104857600")]),e._v(" (~100MB)\n"),a("strong",[e._v("Expected value")]),e._v(": an integer ("),a("code",[e._v("104857600")]),e._v(") or a human readable size ("),a("code",[e._v("100Mb")]),e._v(")")]),e._v(" "),a("p",[e._v("Sets the maximum size of accepted payloads. Value must be given in bytes or explicitly stating a base unit. For example, the default value can be written as "),a("code",[e._v("107374182400")]),e._v(", "),a("code",[e._v("'107.7Gb'")]),e._v(", or "),a("code",[e._v("'107374 Mb'")]),e._v(".")]),e._v(" "),a("h4",{attrs:{id:"_3-3-12-schedule-snapshot-creation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-12-schedule-snapshot-creation"}},[e._v("#")]),e._v(" 3.3.12. Schedule snapshot creation")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_SCHEDULE_SNAPSHOT")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--schedule-snapshot")]),e._v(" "),a("strong",[e._v("Default when absent")]),e._v(": Disabled\n"),a("strong",[e._v("Optional value")]),e._v(": an integer")]),e._v(" "),a("p",[e._v("⚠️ This command-line option takes an "),a("strong",[e._v("optional")]),e._v(" integer value. Passing the flag with no value implies the default value of 86400.")]),e._v(" "),a("ul",[a("li",[e._v("Omitting the flag, not defining "),a("code",[e._v("MEILI_SCHEDULE_SNAPSHOT")]),e._v(", or specifying "),a("code",[e._v("schedule_snapshot=false")]),e._v(" in the configuration file disables the scheduled snapshots, and is the default behavior.")]),e._v(" "),a("li",[e._v("Passing the flag without a value or specifying "),a("code",[e._v("schedule_snapshot=true")]),e._v(" in the configuration file enables the scheduled snapshot with the default interval of 86400 seconds between each snapshot.")]),e._v(" "),a("li",[e._v("Passing the flag with an integer value, defining the "),a("code",[e._v("MEILI_SCHEDULE_SNAPSHOT")]),e._v(" to an integer value, or specifying "),a("code",[e._v("schedule_snapshot=x")]),e._v(" with "),a("code",[e._v("x")]),e._v(" an integer value in the configuration file enables the scheduled snapshots with an interval between each snapshot of the specified integer value, in seconds.")])]),e._v(" "),a("h4",{attrs:{id:"_3-3-13-snapshot-destination"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-13-snapshot-destination"}},[e._v("#")]),e._v(" 3.3.13. Snapshot destination")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_SNAPSHOT_DIR")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--snapshot-dir")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v("snapshots/")]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": a filepath pointing to a valid directory")]),e._v(" "),a("p",[e._v("Sets the directory where Meilisearch will store snapshots. If the directory does not exist when a snapshot is generated it will be created.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-14-import-snapshot"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-14-import-snapshot"}},[e._v("#")]),e._v(" 3.3.14. Import snapshot")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_IMPORT_SNAPSHOT")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--import-snapshot")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v("None")]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": a filepath pointing to a snapshot file")]),e._v(" "),a("p",[e._v("Launches Meilisearch after importing a previously-generated snapshot at the given filepath.")]),e._v(" "),a("p",[e._v("This command will throw an error if:")]),e._v(" "),a("ul",[a("li",[e._v("A database already exists")]),e._v(" "),a("li",[e._v("No valid snapshot can be found in the specified path")])]),e._v(" "),a("p",[e._v("This behavior can be modified with the "),a("code",[e._v("--ignore-snapshot-if-db-exists")]),e._v(" and "),a("code",[e._v("--ignore-missing-snapshot")]),e._v(" options, respectively.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-15-ignore-missing-snapshot"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-15-ignore-missing-snapshot"}},[e._v("#")]),e._v(" 3.3.15. Ignore missing snapshot")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_IGNORE_MISSING_SNAPSHOT")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--ignore-missing-snapshot")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Disabled")]),e._v(" "),a("p",[e._v("⚠️ This command-line option does not take any values. Assigning a value will throw an error.")]),e._v(" "),a("p",[e._v("Prevents a Meilisearch instance from throwing an error when "),a("code",[e._v("--import-snapshot")]),e._v(" does not point to a valid snapshot file.")]),e._v(" "),a("p",[e._v("This command will throw an error if "),a("code",[e._v("--import-snapshot")]),e._v(" is not defined.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-16-ignore-snapshot-if-db-exists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-16-ignore-snapshot-if-db-exists"}},[e._v("#")]),e._v(" 3.3.16. Ignore snapshot if DB exists")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_IGNORE_SNAPSHOT_IF_DB_EXISTS")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--ignore-snapshot-if-db-exists")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Disabled")]),e._v(" "),a("p",[e._v("⚠️ This command-line option does not take any values. Assigning a value will throw an error.")]),e._v(" "),a("p",[e._v("Prevents a Meilisearch instance with an existing database from throwing an error when using "),a("code",[e._v("--import-snapshot")]),e._v(". Instead, the snapshot will be ignored and Meilisearch will launch using the existing database.")]),e._v(" "),a("p",[e._v("This command will throw an error if "),a("code",[e._v("--import-snapshot")]),e._v(" is not defined.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-17-max-memory-usage-when-indexing"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-17-max-memory-usage-when-indexing"}},[e._v("#")]),e._v(" 3.3.17. Max memory usage when indexing")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_MAX_INDEXING_MEMORY")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--max-indexing-memory")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": 2/3 of the available RAM of the machine\n"),a("strong",[e._v("Expected value")]),e._v(": an integer ("),a("code",[e._v("104857600")]),e._v(") or a human readable size ("),a("code",[e._v("100Mb")]),e._v(")")]),e._v(" "),a("p",[e._v("Set the maximum size of the RAM used by Meilisearch when indexing. By default, Meilisearch adapts its behavior to make the indexation use at maximum two-thirds of the available resources.")]),e._v(" "),a("p",[e._v("Value must be given in bytes or explicitly stating a base unit. For example, the default value can be written as "),a("code",[e._v("107374182400")]),e._v(", "),a("code",[e._v("'107.7Gb'")]),e._v(", or "),a("code",[e._v("'107374 Mb'")]),e._v(".")]),e._v(" "),a("p",[e._v("⚠️ WARNINGS")]),e._v(" "),a("ul",[a("li",[e._v("We do not recommend setting the full RAM size of your machine. For example, when running Meilisearch on a machine with 4GB of RAM, do not set this options to "),a("code",[e._v("4Gb")])]),e._v(" "),a("li",[e._v("This command-line option does not perfectly ensure the RAM usage but helps you manage multiple Meilisearch engines on the same machine (for example, using Kubernetes). The search engine cannot guarantee the exact usage of the RAM.")]),e._v(" "),a("li",[e._v("If the number set is higher than the real available RAM in the machine, we cannot prevent Meilisearch from crashing.")])]),e._v(" "),a("h4",{attrs:{id:"_3-3-18-max-indexing-threads"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-18-max-indexing-threads"}},[e._v("#")]),e._v(" 3.3.18. Max indexing threads")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_MAX_INDEXING_THREADS")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--max-indexing-threads")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": half of the available threads of the machine\n"),a("strong",[e._v("Expected value")]),e._v(": an integer")]),e._v(" "),a("p",[e._v("Sets the maximum number of threads available to use during the indexation.")]),e._v(" "),a("p",[e._v("By default, in machines with multi-core processors, the indexer avoids using more than half of the available processing units. For example, if your machine has twelve cores, the indexer will try to use six of them at most. This ensures Meilisearch is always ready to perform searches, even while you are updating an index.\nUsers have to be aware that requiring the totality of the threads for the indexation can lead to a huge impact on the search experience.")]),e._v(" "),a("p",[e._v("Obviously, multi-threading is not possible in machines with only one processor core.")]),e._v(" "),a("p",[e._v("If the number set is higher than the real number of core available in the machine, Meilisearch will use the maximum number of available cores.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-19-ssl-authentication-path"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-19-ssl-authentication-path"}},[e._v("#")]),e._v(" 3.3.19. SSL authentication path")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_SSL_AUTH_PATH")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--ssl-auth-path")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v("None")]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": a filepath")]),e._v(" "),a("p",[e._v("Enables client authentication in the specified path.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-20-ssl-certificates-path"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-20-ssl-certificates-path"}},[e._v("#")]),e._v(" 3.3.20. SSL certificates path")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_SSL_CERT_PATH")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--ssl-cert-path")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v("None")]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": a filepath pointing to a valid SSL certificate")]),e._v(" "),a("p",[e._v("Sets the server's SSL certificates.")]),e._v(" "),a("p",[e._v("Value must be a path to PEM-formatted certificates. The first certificate should certify the KEYFILE supplied by "),a("code",[e._v("--ssl-key-path")]),e._v(". The last certificate should be a root CA.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-21-ssl-key-path"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-21-ssl-key-path"}},[e._v("#")]),e._v(" 3.3.21. SSL key path")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_SSL_KEY_PATH")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--ssl-key-path")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v("None")]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": a filepath pointing to a valid SSL keyfile")]),e._v(" "),a("p",[e._v("Sets the server's SSL keyfiles.")]),e._v(" "),a("p",[e._v("Value must be a path to an RSA private key or PKCS8-encoded private key, both in PEM format.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-22-ssl-ocsp-path"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-22-ssl-ocsp-path"}},[e._v("#")]),e._v(" 3.3.22. SSL OCSP path")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_SSL_OCSP_PATH")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--ssl-ocsp-path")]),e._v(" "),a("strong",[e._v("Default value")]),e._v(": "),a("code",[e._v("None")]),e._v(" "),a("strong",[e._v("Expected value")]),e._v(": a filepath pointing to a valid OCSP certificate")]),e._v(" "),a("p",[e._v("Sets the server's OCSP file. "),a("em",[e._v("Optional")])]),e._v(" "),a("p",[e._v("Reads DER-encoded OCSP response from OCSPFILE and staple to certificate.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-23-ssl-require-auth"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-23-ssl-require-auth"}},[e._v("#")]),e._v(" 3.3.23. SSL require auth")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_SSL_REQUIRE_AUTH")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--ssl-require-auth")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Disabled")]),e._v(" "),a("p",[e._v("⚠️ This command-line option does not take any values. Assigning a value will throw an error.")]),e._v(" "),a("p",[e._v("Makes SSL authentication mandatory.")]),e._v(" "),a("p",[e._v("Sends a fatal alert if the client does not complete client authentication.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-24-ssl-resumption"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-24-ssl-resumption"}},[e._v("#")]),e._v(" 3.3.24. SSL resumption")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_SSL_RESUMPTION")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--ssl-resumption")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Disabled")]),e._v(" "),a("p",[e._v("⚠️ This command-line option does not take any values. Assigning a value will throw an error.")]),e._v(" "),a("p",[e._v("Activates SSL session resumption.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-25-ssl-tickets"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-25-ssl-tickets"}},[e._v("#")]),e._v(" 3.3.25. SSL tickets")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_SSL_TICKETS")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--ssl-tickets")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Disabled")]),e._v(" "),a("p",[e._v("⚠️ This command-line option does not take any values. Assigning a value will throw an error.")]),e._v(" "),a("p",[e._v("Activates SSL tickets.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-26-config-file-path"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-26-config-file-path"}},[e._v("#")]),e._v(" 3.3.26. Config file path")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_CONFIG_FILE_PATH")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--config-file-path")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": "),a("code",[e._v("./config.toml")])]),e._v(" "),a("p",[e._v("Define the config file to load at Meilisearch launch.")]),e._v(" "),a("p",[e._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0185-configuration-file.html"}},[e._v("Configuration File")]),e._v(" specification details.")],1),e._v(" "),a("h4",{attrs:{id:"_3-3-27-experimental-enable-metrics"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-27-experimental-enable-metrics"}},[e._v("#")]),e._v(" 3.3.27. Experimental enable Metrics")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_EXPERIMENTAL_ENABLE_METRICS")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--experimental-enable-metrics")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Disabled")]),e._v(" "),a("p",[e._v("⚠️ This command-line option does not take any values. Assigning a value will throw an error.")]),e._v(" "),a("p",[e._v("Activate the "),a("code",[e._v("/metrics")]),e._v(" endpoint to collect Meilisearch metrics for monitoring purposes. See "),a("RouterLink",{attrs:{to:"/specifications/text/0174-metrics-api.html"}},[e._v("0174-metrics-api.md")]),e._v(".")],1),e._v(" "),a("h4",{attrs:{id:"_3-3-28-experimental-reduce-indexing-memory-usage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-28-experimental-reduce-indexing-memory-usage"}},[e._v("#")]),e._v(" 3.3.28. Experimental Reduce Indexing Memory Usage")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_EXPERIMENTAL_REDUCE_INDEXING_MEMORY_USAGE")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--experimental-reduce-indexing-memory-usage")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Disabled")]),e._v(" "),a("p",[e._v("⚠️ This command-line option does not take any values. Assigning a value will throw an error.")]),e._v(" "),a("p",[e._v("Enables the "),a("code",[e._v("MDB_WRITEMAP")]),e._v(" option of LMDB, making the internal key-value store use much less RAM than usual.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-29-experimental-replication-parameters"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-29-experimental-replication-parameters"}},[e._v("#")]),e._v(" 3.3.29. Experimental replication parameters")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_EXPERIMENTAL_REPLICATION_PARAMETERS")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--experimental-replication-parameters")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Disabled")]),e._v(" "),a("p",[e._v("⚠️ This command-line option does not take any values. Assigning a value will throw an error.")]),e._v(" "),a("p",[e._v("Enable a bunch of features to help you run meilisearch in a replicated environment.\nSee the following discussion: "),a("a",{attrs:{href:"https://github.com/orgs/meilisearch/discussions/725",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://github.com/orgs/meilisearch/discussions/725"),a("OutboundLink")],1)]),e._v(" "),a("h4",{attrs:{id:"_3-3-29-task-webhook-url"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-29-task-webhook-url"}},[e._v("#")]),e._v(" 3.3.29. Task webhook url")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_TASK_WEBHOOK_URL")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--task-webhook-url")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Disabled\n"),a("strong",[e._v("Expected value")]),e._v(": an url to your server")]),e._v(" "),a("p",[e._v("Sets the URL where Meilisearch will send a notification every time it processes a batch of tasks.\n⚠️ If the URL is not correctly formatted, it'll throw an error before starting.\n⚠️ If the URL is correctly formatted but doesn't point to a valid server, Meilisearch won't return an error but will log one every time it processes a batch of tasks.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-30-experimental-logs-mode"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-30-experimental-logs-mode"}},[e._v("#")]),e._v(" 3.3.30. Experimental Logs Mode")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_EXPERIMENTAL_LOGS_MODE")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--experimental-logs-mode")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": "),a("code",[e._v("human")])]),e._v(" "),a("p",[e._v("Lets you customize the mode in which meilisearch should output its logs.\nOnly two values are possible:")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("human")]),e._v(" => The default one; it's easy to read for a human")]),e._v(" "),a("li",[a("code",[e._v("json")]),e._v(" => It's better if you're going to send your logs to a log storage software")])]),e._v(" "),a("h4",{attrs:{id:"_3-3-31-task-webhook-authorization-header"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-31-task-webhook-authorization-header"}},[e._v("#")]),e._v(" 3.3.31. Task webhook authorization header")]),e._v(" "),a("p",[a("strong",[e._v("Environment variable")]),e._v(": "),a("code",[e._v("MEILI_TASK_WEBHOOK_AUTHORIZATION_HEADER")]),e._v(" "),a("strong",[e._v("CLI option")]),e._v(": "),a("code",[e._v("--task-webhook-authorization-header")]),e._v(" "),a("strong",[e._v("Default")]),e._v(": Disabled\n"),a("strong",[e._v("Expected value")]),e._v(": a string representing the value of the authorization header you want to send with the processed tasks")]),e._v(" "),a("p",[e._v("Sets the authorization header value that meilisearch must send with the processed tasks.")]),e._v(" "),a("h2",{attrs:{id:"_4-technical-aspects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-aspects"}},[e._v("#")]),e._v(" 4. Technical Aspects")]),e._v(" "),a("p",[e._v("N/A")]),e._v(" "),a("h2",{attrs:{id:"_5-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),a("ul",[a("li",[e._v("Redo the command-line to create a more interactive CLI")]),e._v(" "),a("li",[e._v("Autocomplete for the options when using the Meilisearch CLI")])])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/37.e3f98a24.js b/docs/assets/js/37.b931d639.js similarity index 99% rename from docs/assets/js/37.e3f98a24.js rename to docs/assets/js/37.b931d639.js index 069223b68..3de0a9569 100644 --- a/docs/assets/js/37.e3f98a24.js +++ b/docs/assets/js/37.b931d639.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[37],{462:function(e,t,i){"use strict";i.r(t);var s=i(62),a=Object(s.a)({},(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[i("h1",{attrs:{id:"displayed-attributes-setting-api"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#displayed-attributes-setting-api"}},[e._v("#")]),e._v(" Displayed Attributes Setting API")]),e._v(" "),i("h2",{attrs:{id:"_1-summary"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),i("p",[e._v("This specification describes the "),i("code",[e._v("displayedAttributes")]),e._v(" setting API endpoints.")]),e._v(" "),i("h2",{attrs:{id:"_2-motivation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),i("p",[e._v("N/A")]),e._v(" "),i("h2",{attrs:{id:"_3-functional-specification"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),i("h3",{attrs:{id:"_3-1-explanations"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-explanations"}},[e._v("#")]),e._v(" 3.1. Explanations")]),e._v(" "),i("p",[e._v("Documents in Meilisearch are composed of multiple fields.")]),e._v(" "),i("p",[e._v("When a search query is performed, the fields whose attributes are added to the "),i("code",[e._v("displayedAttributes")]),e._v(" list are displayable in each matching document.")]),e._v(" "),i("p",[e._v("By default, all document fields are set as displayable.")]),e._v(" "),i("p",[e._v("Therefore, if a document field is not in the "),i("code",[e._v("displayedAttributes")]),e._v(" list, the field won't be added to the returned documents in the "),i("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#1221-hits"}},[e._v("hits")]),e._v(" array for a search query.")],1),e._v(" "),i("h4",{attrs:{id:"_3-1-1-usage-example"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-usage-example"}},[e._v("#")]),e._v(" 3.1.1. Usage Example")]),e._v(" "),i("p",[e._v("Suppose a database of movies with the following fields: "),i("code",[e._v("id")]),e._v(", "),i("code",[e._v("overview")]),e._v(", "),i("code",[e._v("genres")]),e._v(", "),i("code",[e._v("title")]),e._v(", "),i("code",[e._v("release_date")]),e._v(". Some of these fields are more useful to be displayed than others. To make the "),i("code",[e._v("id")]),e._v(" and "),i("code",[e._v("genres")]),e._v(" fields non-displayed, it can be specified in the following way.")]),e._v(" "),i("p",[i("em",[i("strong",[e._v("Request payload "),i("code",[e._v("PUT")]),e._v("- "),i("code",[e._v("/indexes/movies/settings/displayed-attributes")])])])]),e._v(" "),i("div",{staticClass:"language-json extra-class"},[i("pre",{pre:!0,attrs:{class:"language-json"}},[i("code",[i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"title"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"overview"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),i("h3",{attrs:{id:"_3-2-global-settings-api-endpoints-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-global-settings-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2. Global Settings API Endpoints Definition")]),e._v(" "),i("p",[i("code",[e._v("displayedAttributes")]),e._v(" is a sub-resource of "),i("code",[e._v("/indexes/:index_uid/settings")]),e._v(".")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0000-settings-api.html"}},[e._v("Settings API")]),e._v(".")],1),e._v(" "),i("h3",{attrs:{id:"_3-3-api-endpoints-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.3. API Endpoints Definition")]),e._v(" "),i("p",[e._v("Manipulate the "),i("code",[e._v("displayedAttributes")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h4",{attrs:{id:"_3-3-1-get-indexes-index-uid-settings-displayed-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get-indexes-index-uid-settings-displayed-attributes"}},[e._v("#")]),e._v(" 3.3.1. "),i("code",[e._v("GET")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/displayed-attributes")])]),e._v(" "),i("p",[e._v("Fetch the "),i("code",[e._v("displayedAttributes")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-1-1-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-response-definition"}},[e._v("#")]),e._v(" 3.3.1.1. Response Definition")]),e._v(" "),i("ul",[i("li",[e._v("Type: Array of String")]),e._v(" "),i("li",[e._v("Default: "),i("code",[e._v('["*"]')])])]),e._v(" "),i("h5",{attrs:{id:"_3-3-1-2-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-2-errors"}},[e._v("#")]),e._v(" 3.3.1.2. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),i("h4",{attrs:{id:"_3-3-2-put-indexes-index-uid-settings-displayed-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-put-indexes-index-uid-settings-displayed-attributes"}},[e._v("#")]),e._v(" 3.3.2. "),i("code",[e._v("PUT")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/displayed-attributes")])]),e._v(" "),i("p",[e._v("Modify the "),i("code",[e._v("displayedAttributes")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-2-1-request-payload-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-1-request-payload-definition"}},[e._v("#")]),e._v(" 3.3.2.1. Request Payload Definition")]),e._v(" "),i("ul",[i("li",[e._v("Type: Array of String / "),i("code",[e._v("null")])])]),e._v(" "),i("p",[e._v("Setting "),i("code",[e._v("null")]),e._v(" is equivalent to using the "),i("a",{attrs:{href:"#333-delete---indexesindexuidsettingsdisplayed-attributes"}},[e._v("3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/displayed-attributes")])]),e._v(" API endpoint.")]),e._v(" "),i("p",[e._v("Specifying a document attribute that does not exist as a "),i("code",[e._v("displayedAttributes")]),e._v(" index setting returns no error.")]),e._v(" "),i("p",[e._v("Specifying "),i("code",[e._v("[]")]),e._v(" for the "),i("code",[e._v("displayedAttributes")]),e._v(" index setting allows to specify that all fields are non-displayable.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-2-2-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-2-response-definition"}},[e._v("#")]),e._v(" 3.3.2.2. Response Definition")]),e._v(" "),i("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),i("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),i("code",[e._v("task")]),e._v(" Object for "),i("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),i("h5",{attrs:{id:"_3-3-2-3-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-errors"}},[e._v("#")]),e._v(" 3.3.2.3. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Omitting Content-Type header returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an empty Content-Type returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a different Content-Type than "),i("code",[e._v("application/json")]),e._v(" returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an empty payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an invalid JSON payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a request payload value type different of "),i("code",[e._v("Array of String")]),e._v(", "),i("code",[e._v("[]")]),e._v(", or "),i("code",[e._v("null")]),e._v(" returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_displayed_attributes"}},[e._v("invalid_settings_displayed_attributes")]),e._v(" error.")],1)]),e._v(" "),i("h6",{attrs:{id:"_3-3-2-3-1-async-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-1-async-errors"}},[e._v("#")]),e._v(" 3.3.2.3.1. Async Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 When Meilisearch is secured, if the API Key do not have the "),i("code",[e._v("indexes.create")]),e._v(" action defined, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related asynchronous "),i("code",[e._v("task")]),e._v(" resource. See "),i("a",{attrs:{href:"#3222-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")],1)]),e._v(" "),i("blockquote",[i("p",[e._v("Otherwise, Meilisearch will create the index in a lazy way. See "),i("a",{attrs:{href:"#3224-lazy-index-creation"}},[e._v("3.2.2.4. Lazy Index Creation")]),e._v(".")])]),e._v(" "),i("h5",{attrs:{id:"_3-3-2-4-lazy-index-creation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-4-lazy-index-creation"}},[e._v("#")]),e._v(" 3.3.2.4. Lazy Index Creation")]),e._v(" "),i("p",[e._v("If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, and the authorization layer allows it (See "),i("a",{attrs:{href:"#33231-async-errors"}},[e._v("3.3.2.3.1. Async Errors")]),e._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),i("a",{attrs:{href:"#3322-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")]),e._v(" "),i("h4",{attrs:{id:"_3-3-3-delete-indexes-index-uid-settings-displayed-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-delete-indexes-index-uid-settings-displayed-attributes"}},[e._v("#")]),e._v(" 3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/displayed-attributes")])]),e._v(" "),i("p",[e._v("Reset the "),i("code",[e._v("displayedAttributes")]),e._v(" setting of a Meilisearch index to the default value "),i("code",[e._v('["*"]')]),e._v(".")]),e._v(" "),i("h5",{attrs:{id:"_3-3-3-1-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-1-response-definition"}},[e._v("#")]),e._v(" 3.3.3.1. Response Definition")]),e._v(" "),i("p",[e._v("When the request is in a successful state, Meilisearch returns the HTTP code "),i("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),i("code",[e._v("task")]),e._v(" Object for "),i("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),i("h5",{attrs:{id:"_3-3-3-3-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-errors"}},[e._v("#")]),e._v(" 3.3.3.3. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1)]),e._v(" "),i("h6",{attrs:{id:"_3-3-3-3-1-asynchronous-index-not-found-error"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-1-asynchronous-index-not-found-error"}},[e._v("#")]),e._v(" 3.3.3.3.1. Asynchronous Index Not Found Error")]),e._v(" "),i("ul",[i("li",[e._v("🔴 If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related async "),i("code",[e._v("task")]),e._v(" resource. See "),i("a",{attrs:{href:"#3331-response-definition"}},[e._v("3.3.3.1. Response Definition")]),e._v(".")],1)]),e._v(" "),i("h4",{attrs:{id:"_3-3-4-general-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-general-errors"}},[e._v("#")]),e._v(" 3.3.4. General Errors")]),e._v(" "),i("p",[e._v("These errors apply to all endpoints described here.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-4-1-auth-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-1-auth-errors"}},[e._v("#")]),e._v(" 3.3.4.1 Auth Errors")]),e._v(" "),i("p",[e._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Accessing this route without the "),i("code",[e._v("Authorization")]),e._v(" header returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),i("h2",{attrs:{id:"_4-technical-details"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[e._v("#")]),e._v(" 4. Technical Details")]),e._v(" "),i("p",[e._v("N/A")]),e._v(" "),i("h2",{attrs:{id:"_5-future-possibilities"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),i("ul",[i("li",[e._v("Return an error when "),i("code",[e._v("displayedAttributes")]),e._v(" is defined as an empty array")])])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[37],{461:function(e,t,i){"use strict";i.r(t);var s=i(62),a=Object(s.a)({},(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[i("h1",{attrs:{id:"displayed-attributes-setting-api"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#displayed-attributes-setting-api"}},[e._v("#")]),e._v(" Displayed Attributes Setting API")]),e._v(" "),i("h2",{attrs:{id:"_1-summary"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),i("p",[e._v("This specification describes the "),i("code",[e._v("displayedAttributes")]),e._v(" setting API endpoints.")]),e._v(" "),i("h2",{attrs:{id:"_2-motivation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),i("p",[e._v("N/A")]),e._v(" "),i("h2",{attrs:{id:"_3-functional-specification"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),i("h3",{attrs:{id:"_3-1-explanations"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-explanations"}},[e._v("#")]),e._v(" 3.1. Explanations")]),e._v(" "),i("p",[e._v("Documents in Meilisearch are composed of multiple fields.")]),e._v(" "),i("p",[e._v("When a search query is performed, the fields whose attributes are added to the "),i("code",[e._v("displayedAttributes")]),e._v(" list are displayable in each matching document.")]),e._v(" "),i("p",[e._v("By default, all document fields are set as displayable.")]),e._v(" "),i("p",[e._v("Therefore, if a document field is not in the "),i("code",[e._v("displayedAttributes")]),e._v(" list, the field won't be added to the returned documents in the "),i("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#1221-hits"}},[e._v("hits")]),e._v(" array for a search query.")],1),e._v(" "),i("h4",{attrs:{id:"_3-1-1-usage-example"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-usage-example"}},[e._v("#")]),e._v(" 3.1.1. Usage Example")]),e._v(" "),i("p",[e._v("Suppose a database of movies with the following fields: "),i("code",[e._v("id")]),e._v(", "),i("code",[e._v("overview")]),e._v(", "),i("code",[e._v("genres")]),e._v(", "),i("code",[e._v("title")]),e._v(", "),i("code",[e._v("release_date")]),e._v(". Some of these fields are more useful to be displayed than others. To make the "),i("code",[e._v("id")]),e._v(" and "),i("code",[e._v("genres")]),e._v(" fields non-displayed, it can be specified in the following way.")]),e._v(" "),i("p",[i("em",[i("strong",[e._v("Request payload "),i("code",[e._v("PUT")]),e._v("- "),i("code",[e._v("/indexes/movies/settings/displayed-attributes")])])])]),e._v(" "),i("div",{staticClass:"language-json extra-class"},[i("pre",{pre:!0,attrs:{class:"language-json"}},[i("code",[i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"title"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"overview"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),i("h3",{attrs:{id:"_3-2-global-settings-api-endpoints-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-global-settings-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2. Global Settings API Endpoints Definition")]),e._v(" "),i("p",[i("code",[e._v("displayedAttributes")]),e._v(" is a sub-resource of "),i("code",[e._v("/indexes/:index_uid/settings")]),e._v(".")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0000-settings-api.html"}},[e._v("Settings API")]),e._v(".")],1),e._v(" "),i("h3",{attrs:{id:"_3-3-api-endpoints-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.3. API Endpoints Definition")]),e._v(" "),i("p",[e._v("Manipulate the "),i("code",[e._v("displayedAttributes")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h4",{attrs:{id:"_3-3-1-get-indexes-index-uid-settings-displayed-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get-indexes-index-uid-settings-displayed-attributes"}},[e._v("#")]),e._v(" 3.3.1. "),i("code",[e._v("GET")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/displayed-attributes")])]),e._v(" "),i("p",[e._v("Fetch the "),i("code",[e._v("displayedAttributes")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-1-1-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-response-definition"}},[e._v("#")]),e._v(" 3.3.1.1. Response Definition")]),e._v(" "),i("ul",[i("li",[e._v("Type: Array of String")]),e._v(" "),i("li",[e._v("Default: "),i("code",[e._v('["*"]')])])]),e._v(" "),i("h5",{attrs:{id:"_3-3-1-2-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-2-errors"}},[e._v("#")]),e._v(" 3.3.1.2. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),i("h4",{attrs:{id:"_3-3-2-put-indexes-index-uid-settings-displayed-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-put-indexes-index-uid-settings-displayed-attributes"}},[e._v("#")]),e._v(" 3.3.2. "),i("code",[e._v("PUT")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/displayed-attributes")])]),e._v(" "),i("p",[e._v("Modify the "),i("code",[e._v("displayedAttributes")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-2-1-request-payload-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-1-request-payload-definition"}},[e._v("#")]),e._v(" 3.3.2.1. Request Payload Definition")]),e._v(" "),i("ul",[i("li",[e._v("Type: Array of String / "),i("code",[e._v("null")])])]),e._v(" "),i("p",[e._v("Setting "),i("code",[e._v("null")]),e._v(" is equivalent to using the "),i("a",{attrs:{href:"#333-delete---indexesindexuidsettingsdisplayed-attributes"}},[e._v("3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/displayed-attributes")])]),e._v(" API endpoint.")]),e._v(" "),i("p",[e._v("Specifying a document attribute that does not exist as a "),i("code",[e._v("displayedAttributes")]),e._v(" index setting returns no error.")]),e._v(" "),i("p",[e._v("Specifying "),i("code",[e._v("[]")]),e._v(" for the "),i("code",[e._v("displayedAttributes")]),e._v(" index setting allows to specify that all fields are non-displayable.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-2-2-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-2-response-definition"}},[e._v("#")]),e._v(" 3.3.2.2. Response Definition")]),e._v(" "),i("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),i("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),i("code",[e._v("task")]),e._v(" Object for "),i("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),i("h5",{attrs:{id:"_3-3-2-3-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-errors"}},[e._v("#")]),e._v(" 3.3.2.3. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Omitting Content-Type header returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an empty Content-Type returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a different Content-Type than "),i("code",[e._v("application/json")]),e._v(" returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an empty payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an invalid JSON payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a request payload value type different of "),i("code",[e._v("Array of String")]),e._v(", "),i("code",[e._v("[]")]),e._v(", or "),i("code",[e._v("null")]),e._v(" returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_displayed_attributes"}},[e._v("invalid_settings_displayed_attributes")]),e._v(" error.")],1)]),e._v(" "),i("h6",{attrs:{id:"_3-3-2-3-1-async-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-1-async-errors"}},[e._v("#")]),e._v(" 3.3.2.3.1. Async Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 When Meilisearch is secured, if the API Key do not have the "),i("code",[e._v("indexes.create")]),e._v(" action defined, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related asynchronous "),i("code",[e._v("task")]),e._v(" resource. See "),i("a",{attrs:{href:"#3222-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")],1)]),e._v(" "),i("blockquote",[i("p",[e._v("Otherwise, Meilisearch will create the index in a lazy way. See "),i("a",{attrs:{href:"#3224-lazy-index-creation"}},[e._v("3.2.2.4. Lazy Index Creation")]),e._v(".")])]),e._v(" "),i("h5",{attrs:{id:"_3-3-2-4-lazy-index-creation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-4-lazy-index-creation"}},[e._v("#")]),e._v(" 3.3.2.4. Lazy Index Creation")]),e._v(" "),i("p",[e._v("If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, and the authorization layer allows it (See "),i("a",{attrs:{href:"#33231-async-errors"}},[e._v("3.3.2.3.1. Async Errors")]),e._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),i("a",{attrs:{href:"#3322-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")]),e._v(" "),i("h4",{attrs:{id:"_3-3-3-delete-indexes-index-uid-settings-displayed-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-delete-indexes-index-uid-settings-displayed-attributes"}},[e._v("#")]),e._v(" 3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/displayed-attributes")])]),e._v(" "),i("p",[e._v("Reset the "),i("code",[e._v("displayedAttributes")]),e._v(" setting of a Meilisearch index to the default value "),i("code",[e._v('["*"]')]),e._v(".")]),e._v(" "),i("h5",{attrs:{id:"_3-3-3-1-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-1-response-definition"}},[e._v("#")]),e._v(" 3.3.3.1. Response Definition")]),e._v(" "),i("p",[e._v("When the request is in a successful state, Meilisearch returns the HTTP code "),i("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),i("code",[e._v("task")]),e._v(" Object for "),i("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),i("h5",{attrs:{id:"_3-3-3-3-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-errors"}},[e._v("#")]),e._v(" 3.3.3.3. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1)]),e._v(" "),i("h6",{attrs:{id:"_3-3-3-3-1-asynchronous-index-not-found-error"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-1-asynchronous-index-not-found-error"}},[e._v("#")]),e._v(" 3.3.3.3.1. Asynchronous Index Not Found Error")]),e._v(" "),i("ul",[i("li",[e._v("🔴 If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related async "),i("code",[e._v("task")]),e._v(" resource. See "),i("a",{attrs:{href:"#3331-response-definition"}},[e._v("3.3.3.1. Response Definition")]),e._v(".")],1)]),e._v(" "),i("h4",{attrs:{id:"_3-3-4-general-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-general-errors"}},[e._v("#")]),e._v(" 3.3.4. General Errors")]),e._v(" "),i("p",[e._v("These errors apply to all endpoints described here.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-4-1-auth-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-1-auth-errors"}},[e._v("#")]),e._v(" 3.3.4.1 Auth Errors")]),e._v(" "),i("p",[e._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Accessing this route without the "),i("code",[e._v("Authorization")]),e._v(" header returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),i("h2",{attrs:{id:"_4-technical-details"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[e._v("#")]),e._v(" 4. Technical Details")]),e._v(" "),i("p",[e._v("N/A")]),e._v(" "),i("h2",{attrs:{id:"_5-future-possibilities"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),i("ul",[i("li",[e._v("Return an error when "),i("code",[e._v("displayedAttributes")]),e._v(" is defined as an empty array")])])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/38.bfdf6fc9.js b/docs/assets/js/38.651ab4ec.js similarity index 99% rename from docs/assets/js/38.bfdf6fc9.js rename to docs/assets/js/38.651ab4ec.js index 8f11e7f3c..0e04cadfe 100644 --- a/docs/assets/js/38.bfdf6fc9.js +++ b/docs/assets/js/38.651ab4ec.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[38],{461:function(t,e,s){"use strict";s.r(e);var a=s(62),n=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"distinct-attribute-setting-api"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#distinct-attribute-setting-api"}},[t._v("#")]),t._v(" Distinct Attribute Setting API")]),t._v(" "),s("h2",{attrs:{id:"_1-summary"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),s("p",[t._v("This specification describes the "),s("code",[t._v("distinctAttribute")]),t._v(" index setting API endpoints.")]),t._v(" "),s("h2",{attrs:{id:"_2-motivation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),s("p",[t._v("N/A")]),t._v(" "),s("h2",{attrs:{id:"_3-functional-specification"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),s("h3",{attrs:{id:"_3-1-explanations"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-explanations"}},[t._v("#")]),t._v(" 3.1. Explanations")]),t._v(" "),s("p",[t._v("The value of a field whose attribute is set as a distinct attribute will always be unique in the returned documents.")]),t._v(" "),s("h4",{attrs:{id:"_3-1-1-usage-example"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-usage-example"}},[t._v("#")]),t._v(" 3.1.1. Usage Example")]),t._v(" "),s("p",[t._v("Suppose an e-commerce dataset. For an index that contains information about jackets, a products index may have several identical items in different variations (color or size).")]),t._v(" "),s("p",[t._v("As shown below, 2 documents containing the same jacket are defined. One of the jackets is brown and the other one is black.")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Leather jacket"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"brand"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Lee jeans"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"color"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"brown"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"product_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"123456"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Leather jacket"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"brand"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Lee jeans"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"color"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"black"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"product_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"123456"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),s("p",[t._v("By default, a search for "),s("code",[t._v("Leather jacket")]),t._v(" would return all documents. This might not be desired, since displaying nearly identical variations of the same item can make results appear cluttered.")]),t._v(" "),s("p",[t._v("By setting "),s("code",[t._v("product_id")]),t._v(" as the "),s("code",[t._v("distinctAttribute")]),t._v(" setting, the different variations of an item will be ignored.")]),t._v(" "),s("p",[s("em",[s("strong",[t._v("Request payload "),s("code",[t._v("PUT")]),t._v("- "),s("code",[t._v("/indexes/products/settings/distinct-attribute")])])])]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"product_id"')]),t._v("\n")])])]),s("p",[t._v("After setting the distinct attribute as shown above, querying for "),s("code",[t._v("Leather jacket")]),t._v(" would only return the "),s("strong",[t._v("first document")]),t._v(" found. The search response would look like this:")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Leather jacket"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"brand"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Lee jeans"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"color"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"brown"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"product_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"123456"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"offset"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"limit"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"nbHits"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"exhaustiveNbHits"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"processingTimeMs"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"query"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Leather jacket"')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Search requests will never return more than one document with the same "),s("code",[t._v("product_id")]),t._v(".")]),t._v(" "),s("h3",{attrs:{id:"_3-2-global-settings-api-endpoints-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-global-settings-api-endpoints-definition"}},[t._v("#")]),t._v(" 3.2. Global Settings API Endpoints Definition")]),t._v(" "),s("p",[s("code",[t._v("distinctAttribute")]),t._v(" is a sub-resource of "),s("code",[t._v("/indexes/:index_uid/settings")]),t._v(".")]),t._v(" "),s("p",[t._v("See "),s("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html"}},[t._v("Settings API")]),t._v(".")],1),t._v(" "),s("h3",{attrs:{id:"_3-3-api-endpoints-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-api-endpoints-definition"}},[t._v("#")]),t._v(" 3.3. API Endpoints Definition")]),t._v(" "),s("p",[t._v("Manipulate the "),s("code",[t._v("distinctAttribute")]),t._v(" setting of a Meilisearch index.")]),t._v(" "),s("h4",{attrs:{id:"_3-3-1-get-indexes-index-uid-settings-distinct-attribute"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get-indexes-index-uid-settings-distinct-attribute"}},[t._v("#")]),t._v(" 3.3.1. "),s("code",[t._v("GET")]),t._v(" - "),s("code",[t._v("indexes/:index_uid/settings/distinct-attribute")])]),t._v(" "),s("p",[t._v("Fetch the "),s("code",[t._v("distinctAttribute")]),t._v(" setting of a Meilisearch index.")]),t._v(" "),s("h5",{attrs:{id:"_3-3-1-1-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-response-definition"}},[t._v("#")]),t._v(" 3.3.1.1. Response Definition")]),t._v(" "),s("ul",[s("li",[t._v("Type: String / "),s("code",[t._v("null")])]),t._v(" "),s("li",[t._v("Default: "),s("code",[t._v("null")])])]),t._v(" "),s("h5",{attrs:{id:"_3-3-1-2-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-2-errors"}},[t._v("#")]),t._v(" 3.3.1.2. Errors")]),t._v(" "),s("ul",[s("li",[t._v("🔴 Sending an invalid index uid format for the "),s("code",[t._v(":index_uid")]),t._v(" path parameter returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[t._v("invalid_index_uid")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 If the requested "),s("code",[t._v("index_uid")]),t._v(" does not exist, the API returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[t._v("index_not_found")]),t._v(" error.")],1)]),t._v(" "),s("h4",{attrs:{id:"_3-3-2-put-indexes-index-uid-settings-distinct-attribute"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-put-indexes-index-uid-settings-distinct-attribute"}},[t._v("#")]),t._v(" 3.3.2. "),s("code",[t._v("PUT")]),t._v(" - "),s("code",[t._v("indexes/:index_uid/settings/distinct-attribute")])]),t._v(" "),s("p",[t._v("Modify the "),s("code",[t._v("distinctAttribute")]),t._v(" setting of a Meilisearch index.")]),t._v(" "),s("h5",{attrs:{id:"_3-3-2-1-request-payload-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-1-request-payload-definition"}},[t._v("#")]),t._v(" 3.3.2.1. Request Payload Definition")]),t._v(" "),s("ul",[s("li",[t._v("Type: String / "),s("code",[t._v("null")])])]),t._v(" "),s("p",[t._v("Setting "),s("code",[t._v("null")]),t._v(" is equivalent to using the "),s("a",{attrs:{href:"#333-delete---indexesindexuidsettingsdistinct-attribute"}},[t._v("3.3.3. "),s("code",[t._v("DELETE")]),t._v(" - "),s("code",[t._v("indexes/:index_uid/settings/distinct-attribute")])]),t._v(" API endpoint.")]),t._v(" "),s("p",[t._v("Specifying a document attribute that does not exist as a "),s("code",[t._v("distinctAttribute")]),t._v(" index setting returns no error.")]),t._v(" "),s("h5",{attrs:{id:"_3-3-2-2-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-2-response-definition"}},[t._v("#")]),t._v(" 3.3.2.2. Response Definition")]),t._v(" "),s("p",[t._v("When the request is successful, Meilisearch returns the HTTP code "),s("code",[t._v("202 Accepted")]),t._v(". The response's content is the summarized representation of the received asynchronous task.")]),t._v(" "),s("p",[t._v("See "),s("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[t._v("Summarized "),s("code",[t._v("task")]),t._v(" Object for "),s("code",[t._v("202 Accepted")])]),t._v(".")],1),t._v(" "),s("h5",{attrs:{id:"_3-3-2-3-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-errors"}},[t._v("#")]),t._v(" 3.3.2.3. Errors")]),t._v(" "),s("ul",[s("li",[t._v("🔴 Omitting Content-Type header returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[t._v("missing_content_type")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an empty Content-Type returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[t._v("invalid_content_type")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending a different Content-Type than "),s("code",[t._v("application/json")]),t._v(" returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[t._v("invalid_content_type")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an empty payload returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[t._v("missing_payload")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an invalid JSON payload returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[t._v("malformed_payload")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an invalid index uid format for the "),s("code",[t._v(":index_uid")]),t._v(" path parameter returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[t._v("invalid_index_uid")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending a request payload value type different of "),s("code",[t._v("String")]),t._v(" or "),s("code",[t._v("null")]),t._v(" returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_distinct_attribute"}},[t._v("invalid_settings_distinct_attribute")]),t._v(" error.")],1)]),t._v(" "),s("h6",{attrs:{id:"_3-3-2-3-1-async-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-1-async-errors"}},[t._v("#")]),t._v(" 3.3.2.3.1. Async Errors")]),t._v(" "),s("ul",[s("li",[t._v("🔴 When Meilisearch is secured, if the API Key do not have the "),s("code",[t._v("indexes.create")]),t._v(" action defined, the API returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[t._v("index_not_found")]),t._v(" error in the related asynchronous "),s("code",[t._v("task")]),t._v(" resource. See "),s("a",{attrs:{href:"#3222-response-definition"}},[t._v("3.3.2.2. Response Definition")]),t._v(".")],1)]),t._v(" "),s("blockquote",[s("p",[t._v("Otherwise, Meilisearch will create the index in a lazy way. See "),s("a",{attrs:{href:"#3224-lazy-index-creation"}},[t._v("3.2.2.4. Lazy Index Creation")]),t._v(".")])]),t._v(" "),s("h5",{attrs:{id:"_3-3-2-4-lazy-index-creation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-4-lazy-index-creation"}},[t._v("#")]),t._v(" 3.3.2.4. Lazy Index Creation")]),t._v(" "),s("p",[t._v("If the requested "),s("code",[t._v("index_uid")]),t._v(" does not exist, and the authorization layer allows it (See "),s("a",{attrs:{href:"#33231-async-errors"}},[t._v("3.3.2.3.1. Async Errors")]),t._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),s("a",{attrs:{href:"#3322-response-definition"}},[t._v("3.3.2.2. Response Definition")]),t._v(".")]),t._v(" "),s("h4",{attrs:{id:"_3-3-3-delete-indexes-index-uid-settings-distinct-attribute"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-delete-indexes-index-uid-settings-distinct-attribute"}},[t._v("#")]),t._v(" 3.3.3. "),s("code",[t._v("DELETE")]),t._v(" - "),s("code",[t._v("indexes/:index_uid/settings/distinct-attribute")])]),t._v(" "),s("p",[t._v("Reset the "),s("code",[t._v("distinctAttribute")]),t._v(" setting of a Meilisearch index to the default value "),s("code",[t._v("null")]),t._v(".")]),t._v(" "),s("h5",{attrs:{id:"_3-3-3-1-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-1-response-definition"}},[t._v("#")]),t._v(" 3.3.3.1. Response Definition")]),t._v(" "),s("p",[t._v("When the request is in a successful state, Meilisearch returns the HTTP code "),s("code",[t._v("202 Accepted")]),t._v(". The response's content is the summarized representation of the received asynchronous task.")]),t._v(" "),s("p",[t._v("See "),s("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[t._v("Summarized "),s("code",[t._v("task")]),t._v(" Object for "),s("code",[t._v("202 Accepted")])]),t._v(".")],1),t._v(" "),s("h5",{attrs:{id:"_3-3-3-3-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-errors"}},[t._v("#")]),t._v(" 3.3.3.3. Errors")]),t._v(" "),s("ul",[s("li",[t._v("🔴 Sending an invalid index uid format for the "),s("code",[t._v(":index_uid")]),t._v(" path parameter returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[t._v("invalid_index_uid")]),t._v(" error.")],1)]),t._v(" "),s("h6",{attrs:{id:"_3-3-3-3-1-asynchronous-index-not-found-error"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-1-asynchronous-index-not-found-error"}},[t._v("#")]),t._v(" 3.3.3.3.1. Asynchronous Index Not Found Error")]),t._v(" "),s("ul",[s("li",[t._v("🔴 If the requested "),s("code",[t._v("index_uid")]),t._v(" does not exist, the API returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[t._v("index_not_found")]),t._v(" error in the related async "),s("code",[t._v("task")]),t._v(" resource. See "),s("a",{attrs:{href:"#3331-response-definition"}},[t._v("3.3.3.1. Response Definition")]),t._v(".")],1)]),t._v(" "),s("h4",{attrs:{id:"_3-3-4-general-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-general-errors"}},[t._v("#")]),t._v(" 3.3.4. General Errors")]),t._v(" "),s("p",[t._v("These errors apply to all endpoints described here.")]),t._v(" "),s("h5",{attrs:{id:"_3-3-4-1-auth-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-1-auth-errors"}},[t._v("#")]),t._v(" 3.3.4.1 Auth Errors")]),t._v(" "),s("p",[t._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),t._v(" "),s("ul",[s("li",[t._v("🔴 Accessing this route without the "),s("code",[t._v("Authorization")]),t._v(" header returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),s("h2",{attrs:{id:"_4-technical-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[t._v("#")]),t._v(" 4. Technical Details")]),t._v(" "),s("h3",{attrs:{id:"_4-1-triggering-documents-re-indexing"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-triggering-documents-re-indexing"}},[t._v("#")]),t._v(" 4.1. Triggering Documents Re-Indexing")]),t._v(" "),s("p",[t._v("Meilisearch favors search speed and makes a trade-off on indexing speed by computing internal data structures to get search results as fast as possible.")]),t._v(" "),s("p",[t._v("Modifying this index setting cause documents to be re-indexed.")]),t._v(" "),s("h2",{attrs:{id:"_5-future-possibilities"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[t._v("#")]),t._v(" 5. Future Possibilities")]),t._v(" "),s("ul",[s("li",[t._v("Return an error when "),s("code",[t._v("distinctAttribute")]),t._v(" is specified as an empty string")])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[38],{462:function(t,e,s){"use strict";s.r(e);var a=s(62),n=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"distinct-attribute-setting-api"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#distinct-attribute-setting-api"}},[t._v("#")]),t._v(" Distinct Attribute Setting API")]),t._v(" "),s("h2",{attrs:{id:"_1-summary"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),s("p",[t._v("This specification describes the "),s("code",[t._v("distinctAttribute")]),t._v(" index setting API endpoints.")]),t._v(" "),s("h2",{attrs:{id:"_2-motivation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),s("p",[t._v("N/A")]),t._v(" "),s("h2",{attrs:{id:"_3-functional-specification"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),s("h3",{attrs:{id:"_3-1-explanations"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-explanations"}},[t._v("#")]),t._v(" 3.1. Explanations")]),t._v(" "),s("p",[t._v("The value of a field whose attribute is set as a distinct attribute will always be unique in the returned documents.")]),t._v(" "),s("h4",{attrs:{id:"_3-1-1-usage-example"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-usage-example"}},[t._v("#")]),t._v(" 3.1.1. Usage Example")]),t._v(" "),s("p",[t._v("Suppose an e-commerce dataset. For an index that contains information about jackets, a products index may have several identical items in different variations (color or size).")]),t._v(" "),s("p",[t._v("As shown below, 2 documents containing the same jacket are defined. One of the jackets is brown and the other one is black.")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Leather jacket"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"brand"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Lee jeans"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"color"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"brown"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"product_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"123456"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Leather jacket"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"brand"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Lee jeans"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"color"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"black"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"product_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"123456"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),s("p",[t._v("By default, a search for "),s("code",[t._v("Leather jacket")]),t._v(" would return all documents. This might not be desired, since displaying nearly identical variations of the same item can make results appear cluttered.")]),t._v(" "),s("p",[t._v("By setting "),s("code",[t._v("product_id")]),t._v(" as the "),s("code",[t._v("distinctAttribute")]),t._v(" setting, the different variations of an item will be ignored.")]),t._v(" "),s("p",[s("em",[s("strong",[t._v("Request payload "),s("code",[t._v("PUT")]),t._v("- "),s("code",[t._v("/indexes/products/settings/distinct-attribute")])])])]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"product_id"')]),t._v("\n")])])]),s("p",[t._v("After setting the distinct attribute as shown above, querying for "),s("code",[t._v("Leather jacket")]),t._v(" would only return the "),s("strong",[t._v("first document")]),t._v(" found. The search response would look like this:")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Leather jacket"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"brand"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Lee jeans"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"color"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"brown"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"product_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"123456"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"offset"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"limit"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"nbHits"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"exhaustiveNbHits"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"processingTimeMs"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"query"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Leather jacket"')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Search requests will never return more than one document with the same "),s("code",[t._v("product_id")]),t._v(".")]),t._v(" "),s("h3",{attrs:{id:"_3-2-global-settings-api-endpoints-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-global-settings-api-endpoints-definition"}},[t._v("#")]),t._v(" 3.2. Global Settings API Endpoints Definition")]),t._v(" "),s("p",[s("code",[t._v("distinctAttribute")]),t._v(" is a sub-resource of "),s("code",[t._v("/indexes/:index_uid/settings")]),t._v(".")]),t._v(" "),s("p",[t._v("See "),s("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html"}},[t._v("Settings API")]),t._v(".")],1),t._v(" "),s("h3",{attrs:{id:"_3-3-api-endpoints-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-api-endpoints-definition"}},[t._v("#")]),t._v(" 3.3. API Endpoints Definition")]),t._v(" "),s("p",[t._v("Manipulate the "),s("code",[t._v("distinctAttribute")]),t._v(" setting of a Meilisearch index.")]),t._v(" "),s("h4",{attrs:{id:"_3-3-1-get-indexes-index-uid-settings-distinct-attribute"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get-indexes-index-uid-settings-distinct-attribute"}},[t._v("#")]),t._v(" 3.3.1. "),s("code",[t._v("GET")]),t._v(" - "),s("code",[t._v("indexes/:index_uid/settings/distinct-attribute")])]),t._v(" "),s("p",[t._v("Fetch the "),s("code",[t._v("distinctAttribute")]),t._v(" setting of a Meilisearch index.")]),t._v(" "),s("h5",{attrs:{id:"_3-3-1-1-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-response-definition"}},[t._v("#")]),t._v(" 3.3.1.1. Response Definition")]),t._v(" "),s("ul",[s("li",[t._v("Type: String / "),s("code",[t._v("null")])]),t._v(" "),s("li",[t._v("Default: "),s("code",[t._v("null")])])]),t._v(" "),s("h5",{attrs:{id:"_3-3-1-2-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-2-errors"}},[t._v("#")]),t._v(" 3.3.1.2. Errors")]),t._v(" "),s("ul",[s("li",[t._v("🔴 Sending an invalid index uid format for the "),s("code",[t._v(":index_uid")]),t._v(" path parameter returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[t._v("invalid_index_uid")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 If the requested "),s("code",[t._v("index_uid")]),t._v(" does not exist, the API returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[t._v("index_not_found")]),t._v(" error.")],1)]),t._v(" "),s("h4",{attrs:{id:"_3-3-2-put-indexes-index-uid-settings-distinct-attribute"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-put-indexes-index-uid-settings-distinct-attribute"}},[t._v("#")]),t._v(" 3.3.2. "),s("code",[t._v("PUT")]),t._v(" - "),s("code",[t._v("indexes/:index_uid/settings/distinct-attribute")])]),t._v(" "),s("p",[t._v("Modify the "),s("code",[t._v("distinctAttribute")]),t._v(" setting of a Meilisearch index.")]),t._v(" "),s("h5",{attrs:{id:"_3-3-2-1-request-payload-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-1-request-payload-definition"}},[t._v("#")]),t._v(" 3.3.2.1. Request Payload Definition")]),t._v(" "),s("ul",[s("li",[t._v("Type: String / "),s("code",[t._v("null")])])]),t._v(" "),s("p",[t._v("Setting "),s("code",[t._v("null")]),t._v(" is equivalent to using the "),s("a",{attrs:{href:"#333-delete---indexesindexuidsettingsdistinct-attribute"}},[t._v("3.3.3. "),s("code",[t._v("DELETE")]),t._v(" - "),s("code",[t._v("indexes/:index_uid/settings/distinct-attribute")])]),t._v(" API endpoint.")]),t._v(" "),s("p",[t._v("Specifying a document attribute that does not exist as a "),s("code",[t._v("distinctAttribute")]),t._v(" index setting returns no error.")]),t._v(" "),s("h5",{attrs:{id:"_3-3-2-2-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-2-response-definition"}},[t._v("#")]),t._v(" 3.3.2.2. Response Definition")]),t._v(" "),s("p",[t._v("When the request is successful, Meilisearch returns the HTTP code "),s("code",[t._v("202 Accepted")]),t._v(". The response's content is the summarized representation of the received asynchronous task.")]),t._v(" "),s("p",[t._v("See "),s("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[t._v("Summarized "),s("code",[t._v("task")]),t._v(" Object for "),s("code",[t._v("202 Accepted")])]),t._v(".")],1),t._v(" "),s("h5",{attrs:{id:"_3-3-2-3-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-errors"}},[t._v("#")]),t._v(" 3.3.2.3. Errors")]),t._v(" "),s("ul",[s("li",[t._v("🔴 Omitting Content-Type header returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[t._v("missing_content_type")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an empty Content-Type returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[t._v("invalid_content_type")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending a different Content-Type than "),s("code",[t._v("application/json")]),t._v(" returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[t._v("invalid_content_type")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an empty payload returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[t._v("missing_payload")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an invalid JSON payload returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[t._v("malformed_payload")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an invalid index uid format for the "),s("code",[t._v(":index_uid")]),t._v(" path parameter returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[t._v("invalid_index_uid")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending a request payload value type different of "),s("code",[t._v("String")]),t._v(" or "),s("code",[t._v("null")]),t._v(" returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_distinct_attribute"}},[t._v("invalid_settings_distinct_attribute")]),t._v(" error.")],1)]),t._v(" "),s("h6",{attrs:{id:"_3-3-2-3-1-async-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-1-async-errors"}},[t._v("#")]),t._v(" 3.3.2.3.1. Async Errors")]),t._v(" "),s("ul",[s("li",[t._v("🔴 When Meilisearch is secured, if the API Key do not have the "),s("code",[t._v("indexes.create")]),t._v(" action defined, the API returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[t._v("index_not_found")]),t._v(" error in the related asynchronous "),s("code",[t._v("task")]),t._v(" resource. See "),s("a",{attrs:{href:"#3222-response-definition"}},[t._v("3.3.2.2. Response Definition")]),t._v(".")],1)]),t._v(" "),s("blockquote",[s("p",[t._v("Otherwise, Meilisearch will create the index in a lazy way. See "),s("a",{attrs:{href:"#3224-lazy-index-creation"}},[t._v("3.2.2.4. Lazy Index Creation")]),t._v(".")])]),t._v(" "),s("h5",{attrs:{id:"_3-3-2-4-lazy-index-creation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-4-lazy-index-creation"}},[t._v("#")]),t._v(" 3.3.2.4. Lazy Index Creation")]),t._v(" "),s("p",[t._v("If the requested "),s("code",[t._v("index_uid")]),t._v(" does not exist, and the authorization layer allows it (See "),s("a",{attrs:{href:"#33231-async-errors"}},[t._v("3.3.2.3.1. Async Errors")]),t._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),s("a",{attrs:{href:"#3322-response-definition"}},[t._v("3.3.2.2. Response Definition")]),t._v(".")]),t._v(" "),s("h4",{attrs:{id:"_3-3-3-delete-indexes-index-uid-settings-distinct-attribute"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-delete-indexes-index-uid-settings-distinct-attribute"}},[t._v("#")]),t._v(" 3.3.3. "),s("code",[t._v("DELETE")]),t._v(" - "),s("code",[t._v("indexes/:index_uid/settings/distinct-attribute")])]),t._v(" "),s("p",[t._v("Reset the "),s("code",[t._v("distinctAttribute")]),t._v(" setting of a Meilisearch index to the default value "),s("code",[t._v("null")]),t._v(".")]),t._v(" "),s("h5",{attrs:{id:"_3-3-3-1-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-1-response-definition"}},[t._v("#")]),t._v(" 3.3.3.1. Response Definition")]),t._v(" "),s("p",[t._v("When the request is in a successful state, Meilisearch returns the HTTP code "),s("code",[t._v("202 Accepted")]),t._v(". The response's content is the summarized representation of the received asynchronous task.")]),t._v(" "),s("p",[t._v("See "),s("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[t._v("Summarized "),s("code",[t._v("task")]),t._v(" Object for "),s("code",[t._v("202 Accepted")])]),t._v(".")],1),t._v(" "),s("h5",{attrs:{id:"_3-3-3-3-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-errors"}},[t._v("#")]),t._v(" 3.3.3.3. Errors")]),t._v(" "),s("ul",[s("li",[t._v("🔴 Sending an invalid index uid format for the "),s("code",[t._v(":index_uid")]),t._v(" path parameter returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[t._v("invalid_index_uid")]),t._v(" error.")],1)]),t._v(" "),s("h6",{attrs:{id:"_3-3-3-3-1-asynchronous-index-not-found-error"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-1-asynchronous-index-not-found-error"}},[t._v("#")]),t._v(" 3.3.3.3.1. Asynchronous Index Not Found Error")]),t._v(" "),s("ul",[s("li",[t._v("🔴 If the requested "),s("code",[t._v("index_uid")]),t._v(" does not exist, the API returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[t._v("index_not_found")]),t._v(" error in the related async "),s("code",[t._v("task")]),t._v(" resource. See "),s("a",{attrs:{href:"#3331-response-definition"}},[t._v("3.3.3.1. Response Definition")]),t._v(".")],1)]),t._v(" "),s("h4",{attrs:{id:"_3-3-4-general-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-general-errors"}},[t._v("#")]),t._v(" 3.3.4. General Errors")]),t._v(" "),s("p",[t._v("These errors apply to all endpoints described here.")]),t._v(" "),s("h5",{attrs:{id:"_3-3-4-1-auth-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-1-auth-errors"}},[t._v("#")]),t._v(" 3.3.4.1 Auth Errors")]),t._v(" "),s("p",[t._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),t._v(" "),s("ul",[s("li",[t._v("🔴 Accessing this route without the "),s("code",[t._v("Authorization")]),t._v(" header returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),s("h2",{attrs:{id:"_4-technical-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[t._v("#")]),t._v(" 4. Technical Details")]),t._v(" "),s("h3",{attrs:{id:"_4-1-triggering-documents-re-indexing"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-triggering-documents-re-indexing"}},[t._v("#")]),t._v(" 4.1. Triggering Documents Re-Indexing")]),t._v(" "),s("p",[t._v("Meilisearch favors search speed and makes a trade-off on indexing speed by computing internal data structures to get search results as fast as possible.")]),t._v(" "),s("p",[t._v("Modifying this index setting cause documents to be re-indexed.")]),t._v(" "),s("h2",{attrs:{id:"_5-future-possibilities"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[t._v("#")]),t._v(" 5. Future Possibilities")]),t._v(" "),s("ul",[s("li",[t._v("Return an error when "),s("code",[t._v("distinctAttribute")]),t._v(" is specified as an empty string")])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/41.0b60e299.js b/docs/assets/js/41.1f8df8c1.js similarity index 99% rename from docs/assets/js/41.0b60e299.js rename to docs/assets/js/41.1f8df8c1.js index 5d41d7371..bec6e52a3 100644 --- a/docs/assets/js/41.0b60e299.js +++ b/docs/assets/js/41.1f8df8c1.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[41],{466:function(e,t,r){"use strict";r.r(t);var s=r(62),n=Object(s.a)({},(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"ranking-rules-setting-api"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#ranking-rules-setting-api"}},[e._v("#")]),e._v(" Ranking Rules Setting API")]),e._v(" "),r("h2",{attrs:{id:"_1-summary"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),r("p",[e._v("This specification describes the "),r("code",[e._v("rankingRules")]),e._v(" index setting API endpoints.")]),e._v(" "),r("h2",{attrs:{id:"_2-motivation"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),r("p",[e._v("N/A")]),e._v(" "),r("h2",{attrs:{id:"_3-functional-specification"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),r("h3",{attrs:{id:"_3-1-explanations"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-explanations"}},[e._v("#")]),e._v(" 3.1. Explanations")]),e._v(" "),r("p",[e._v("To ensure relevant results at search time, documents are sorted based on consecutive rules called ranking rules. The order in which ranking rules are applied matters.")]),e._v(" "),r("p",[e._v("The first rule in the "),r("code",[e._v("rankingRules")]),e._v(" list has the most impact, and the last rule has the least.")]),e._v(" "),r("p",[e._v("This setting is fully customizable, meaning existing rules can be removed, new ones added and reordered as needed.")]),e._v(" "),r("h4",{attrs:{id:"_3-1-1-built-in-ranking-rules"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-built-in-ranking-rules"}},[e._v("#")]),e._v(" 3.1.1. Built-in Ranking Rules")]),e._v(" "),r("p",[e._v("By default, Meilisearch contains six built-in ranking rules in the following order:")]),e._v(" "),r("ol",[r("li",[r("a",{attrs:{href:"#3111-words-ranking-rule"}},[e._v("Words")])]),e._v(" "),r("li",[r("a",{attrs:{href:"#3112-typo-ranking-rule"}},[e._v("Typo")])]),e._v(" "),r("li",[r("a",{attrs:{href:"#3113-proximity-ranking-rule"}},[e._v("Proximity")])]),e._v(" "),r("li",[r("a",{attrs:{href:"#3114-attribute-ranking-rule"}},[e._v("Attribute")])]),e._v(" "),r("li",[r("a",{attrs:{href:"#3115-sort-ranking-rule"}},[e._v("Sort")])]),e._v(" "),r("li",[r("a",{attrs:{href:"#3116-exactness-ranking-rule"}},[e._v("Exactness")])])]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-1-words-ranking-rule"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-words-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.1. Words Ranking Rule")]),e._v(" "),r("p",[e._v("Results are sorted by decreasing the number of matched query terms. "),r("code",[e._v("words")]),e._v(" ranks documents that contain all query terms first.")]),e._v(" "),r("p",[e._v("The "),r("code",[e._v("words")]),e._v(" ranking rule works from right to left. Therefore, the order of the query string impacts the order of results.")]),e._v(" "),r("p",[e._v("For example, if someone were to search "),r("code",[e._v("batman dark knight")]),e._v(", then the words rule would rank documents containing all three terms first, documents containing only "),r("code",[e._v("batman")]),e._v(" and "),r("code",[e._v("dark")]),e._v(" second, and documents containing only "),r("code",[e._v("batman")]),e._v(" third.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-2-typo-ranking-rule"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-typo-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.2. Typo Ranking Rule")]),e._v(" "),r("p",[e._v("Results are sorted by increasing the number of typos. "),r("code",[e._v("typo")]),e._v(" ranks documents that match query terms with fewer typos first.")]),e._v(" "),r("p",[e._v("Meiliseach tolerates a maximum of "),r("code",[e._v("2")]),e._v(" typos for a query term.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-3-proximity-ranking-rule"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-proximity-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.3. Proximity Ranking Rule")]),e._v(" "),r("p",[e._v("Results are sorted by increasing distance between matched query terms. "),r("code",[e._v("proximity")]),e._v(" ranks documents where query terms occur close together and in the same order as the query terms first.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-4-attribute-ranking-rule"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-4-attribute-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.4. Attribute Ranking Rule")]),e._v(" "),r("p",[e._v("Results are sorted according to the attribute ranking order. "),r("code",[e._v("attribute")]),e._v(" ranks documents that contain query terms in more important attributes first. See "),r("a",{attrs:{href:"0123-searchable-attributes-setting-API"}},[e._v("searchableAttributes setting API")]),e._v(".")]),e._v(" "),r("p",[e._v("Also, note that the documents with attributes containing the query terms at the beginning of an attribute will be considered more relevant than documents containing the query terms at the end of an attribute.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-5-sort-ranking-rule"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-5-sort-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.5. Sort Ranking Rule")]),e._v(" "),r("p",[e._v("Results are sorted according to parameters decided at query time.")]),e._v(" "),r("p",[e._v("When the "),r("code",[e._v("sort")]),e._v(" ranking rule is in a "),r("strong",[e._v("higher")]),e._v(" position, sorting is exhaustive: results will be less relevant, but follow the user-defined sorting order more closely.")]),e._v(" "),r("p",[e._v("When the "),r("code",[e._v("sort")]),e._v(" ranking rule is in a "),r("strong",[e._v("lower")]),e._v(" position, sorting is relevant: results will be very relevant, but might not always follow the order defined by the user.")]),e._v(" "),r("p",[e._v("Unlike other ranking rules, "),r("code",[e._v("sort")]),e._v(" is only active for search queries containing the "),r("code",[e._v("sort")]),e._v(" search parameter ("),r("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#1213-sort"}},[e._v("See Sort Search Parameter")]),e._v("). If a search request does not contain "),r("code",[e._v("sort")]),e._v(", this ranking rule will be ignored.")],1),e._v(" "),r("p",[e._v("If a field has values of different types across documents, Meilisearch will give precedence to numbers over strings. It means documents with numeric field values will be ranked higher than those with string values.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-6-exactness-ranking-rule"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-6-exactness-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.6. Exactness Ranking Rule")]),e._v(" "),r("p",[e._v("Results are sorted by the similarity of the matched words with the query words. "),r("code",[e._v("exactness")]),e._v(" ranks documents that contain exactly the same terms as the ones queried first.")]),e._v(" "),r("h3",{attrs:{id:"_3-1-2-custom-ranking-rules"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-custom-ranking-rules"}},[e._v("#")]),e._v(" 3.1.2. Custom Ranking Rules")]),e._v(" "),r("p",[e._v("Meilisearch supports two custom rules expression that can be added to the ranking rules setting: one for ascending sort and one for descending sort.")]),e._v(" "),r("p",[e._v("To add a custom ranking rule, the attribute name must be specified and followed by a colon ("),r("code",[e._v(":")]),e._v(") and either "),r("code",[e._v("asc")]),e._v(" for ascending order or "),r("code",[e._v("desc")]),e._v(" for descending order.")]),e._v(" "),r("p",[e._v("To apply an ascending sort (results sorted by increasing value of the attribute): "),r("code",[e._v('"attribute_name:asc"')])]),e._v(" "),r("p",[e._v("To apply a descending sort (results sorted by decreasing value of the attribute): "),r("code",[e._v('"attribute_name:desc"')])]),e._v(" "),r("p",[e._v("The attribute must have either a numeric or a string value.")]),e._v(" "),r("p",[e._v("Contrary to the "),r("code",[e._v("sort")]),e._v(" ranking rule, custom ranking rules are always active after configured and can be helpful to promote certain types of results. The "),r("code",[e._v("sort")]),e._v(" ranking rule is most useful when end-users define what type of results they want to see first.")]),e._v(" "),r("h4",{attrs:{id:"_3-1-2-1-example"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-example"}},[e._v("#")]),e._v(" 3.1.2.1. Example")]),e._v(" "),r("p",[e._v("Suppose a movie dataset. The documents contain a field "),r("code",[e._v("release_date")]),e._v(" with a timestamp as a value.")]),e._v(" "),r("p",[e._v("The following example creates a custom ranking rule that makes recent movies more relevant than older ones. A movie released in 2020 will appear before a movie released in 1999.")]),e._v(" "),r("p",[r("em",[r("strong",[e._v("Request payload "),r("code",[e._v("PUT")]),e._v("- "),r("code",[e._v("/indexes/products/settings/ranking-rules")])])])]),e._v(" "),r("div",{staticClass:"language-json extra-class"},[r("pre",{pre:!0,attrs:{class:"language-json"}},[r("code",[r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"words"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"typo"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"proximity"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"sort"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"exactness"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"release_date:desc"')]),e._v("\n"),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),r("h3",{attrs:{id:"_3-2-global-settings-api-endpoints-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-global-settings-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2. Global Settings API Endpoints Definition")]),e._v(" "),r("p",[r("code",[e._v("rankingRules")]),e._v(" is a sub-resource of "),r("code",[e._v("/indexes/:index_uid/settings")]),e._v(".")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/specifications/text/0000-settings-api.html"}},[e._v("Settings API")]),e._v(".")],1),e._v(" "),r("h3",{attrs:{id:"_3-3-api-endpoints-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.3. API Endpoints Definition")]),e._v(" "),r("p",[e._v("Manipulate the "),r("code",[e._v("rankingRules")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),r("h4",{attrs:{id:"_3-3-1-get-indexes-index-uid-settings-ranking-rules"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get-indexes-index-uid-settings-ranking-rules"}},[e._v("#")]),e._v(" 3.3.1. "),r("code",[e._v("GET")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/settings/ranking-rules")])]),e._v(" "),r("p",[e._v("Fetch the "),r("code",[e._v("rankingRules")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),r("h5",{attrs:{id:"_3-3-1-1-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-response-definition"}},[e._v("#")]),e._v(" 3.3.1.1. Response Definition")]),e._v(" "),r("ul",[r("li",[e._v("Type: Array of String")]),e._v(" "),r("li",[e._v("Default: "),r("code",[e._v('["words", "typo", "proximity", "attribute", "sort", "exactness"]')])])]),e._v(" "),r("h5",{attrs:{id:"_3-3-1-2-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-2-errors"}},[e._v("#")]),e._v(" 3.3.1.2. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),r("h4",{attrs:{id:"_3-3-2-put-indexes-index-uid-settings-ranking-rules"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-put-indexes-index-uid-settings-ranking-rules"}},[e._v("#")]),e._v(" 3.3.2. "),r("code",[e._v("PUT")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/settings/ranking-rules")])]),e._v(" "),r("p",[e._v("Modify the "),r("code",[e._v("rankingRules")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),r("h5",{attrs:{id:"_3-3-2-1-request-payload-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-1-request-payload-definition"}},[e._v("#")]),e._v(" 3.3.2.1. Request Payload Definition")]),e._v(" "),r("ul",[r("li",[e._v("Type: Array of String / "),r("code",[e._v("null")])])]),e._v(" "),r("p",[e._v("Setting "),r("code",[e._v("null")]),e._v(" is equivalent to using the "),r("a",{attrs:{href:"#333-delete---indexesindexuidsettingsranking-rules"}},[e._v("3.3.3. "),r("code",[e._v("DELETE")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/settings/ranking-rules")])]),e._v(" API endpoint.")]),e._v(" "),r("p",[e._v("Specifying a document attribute that does not exist as a "),r("code",[e._v("rankingRules")]),e._v(" index setting returns no error.")]),e._v(" "),r("p",[e._v("Specifying "),r("code",[e._v("[]")]),e._v(" for the "),r("code",[e._v("rankingRules")]),e._v(" index setting allows specifying that no ranking rules are used to rank results. Search results are sorted by their "),r("strong",[e._v("internal id")]),e._v(" which can be considered as "),r("strong",[e._v("undefined order")]),e._v(".")]),e._v(" "),r("h5",{attrs:{id:"_3-3-2-2-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-2-response-definition"}},[e._v("#")]),e._v(" 3.3.2.2. Response Definition")]),e._v(" "),r("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),r("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),r("code",[e._v("task")]),e._v(" Object for "),r("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),r("h5",{attrs:{id:"_3-3-2-3-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-errors"}},[e._v("#")]),e._v(" 3.3.2.3. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Omitting Content-Type header returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an empty Content-Type returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a different Content-Type than "),r("code",[e._v("application/json")]),e._v(" returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an empty payload returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid JSON payload returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid index uid format for the "),r("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a request payload value type different of "),r("code",[e._v("Array of String")]),e._v(", "),r("code",[e._v("[]")]),e._v(", or "),r("code",[e._v("null")]),e._v(" returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_ranking_rules"}},[e._v("invalid_settings_ranking_rules")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid ranking rule returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_ranking_rules"}},[e._v("invalid_settings_ranking_rules")]),e._v(" error in the related asynchronous "),r("code",[e._v("task")]),e._v(" resource. See "),r("a",{attrs:{href:"#3222-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")],1)]),e._v(" "),r("h6",{attrs:{id:"_3-3-2-3-1-async-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-1-async-errors"}},[e._v("#")]),e._v(" 3.3.2.3.1. Async Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 When Meilisearch is secured, if the API Key do not have the "),r("code",[e._v("indexes.create")]),e._v(" action defined, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related asynchronous "),r("code",[e._v("task")]),e._v(" resource. See "),r("a",{attrs:{href:"#3222-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")],1)]),e._v(" "),r("blockquote",[r("p",[e._v("Otherwise, Meilisearch will create the index in a lazy way. See "),r("a",{attrs:{href:"#3224-lazy-index-creation"}},[e._v("3.2.2.4. Lazy Index Creation")]),e._v(".")])]),e._v(" "),r("h5",{attrs:{id:"_3-3-2-4-lazy-index-creation"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-4-lazy-index-creation"}},[e._v("#")]),e._v(" 3.3.2.4. Lazy Index Creation")]),e._v(" "),r("p",[e._v("If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, and the authorization layer allows it (See "),r("a",{attrs:{href:"#33231-async-errors"}},[e._v("3.3.2.3.1. Async Errors")]),e._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),r("a",{attrs:{href:"#3322-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")]),e._v(" "),r("h4",{attrs:{id:"_3-3-3-delete-indexes-index-uid-settings-ranking-rules"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-delete-indexes-index-uid-settings-ranking-rules"}},[e._v("#")]),e._v(" 3.3.3. "),r("code",[e._v("DELETE")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/settings/ranking-rules")])]),e._v(" "),r("p",[e._v("Reset the "),r("code",[e._v("rankingRules")]),e._v(" setting of a Meilisearch index to the default value "),r("code",[e._v('["*"]')]),e._v(".")]),e._v(" "),r("h5",{attrs:{id:"_3-3-3-1-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-1-response-definition"}},[e._v("#")]),e._v(" 3.3.3.1. Response Definition")]),e._v(" "),r("p",[e._v("When the request is in a successful state, Meilisearch returns the HTTP code "),r("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),r("code",[e._v("task")]),e._v(" Object for "),r("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),r("h5",{attrs:{id:"_3-3-3-3-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-errors"}},[e._v("#")]),e._v(" 3.3.3.3. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Sending an invalid index uid format for the "),r("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1)]),e._v(" "),r("h6",{attrs:{id:"_3-3-3-3-1-asynchronous-index-not-found-error"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-1-asynchronous-index-not-found-error"}},[e._v("#")]),e._v(" 3.3.3.3.1. Asynchronous Index Not Found Error")]),e._v(" "),r("ul",[r("li",[e._v("🔴 If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related async "),r("code",[e._v("task")]),e._v(" resource. See "),r("a",{attrs:{href:"#3331-response-definition"}},[e._v("3.3.3.1. Response Definition")]),e._v(".")],1)]),e._v(" "),r("h4",{attrs:{id:"_3-3-4-general-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-general-errors"}},[e._v("#")]),e._v(" 3.3.4. General Errors")]),e._v(" "),r("p",[e._v("These errors apply to all endpoints described here.")]),e._v(" "),r("h5",{attrs:{id:"_3-3-4-1-auth-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-1-auth-errors"}},[e._v("#")]),e._v(" 3.3.4.1 Auth Errors")]),e._v(" "),r("p",[e._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Accessing this route without the "),r("code",[e._v("Authorization")]),e._v(" header returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),r("h2",{attrs:{id:"_4-technical-details"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[e._v("#")]),e._v(" 4. Technical Details")]),e._v(" "),r("h3",{attrs:{id:"_4-1-bucket-sort"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-bucket-sort"}},[e._v("#")]),e._v(" 4.1. Bucket Sort")]),e._v(" "),r("p",[e._v("Whenever a search query is made, Meilisearch uses a "),r("a",{attrs:{href:"https://en.wikipedia.org/wiki/Bucket_sort",target:"_blank",rel:"noopener noreferrer"}},[e._v("bucket sort"),r("OutboundLink")],1),e._v(" algorithm to rank documents.")]),e._v(" "),r("p",[e._v("The first ranking rule is applied to all documents, while each subsequent rule is only applied to documents that are considered equal under the previous rule (i.e. as a tiebreaker).")]),e._v(" "),r("h2",{attrs:{id:"_5-future-possibilities"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),r("ul",[r("li",[e._v("Return an error when "),r("code",[e._v("rankingRules")]),e._v(" is defined as an empty array")])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[41],{465:function(e,t,r){"use strict";r.r(t);var s=r(62),n=Object(s.a)({},(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"ranking-rules-setting-api"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#ranking-rules-setting-api"}},[e._v("#")]),e._v(" Ranking Rules Setting API")]),e._v(" "),r("h2",{attrs:{id:"_1-summary"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),r("p",[e._v("This specification describes the "),r("code",[e._v("rankingRules")]),e._v(" index setting API endpoints.")]),e._v(" "),r("h2",{attrs:{id:"_2-motivation"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),r("p",[e._v("N/A")]),e._v(" "),r("h2",{attrs:{id:"_3-functional-specification"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),r("h3",{attrs:{id:"_3-1-explanations"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-explanations"}},[e._v("#")]),e._v(" 3.1. Explanations")]),e._v(" "),r("p",[e._v("To ensure relevant results at search time, documents are sorted based on consecutive rules called ranking rules. The order in which ranking rules are applied matters.")]),e._v(" "),r("p",[e._v("The first rule in the "),r("code",[e._v("rankingRules")]),e._v(" list has the most impact, and the last rule has the least.")]),e._v(" "),r("p",[e._v("This setting is fully customizable, meaning existing rules can be removed, new ones added and reordered as needed.")]),e._v(" "),r("h4",{attrs:{id:"_3-1-1-built-in-ranking-rules"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-built-in-ranking-rules"}},[e._v("#")]),e._v(" 3.1.1. Built-in Ranking Rules")]),e._v(" "),r("p",[e._v("By default, Meilisearch contains six built-in ranking rules in the following order:")]),e._v(" "),r("ol",[r("li",[r("a",{attrs:{href:"#3111-words-ranking-rule"}},[e._v("Words")])]),e._v(" "),r("li",[r("a",{attrs:{href:"#3112-typo-ranking-rule"}},[e._v("Typo")])]),e._v(" "),r("li",[r("a",{attrs:{href:"#3113-proximity-ranking-rule"}},[e._v("Proximity")])]),e._v(" "),r("li",[r("a",{attrs:{href:"#3114-attribute-ranking-rule"}},[e._v("Attribute")])]),e._v(" "),r("li",[r("a",{attrs:{href:"#3115-sort-ranking-rule"}},[e._v("Sort")])]),e._v(" "),r("li",[r("a",{attrs:{href:"#3116-exactness-ranking-rule"}},[e._v("Exactness")])])]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-1-words-ranking-rule"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-words-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.1. Words Ranking Rule")]),e._v(" "),r("p",[e._v("Results are sorted by decreasing the number of matched query terms. "),r("code",[e._v("words")]),e._v(" ranks documents that contain all query terms first.")]),e._v(" "),r("p",[e._v("The "),r("code",[e._v("words")]),e._v(" ranking rule works from right to left. Therefore, the order of the query string impacts the order of results.")]),e._v(" "),r("p",[e._v("For example, if someone were to search "),r("code",[e._v("batman dark knight")]),e._v(", then the words rule would rank documents containing all three terms first, documents containing only "),r("code",[e._v("batman")]),e._v(" and "),r("code",[e._v("dark")]),e._v(" second, and documents containing only "),r("code",[e._v("batman")]),e._v(" third.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-2-typo-ranking-rule"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-typo-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.2. Typo Ranking Rule")]),e._v(" "),r("p",[e._v("Results are sorted by increasing the number of typos. "),r("code",[e._v("typo")]),e._v(" ranks documents that match query terms with fewer typos first.")]),e._v(" "),r("p",[e._v("Meiliseach tolerates a maximum of "),r("code",[e._v("2")]),e._v(" typos for a query term.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-3-proximity-ranking-rule"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-proximity-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.3. Proximity Ranking Rule")]),e._v(" "),r("p",[e._v("Results are sorted by increasing distance between matched query terms. "),r("code",[e._v("proximity")]),e._v(" ranks documents where query terms occur close together and in the same order as the query terms first.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-4-attribute-ranking-rule"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-4-attribute-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.4. Attribute Ranking Rule")]),e._v(" "),r("p",[e._v("Results are sorted according to the attribute ranking order. "),r("code",[e._v("attribute")]),e._v(" ranks documents that contain query terms in more important attributes first. See "),r("a",{attrs:{href:"0123-searchable-attributes-setting-API"}},[e._v("searchableAttributes setting API")]),e._v(".")]),e._v(" "),r("p",[e._v("Also, note that the documents with attributes containing the query terms at the beginning of an attribute will be considered more relevant than documents containing the query terms at the end of an attribute.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-5-sort-ranking-rule"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-5-sort-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.5. Sort Ranking Rule")]),e._v(" "),r("p",[e._v("Results are sorted according to parameters decided at query time.")]),e._v(" "),r("p",[e._v("When the "),r("code",[e._v("sort")]),e._v(" ranking rule is in a "),r("strong",[e._v("higher")]),e._v(" position, sorting is exhaustive: results will be less relevant, but follow the user-defined sorting order more closely.")]),e._v(" "),r("p",[e._v("When the "),r("code",[e._v("sort")]),e._v(" ranking rule is in a "),r("strong",[e._v("lower")]),e._v(" position, sorting is relevant: results will be very relevant, but might not always follow the order defined by the user.")]),e._v(" "),r("p",[e._v("Unlike other ranking rules, "),r("code",[e._v("sort")]),e._v(" is only active for search queries containing the "),r("code",[e._v("sort")]),e._v(" search parameter ("),r("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#1213-sort"}},[e._v("See Sort Search Parameter")]),e._v("). If a search request does not contain "),r("code",[e._v("sort")]),e._v(", this ranking rule will be ignored.")],1),e._v(" "),r("p",[e._v("If a field has values of different types across documents, Meilisearch will give precedence to numbers over strings. It means documents with numeric field values will be ranked higher than those with string values.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-6-exactness-ranking-rule"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-6-exactness-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.6. Exactness Ranking Rule")]),e._v(" "),r("p",[e._v("Results are sorted by the similarity of the matched words with the query words. "),r("code",[e._v("exactness")]),e._v(" ranks documents that contain exactly the same terms as the ones queried first.")]),e._v(" "),r("h3",{attrs:{id:"_3-1-2-custom-ranking-rules"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-custom-ranking-rules"}},[e._v("#")]),e._v(" 3.1.2. Custom Ranking Rules")]),e._v(" "),r("p",[e._v("Meilisearch supports two custom rules expression that can be added to the ranking rules setting: one for ascending sort and one for descending sort.")]),e._v(" "),r("p",[e._v("To add a custom ranking rule, the attribute name must be specified and followed by a colon ("),r("code",[e._v(":")]),e._v(") and either "),r("code",[e._v("asc")]),e._v(" for ascending order or "),r("code",[e._v("desc")]),e._v(" for descending order.")]),e._v(" "),r("p",[e._v("To apply an ascending sort (results sorted by increasing value of the attribute): "),r("code",[e._v('"attribute_name:asc"')])]),e._v(" "),r("p",[e._v("To apply a descending sort (results sorted by decreasing value of the attribute): "),r("code",[e._v('"attribute_name:desc"')])]),e._v(" "),r("p",[e._v("The attribute must have either a numeric or a string value.")]),e._v(" "),r("p",[e._v("Contrary to the "),r("code",[e._v("sort")]),e._v(" ranking rule, custom ranking rules are always active after configured and can be helpful to promote certain types of results. The "),r("code",[e._v("sort")]),e._v(" ranking rule is most useful when end-users define what type of results they want to see first.")]),e._v(" "),r("h4",{attrs:{id:"_3-1-2-1-example"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-example"}},[e._v("#")]),e._v(" 3.1.2.1. Example")]),e._v(" "),r("p",[e._v("Suppose a movie dataset. The documents contain a field "),r("code",[e._v("release_date")]),e._v(" with a timestamp as a value.")]),e._v(" "),r("p",[e._v("The following example creates a custom ranking rule that makes recent movies more relevant than older ones. A movie released in 2020 will appear before a movie released in 1999.")]),e._v(" "),r("p",[r("em",[r("strong",[e._v("Request payload "),r("code",[e._v("PUT")]),e._v("- "),r("code",[e._v("/indexes/products/settings/ranking-rules")])])])]),e._v(" "),r("div",{staticClass:"language-json extra-class"},[r("pre",{pre:!0,attrs:{class:"language-json"}},[r("code",[r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"words"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"typo"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"proximity"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"sort"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"exactness"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"release_date:desc"')]),e._v("\n"),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),r("h3",{attrs:{id:"_3-2-global-settings-api-endpoints-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-global-settings-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2. Global Settings API Endpoints Definition")]),e._v(" "),r("p",[r("code",[e._v("rankingRules")]),e._v(" is a sub-resource of "),r("code",[e._v("/indexes/:index_uid/settings")]),e._v(".")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/specifications/text/0000-settings-api.html"}},[e._v("Settings API")]),e._v(".")],1),e._v(" "),r("h3",{attrs:{id:"_3-3-api-endpoints-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.3. API Endpoints Definition")]),e._v(" "),r("p",[e._v("Manipulate the "),r("code",[e._v("rankingRules")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),r("h4",{attrs:{id:"_3-3-1-get-indexes-index-uid-settings-ranking-rules"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get-indexes-index-uid-settings-ranking-rules"}},[e._v("#")]),e._v(" 3.3.1. "),r("code",[e._v("GET")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/settings/ranking-rules")])]),e._v(" "),r("p",[e._v("Fetch the "),r("code",[e._v("rankingRules")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),r("h5",{attrs:{id:"_3-3-1-1-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-response-definition"}},[e._v("#")]),e._v(" 3.3.1.1. Response Definition")]),e._v(" "),r("ul",[r("li",[e._v("Type: Array of String")]),e._v(" "),r("li",[e._v("Default: "),r("code",[e._v('["words", "typo", "proximity", "attribute", "sort", "exactness"]')])])]),e._v(" "),r("h5",{attrs:{id:"_3-3-1-2-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-2-errors"}},[e._v("#")]),e._v(" 3.3.1.2. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),r("h4",{attrs:{id:"_3-3-2-put-indexes-index-uid-settings-ranking-rules"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-put-indexes-index-uid-settings-ranking-rules"}},[e._v("#")]),e._v(" 3.3.2. "),r("code",[e._v("PUT")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/settings/ranking-rules")])]),e._v(" "),r("p",[e._v("Modify the "),r("code",[e._v("rankingRules")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),r("h5",{attrs:{id:"_3-3-2-1-request-payload-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-1-request-payload-definition"}},[e._v("#")]),e._v(" 3.3.2.1. Request Payload Definition")]),e._v(" "),r("ul",[r("li",[e._v("Type: Array of String / "),r("code",[e._v("null")])])]),e._v(" "),r("p",[e._v("Setting "),r("code",[e._v("null")]),e._v(" is equivalent to using the "),r("a",{attrs:{href:"#333-delete---indexesindexuidsettingsranking-rules"}},[e._v("3.3.3. "),r("code",[e._v("DELETE")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/settings/ranking-rules")])]),e._v(" API endpoint.")]),e._v(" "),r("p",[e._v("Specifying a document attribute that does not exist as a "),r("code",[e._v("rankingRules")]),e._v(" index setting returns no error.")]),e._v(" "),r("p",[e._v("Specifying "),r("code",[e._v("[]")]),e._v(" for the "),r("code",[e._v("rankingRules")]),e._v(" index setting allows specifying that no ranking rules are used to rank results. Search results are sorted by their "),r("strong",[e._v("internal id")]),e._v(" which can be considered as "),r("strong",[e._v("undefined order")]),e._v(".")]),e._v(" "),r("h5",{attrs:{id:"_3-3-2-2-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-2-response-definition"}},[e._v("#")]),e._v(" 3.3.2.2. Response Definition")]),e._v(" "),r("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),r("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),r("code",[e._v("task")]),e._v(" Object for "),r("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),r("h5",{attrs:{id:"_3-3-2-3-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-errors"}},[e._v("#")]),e._v(" 3.3.2.3. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Omitting Content-Type header returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an empty Content-Type returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a different Content-Type than "),r("code",[e._v("application/json")]),e._v(" returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an empty payload returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid JSON payload returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid index uid format for the "),r("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a request payload value type different of "),r("code",[e._v("Array of String")]),e._v(", "),r("code",[e._v("[]")]),e._v(", or "),r("code",[e._v("null")]),e._v(" returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_ranking_rules"}},[e._v("invalid_settings_ranking_rules")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid ranking rule returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_ranking_rules"}},[e._v("invalid_settings_ranking_rules")]),e._v(" error in the related asynchronous "),r("code",[e._v("task")]),e._v(" resource. See "),r("a",{attrs:{href:"#3222-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")],1)]),e._v(" "),r("h6",{attrs:{id:"_3-3-2-3-1-async-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-1-async-errors"}},[e._v("#")]),e._v(" 3.3.2.3.1. Async Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 When Meilisearch is secured, if the API Key do not have the "),r("code",[e._v("indexes.create")]),e._v(" action defined, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related asynchronous "),r("code",[e._v("task")]),e._v(" resource. See "),r("a",{attrs:{href:"#3222-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")],1)]),e._v(" "),r("blockquote",[r("p",[e._v("Otherwise, Meilisearch will create the index in a lazy way. See "),r("a",{attrs:{href:"#3224-lazy-index-creation"}},[e._v("3.2.2.4. Lazy Index Creation")]),e._v(".")])]),e._v(" "),r("h5",{attrs:{id:"_3-3-2-4-lazy-index-creation"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-4-lazy-index-creation"}},[e._v("#")]),e._v(" 3.3.2.4. Lazy Index Creation")]),e._v(" "),r("p",[e._v("If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, and the authorization layer allows it (See "),r("a",{attrs:{href:"#33231-async-errors"}},[e._v("3.3.2.3.1. Async Errors")]),e._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),r("a",{attrs:{href:"#3322-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")]),e._v(" "),r("h4",{attrs:{id:"_3-3-3-delete-indexes-index-uid-settings-ranking-rules"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-delete-indexes-index-uid-settings-ranking-rules"}},[e._v("#")]),e._v(" 3.3.3. "),r("code",[e._v("DELETE")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/settings/ranking-rules")])]),e._v(" "),r("p",[e._v("Reset the "),r("code",[e._v("rankingRules")]),e._v(" setting of a Meilisearch index to the default value "),r("code",[e._v('["*"]')]),e._v(".")]),e._v(" "),r("h5",{attrs:{id:"_3-3-3-1-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-1-response-definition"}},[e._v("#")]),e._v(" 3.3.3.1. Response Definition")]),e._v(" "),r("p",[e._v("When the request is in a successful state, Meilisearch returns the HTTP code "),r("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),r("code",[e._v("task")]),e._v(" Object for "),r("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),r("h5",{attrs:{id:"_3-3-3-3-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-errors"}},[e._v("#")]),e._v(" 3.3.3.3. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Sending an invalid index uid format for the "),r("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1)]),e._v(" "),r("h6",{attrs:{id:"_3-3-3-3-1-asynchronous-index-not-found-error"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-1-asynchronous-index-not-found-error"}},[e._v("#")]),e._v(" 3.3.3.3.1. Asynchronous Index Not Found Error")]),e._v(" "),r("ul",[r("li",[e._v("🔴 If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related async "),r("code",[e._v("task")]),e._v(" resource. See "),r("a",{attrs:{href:"#3331-response-definition"}},[e._v("3.3.3.1. Response Definition")]),e._v(".")],1)]),e._v(" "),r("h4",{attrs:{id:"_3-3-4-general-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-general-errors"}},[e._v("#")]),e._v(" 3.3.4. General Errors")]),e._v(" "),r("p",[e._v("These errors apply to all endpoints described here.")]),e._v(" "),r("h5",{attrs:{id:"_3-3-4-1-auth-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-1-auth-errors"}},[e._v("#")]),e._v(" 3.3.4.1 Auth Errors")]),e._v(" "),r("p",[e._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Accessing this route without the "),r("code",[e._v("Authorization")]),e._v(" header returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),r("h2",{attrs:{id:"_4-technical-details"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[e._v("#")]),e._v(" 4. Technical Details")]),e._v(" "),r("h3",{attrs:{id:"_4-1-bucket-sort"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-bucket-sort"}},[e._v("#")]),e._v(" 4.1. Bucket Sort")]),e._v(" "),r("p",[e._v("Whenever a search query is made, Meilisearch uses a "),r("a",{attrs:{href:"https://en.wikipedia.org/wiki/Bucket_sort",target:"_blank",rel:"noopener noreferrer"}},[e._v("bucket sort"),r("OutboundLink")],1),e._v(" algorithm to rank documents.")]),e._v(" "),r("p",[e._v("The first ranking rule is applied to all documents, while each subsequent rule is only applied to documents that are considered equal under the previous rule (i.e. as a tiebreaker).")]),e._v(" "),r("h2",{attrs:{id:"_5-future-possibilities"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),r("ul",[r("li",[e._v("Return an error when "),r("code",[e._v("rankingRules")]),e._v(" is defined as an empty array")])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/42.0ada06ba.js b/docs/assets/js/42.abb4f81a.js similarity index 99% rename from docs/assets/js/42.0ada06ba.js rename to docs/assets/js/42.abb4f81a.js index 5bbba2870..3f2501f03 100644 --- a/docs/assets/js/42.0ada06ba.js +++ b/docs/assets/js/42.abb4f81a.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[42],{465:function(e,t,i){"use strict";i.r(t);var a=i(62),s=Object(a.a)({},(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[i("h1",{attrs:{id:"searchable-attributes-setting-api"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#searchable-attributes-setting-api"}},[e._v("#")]),e._v(" Searchable Attributes Setting API")]),e._v(" "),i("h2",{attrs:{id:"_1-summary"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),i("p",[e._v("This specification describes the "),i("code",[e._v("searchableAttributes")]),e._v(" index setting API endpoints.")]),e._v(" "),i("h2",{attrs:{id:"_2-motivation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),i("p",[e._v("N/A")]),e._v(" "),i("h2",{attrs:{id:"_3-functional-specification"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),i("h3",{attrs:{id:"_3-1-explanations"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-explanations"}},[e._v("#")]),e._v(" 3.1. Explanations")]),e._v(" "),i("p",[e._v("Documents in Meilisearch are composed of multiple fields. A field can either be searchable or non-searchable.")]),e._v(" "),i("p",[e._v("When a search query is performed, all searchable fields are checked for matching query words and used to assess document relevancy, while non-searchable fields are ignored entirely.")]),e._v(" "),i("p",[e._v("By default, Meilisearch looks for matches in every field, but the "),i("code",[e._v("searchableAttributes")]),e._v(" setting object allow to customize that behavior.")]),e._v(" "),i("h4",{attrs:{id:"_3-1-1-usage-example"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-usage-example"}},[e._v("#")]),e._v(" 3.1.1. Usage Example")]),e._v(" "),i("p",[e._v("Suppose a database of movies with the following fields: "),i("code",[e._v("id")]),e._v(", "),i("code",[e._v("overview")]),e._v(", "),i("code",[e._v("genres")]),e._v(", "),i("code",[e._v("title")]),e._v(", "),i("code",[e._v("release_date")]),e._v(". These fields all contain useful information; however, some are more useful to search than others. To make the "),i("code",[e._v("id")]),e._v(" and "),i("code",[e._v("release_date")]),e._v(" fields non-searchable and re-order the remaining fields by importance, it can be specified in the following way.")]),e._v(" "),i("p",[i("em",[i("strong",[e._v("Request payload "),i("code",[e._v("PUT")]),e._v("- "),i("code",[e._v("/indexes/movies/settings/searchable-attributes")])])])]),e._v(" "),i("div",{staticClass:"language-json extra-class"},[i("pre",{pre:!0,attrs:{class:"language-json"}},[i("code",[i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"overview"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"genres"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"title"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),i("h4",{attrs:{id:"_3-1-2-field-ordering"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-field-ordering"}},[e._v("#")]),e._v(" 3.1.2. Field Ordering")]),e._v(" "),i("p",[e._v("Meilisearch uses an ordered list to determine which attributes are searchable. The order in which attributes appear in this list also determines their impact on relevancy, from most impactful to least.")]),e._v(" "),i("p",[e._v("In other words, the "),i("code",[e._v("searchableAttributes")]),e._v(" setting serves two purposes:")]),e._v(" "),i("ul",[i("li",[e._v("It designates the fields that are searchable.")]),e._v(" "),i("li",[e._v("It dictates the attribute ranking order.")])]),e._v(" "),i("p",[e._v("There are two possible modes for the "),i("code",[e._v("searchableAttributes")]),e._v(" setting.")]),e._v(" "),i("h5",{attrs:{id:"_3-1-1-1-default-case-automatic"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-default-case-automatic"}},[e._v("#")]),e._v(" 3.1.1.1. Default case: Automatic")]),e._v(" "),i("p",[e._v("By default, all attributes are automatically added to the "),i("code",[e._v("searchableAttributes")]),e._v(" list in their order of appearance.")]),e._v(" "),i("p",[e._v("This means that the initial order will be based on the order of attributes in the first document indexed, with each new attribute found in subsequent documents added at the end of this list.")]),e._v(" "),i("p",[e._v("This default behavior is indicated by a "),i("code",[e._v("searchableAttributes")]),e._v(" value of "),i("code",[e._v('["*"]')]),e._v(".")]),e._v(" "),i("h5",{attrs:{id:"_3-1-1-2-manual"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-manual"}},[e._v("#")]),e._v(" 3.1.1.2. Manual")]),e._v(" "),i("p",[e._v("To make some attributes non-searchable, or change the attribute ranking order. Attributes must be described from most important to least important.")]),e._v(" "),i("p",[i("em",[i("strong",[e._v("Request payload "),i("code",[e._v("PUT")]),e._v("- "),i("code",[e._v("/indexes/movies/settings/searchable-attributes")])])])]),e._v(" "),i("div",{staticClass:"language-json extra-class"},[i("pre",{pre:!0,attrs:{class:"language-json"}},[i("code",[i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"title"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"overview"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"genres"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),i("p",[i("code",[e._v("title")]),e._v(" is considered more important than "),i("code",[e._v("overview")]),e._v(" while "),i("code",[e._v("overview")]),e._v(" is considered more important than "),i("code",[e._v("genres")]),e._v(".")]),e._v(" "),i("p",[e._v("The "),i("a",{attrs:{href:""}},[e._v("Attribute Ranking Rule")]),e._v(" ranks search results by the order defined in the "),i("code",[e._v("searchableAttributes")]),e._v(" setting. Documents that contain query terms in the more important searchable attribute will be returned first.")]),e._v(" "),i("p",[e._v("Manually updating "),i("code",[e._v("searchableAttributes")]),e._v(" will change the displayed order of document fields in the JSON response.")]),e._v(" "),i("h4",{attrs:{id:"_3-1-3-relationship-with-ranking-rules"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-relationship-with-ranking-rules"}},[e._v("#")]),e._v(" 3.1.3. Relationship With Ranking Rules")]),e._v(" "),i("p",[e._v("A document field that is not defined in the list of "),i("code",[e._v("searchableAttributes")]),e._v(" will not be considered by the following ranking rules to match and rank search results.")]),e._v(" "),i("ol",[i("li",[i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html#3111-words-ranking-rule"}},[e._v("Words")])],1),e._v(" "),i("li",[i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html#3112-typo-ranking-rule"}},[e._v("Typo")])],1),e._v(" "),i("li",[i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html#3113-proximity-ranking-rule"}},[e._v("Proximity")])],1),e._v(" "),i("li",[i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html#3114-attribute-ranking-rule"}},[e._v("Attribute")])],1),e._v(" "),i("li",[i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html#3116-exactness-ranking-rule"}},[e._v("Exactness")])],1)]),e._v(" "),i("h3",{attrs:{id:"_3-2-global-settings-api-endpoints-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-global-settings-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2. Global Settings API Endpoints Definition")]),e._v(" "),i("p",[i("code",[e._v("searchableAttributes")]),e._v(" is a sub-resource of "),i("code",[e._v("/indexes/:index_uid/settings")]),e._v(".")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html"}},[e._v("Settings API")]),e._v(".")],1),e._v(" "),i("h3",{attrs:{id:"_3-3-api-endpoints-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.3. API Endpoints Definition")]),e._v(" "),i("p",[e._v("Manipulate the "),i("code",[e._v("searchableAttributes")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h4",{attrs:{id:"_3-3-1-get-indexes-index-uid-settings-searchable-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get-indexes-index-uid-settings-searchable-attributes"}},[e._v("#")]),e._v(" 3.3.1. "),i("code",[e._v("GET")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/searchable-attributes")])]),e._v(" "),i("p",[e._v("Fetch the "),i("code",[e._v("searchableAttributes")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-1-1-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-response-definition"}},[e._v("#")]),e._v(" 3.3.1.1. Response Definition")]),e._v(" "),i("ul",[i("li",[e._v("Type: Array of String")]),e._v(" "),i("li",[e._v("Default: "),i("code",[e._v('["*"]')])])]),e._v(" "),i("h5",{attrs:{id:"_3-3-1-2-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-2-errors"}},[e._v("#")]),e._v(" 3.3.1.2. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),i("h4",{attrs:{id:"_3-3-2-put-indexes-index-uid-settings-searchable-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-put-indexes-index-uid-settings-searchable-attributes"}},[e._v("#")]),e._v(" 3.3.2. "),i("code",[e._v("PUT")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/searchable-attributes")])]),e._v(" "),i("p",[e._v("Modify the "),i("code",[e._v("searchableAttributes")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-2-1-request-payload-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-1-request-payload-definition"}},[e._v("#")]),e._v(" 3.3.2.1. Request Payload Definition")]),e._v(" "),i("ul",[i("li",[e._v("Type: Array of String / "),i("code",[e._v("null")])])]),e._v(" "),i("p",[e._v("Setting "),i("code",[e._v("null")]),e._v(" is equivalent to using the "),i("a",{attrs:{href:"#333-delete---indexesindexuidsettingssearchable-attributes"}},[e._v("3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/searchable-attributes")])]),e._v(" API endpoint.")]),e._v(" "),i("p",[e._v("Specifying a document attribute that does not exist as a "),i("code",[e._v("searchableAttributes")]),e._v(" index setting returns no error.")]),e._v(" "),i("p",[e._v("Specifying "),i("code",[e._v("[]")]),e._v(" for the "),i("code",[e._v("searchableAttributes")]),e._v(" index setting allows to specify that all fields are non-searchable.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-2-2-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-2-response-definition"}},[e._v("#")]),e._v(" 3.3.2.2. Response Definition")]),e._v(" "),i("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),i("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),i("code",[e._v("task")]),e._v(" Object for "),i("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),i("h5",{attrs:{id:"_3-3-2-3-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-errors"}},[e._v("#")]),e._v(" 3.3.2.3. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Omitting Content-Type header returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an empty Content-Type returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a different Content-Type than "),i("code",[e._v("application/json")]),e._v(" returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an empty payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an invalid JSON payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a request payload value type different of "),i("code",[e._v("Array of String")]),e._v(", "),i("code",[e._v("[]")]),e._v(" or "),i("code",[e._v("null")]),e._v(" returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_searchable_attributes"}},[e._v("invalid_settings_searchable_attributes")]),e._v(" error.")],1)]),e._v(" "),i("h6",{attrs:{id:"_3-3-2-3-1-async-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-1-async-errors"}},[e._v("#")]),e._v(" 3.3.2.3.1. Async Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 When Meilisearch is secured, if the API Key do not have the "),i("code",[e._v("indexes.create")]),e._v(" action defined, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related asynchronous "),i("code",[e._v("task")]),e._v(" resource. See "),i("a",{attrs:{href:"#3222-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")],1)]),e._v(" "),i("blockquote",[i("p",[e._v("Otherwise, Meilisearch will create the index in a lazy way. See "),i("a",{attrs:{href:"#3224-lazy-index-creation"}},[e._v("3.2.2.4. Lazy Index Creation")]),e._v(".")])]),e._v(" "),i("h5",{attrs:{id:"_3-3-2-4-lazy-index-creation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-4-lazy-index-creation"}},[e._v("#")]),e._v(" 3.3.2.4. Lazy Index Creation")]),e._v(" "),i("p",[e._v("If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, and the authorization layer allows it (See "),i("a",{attrs:{href:"#33231-async-errors"}},[e._v("3.3.2.3.1. Async Errors")]),e._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),i("a",{attrs:{href:"#3322-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")]),e._v(" "),i("h4",{attrs:{id:"_3-3-3-delete-indexes-index-uid-settings-searchable-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-delete-indexes-index-uid-settings-searchable-attributes"}},[e._v("#")]),e._v(" 3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/searchable-attributes")])]),e._v(" "),i("p",[e._v("Reset the "),i("code",[e._v("searchableAttributes")]),e._v(" setting of a Meilisearch index to the default value "),i("code",[e._v('["*"]')]),e._v(".")]),e._v(" "),i("h5",{attrs:{id:"_3-3-3-1-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-1-response-definition"}},[e._v("#")]),e._v(" 3.3.3.1. Response Definition")]),e._v(" "),i("p",[e._v("When the request is in a successful state, Meilisearch returns the HTTP code "),i("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),i("code",[e._v("task")]),e._v(" Object for "),i("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),i("h5",{attrs:{id:"_3-3-3-3-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-errors"}},[e._v("#")]),e._v(" 3.3.3.3. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1)]),e._v(" "),i("h6",{attrs:{id:"_3-3-3-3-1-asynchronous-index-not-found-error"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-1-asynchronous-index-not-found-error"}},[e._v("#")]),e._v(" 3.3.3.3.1. Asynchronous Index Not Found Error")]),e._v(" "),i("ul",[i("li",[e._v("🔴 If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related async "),i("code",[e._v("task")]),e._v(" resource. See "),i("a",{attrs:{href:"#3331-response-definition"}},[e._v("3.3.3.1. Response Definition")]),e._v(".")],1)]),e._v(" "),i("h4",{attrs:{id:"_3-3-4-general-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-general-errors"}},[e._v("#")]),e._v(" 3.3.4. General Errors")]),e._v(" "),i("p",[e._v("These errors apply to all endpoints described here.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-4-1-auth-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-1-auth-errors"}},[e._v("#")]),e._v(" 3.3.4.1 Auth Errors")]),e._v(" "),i("p",[e._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Accessing this route without the "),i("code",[e._v("Authorization")]),e._v(" header returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),i("h2",{attrs:{id:"_4-technical-details"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[e._v("#")]),e._v(" 4. Technical Details")]),e._v(" "),i("h3",{attrs:{id:"_4-1-triggering-documents-re-indexing"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-triggering-documents-re-indexing"}},[e._v("#")]),e._v(" 4.1. Triggering Documents Re-Indexing")]),e._v(" "),i("p",[e._v("Meilisearch favors search speed and makes a trade-off on indexing speed by computing internal data structures to get search results as fast as possible.")]),e._v(" "),i("p",[e._v("Modifying this index setting cause documents to be re-indexed.")]),e._v(" "),i("h2",{attrs:{id:"_5-future-possibilities"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),i("ul",[i("li",[e._v("Fix the reordering issue of document representation when "),i("code",[e._v("searchableAttributes")]),e._v(" is specified.")])])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[42],{466:function(e,t,i){"use strict";i.r(t);var a=i(62),s=Object(a.a)({},(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[i("h1",{attrs:{id:"searchable-attributes-setting-api"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#searchable-attributes-setting-api"}},[e._v("#")]),e._v(" Searchable Attributes Setting API")]),e._v(" "),i("h2",{attrs:{id:"_1-summary"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),i("p",[e._v("This specification describes the "),i("code",[e._v("searchableAttributes")]),e._v(" index setting API endpoints.")]),e._v(" "),i("h2",{attrs:{id:"_2-motivation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),i("p",[e._v("N/A")]),e._v(" "),i("h2",{attrs:{id:"_3-functional-specification"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),i("h3",{attrs:{id:"_3-1-explanations"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-explanations"}},[e._v("#")]),e._v(" 3.1. Explanations")]),e._v(" "),i("p",[e._v("Documents in Meilisearch are composed of multiple fields. A field can either be searchable or non-searchable.")]),e._v(" "),i("p",[e._v("When a search query is performed, all searchable fields are checked for matching query words and used to assess document relevancy, while non-searchable fields are ignored entirely.")]),e._v(" "),i("p",[e._v("By default, Meilisearch looks for matches in every field, but the "),i("code",[e._v("searchableAttributes")]),e._v(" setting object allow to customize that behavior.")]),e._v(" "),i("h4",{attrs:{id:"_3-1-1-usage-example"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-usage-example"}},[e._v("#")]),e._v(" 3.1.1. Usage Example")]),e._v(" "),i("p",[e._v("Suppose a database of movies with the following fields: "),i("code",[e._v("id")]),e._v(", "),i("code",[e._v("overview")]),e._v(", "),i("code",[e._v("genres")]),e._v(", "),i("code",[e._v("title")]),e._v(", "),i("code",[e._v("release_date")]),e._v(". These fields all contain useful information; however, some are more useful to search than others. To make the "),i("code",[e._v("id")]),e._v(" and "),i("code",[e._v("release_date")]),e._v(" fields non-searchable and re-order the remaining fields by importance, it can be specified in the following way.")]),e._v(" "),i("p",[i("em",[i("strong",[e._v("Request payload "),i("code",[e._v("PUT")]),e._v("- "),i("code",[e._v("/indexes/movies/settings/searchable-attributes")])])])]),e._v(" "),i("div",{staticClass:"language-json extra-class"},[i("pre",{pre:!0,attrs:{class:"language-json"}},[i("code",[i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"overview"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"genres"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"title"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),i("h4",{attrs:{id:"_3-1-2-field-ordering"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-field-ordering"}},[e._v("#")]),e._v(" 3.1.2. Field Ordering")]),e._v(" "),i("p",[e._v("Meilisearch uses an ordered list to determine which attributes are searchable. The order in which attributes appear in this list also determines their impact on relevancy, from most impactful to least.")]),e._v(" "),i("p",[e._v("In other words, the "),i("code",[e._v("searchableAttributes")]),e._v(" setting serves two purposes:")]),e._v(" "),i("ul",[i("li",[e._v("It designates the fields that are searchable.")]),e._v(" "),i("li",[e._v("It dictates the attribute ranking order.")])]),e._v(" "),i("p",[e._v("There are two possible modes for the "),i("code",[e._v("searchableAttributes")]),e._v(" setting.")]),e._v(" "),i("h5",{attrs:{id:"_3-1-1-1-default-case-automatic"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-default-case-automatic"}},[e._v("#")]),e._v(" 3.1.1.1. Default case: Automatic")]),e._v(" "),i("p",[e._v("By default, all attributes are automatically added to the "),i("code",[e._v("searchableAttributes")]),e._v(" list in their order of appearance.")]),e._v(" "),i("p",[e._v("This means that the initial order will be based on the order of attributes in the first document indexed, with each new attribute found in subsequent documents added at the end of this list.")]),e._v(" "),i("p",[e._v("This default behavior is indicated by a "),i("code",[e._v("searchableAttributes")]),e._v(" value of "),i("code",[e._v('["*"]')]),e._v(".")]),e._v(" "),i("h5",{attrs:{id:"_3-1-1-2-manual"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-manual"}},[e._v("#")]),e._v(" 3.1.1.2. Manual")]),e._v(" "),i("p",[e._v("To make some attributes non-searchable, or change the attribute ranking order. Attributes must be described from most important to least important.")]),e._v(" "),i("p",[i("em",[i("strong",[e._v("Request payload "),i("code",[e._v("PUT")]),e._v("- "),i("code",[e._v("/indexes/movies/settings/searchable-attributes")])])])]),e._v(" "),i("div",{staticClass:"language-json extra-class"},[i("pre",{pre:!0,attrs:{class:"language-json"}},[i("code",[i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"title"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"overview"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"genres"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),i("p",[i("code",[e._v("title")]),e._v(" is considered more important than "),i("code",[e._v("overview")]),e._v(" while "),i("code",[e._v("overview")]),e._v(" is considered more important than "),i("code",[e._v("genres")]),e._v(".")]),e._v(" "),i("p",[e._v("The "),i("a",{attrs:{href:""}},[e._v("Attribute Ranking Rule")]),e._v(" ranks search results by the order defined in the "),i("code",[e._v("searchableAttributes")]),e._v(" setting. Documents that contain query terms in the more important searchable attribute will be returned first.")]),e._v(" "),i("p",[e._v("Manually updating "),i("code",[e._v("searchableAttributes")]),e._v(" will change the displayed order of document fields in the JSON response.")]),e._v(" "),i("h4",{attrs:{id:"_3-1-3-relationship-with-ranking-rules"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-relationship-with-ranking-rules"}},[e._v("#")]),e._v(" 3.1.3. Relationship With Ranking Rules")]),e._v(" "),i("p",[e._v("A document field that is not defined in the list of "),i("code",[e._v("searchableAttributes")]),e._v(" will not be considered by the following ranking rules to match and rank search results.")]),e._v(" "),i("ol",[i("li",[i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html#3111-words-ranking-rule"}},[e._v("Words")])],1),e._v(" "),i("li",[i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html#3112-typo-ranking-rule"}},[e._v("Typo")])],1),e._v(" "),i("li",[i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html#3113-proximity-ranking-rule"}},[e._v("Proximity")])],1),e._v(" "),i("li",[i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html#3114-attribute-ranking-rule"}},[e._v("Attribute")])],1),e._v(" "),i("li",[i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html#3116-exactness-ranking-rule"}},[e._v("Exactness")])],1)]),e._v(" "),i("h3",{attrs:{id:"_3-2-global-settings-api-endpoints-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-global-settings-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2. Global Settings API Endpoints Definition")]),e._v(" "),i("p",[i("code",[e._v("searchableAttributes")]),e._v(" is a sub-resource of "),i("code",[e._v("/indexes/:index_uid/settings")]),e._v(".")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html"}},[e._v("Settings API")]),e._v(".")],1),e._v(" "),i("h3",{attrs:{id:"_3-3-api-endpoints-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.3. API Endpoints Definition")]),e._v(" "),i("p",[e._v("Manipulate the "),i("code",[e._v("searchableAttributes")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h4",{attrs:{id:"_3-3-1-get-indexes-index-uid-settings-searchable-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get-indexes-index-uid-settings-searchable-attributes"}},[e._v("#")]),e._v(" 3.3.1. "),i("code",[e._v("GET")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/searchable-attributes")])]),e._v(" "),i("p",[e._v("Fetch the "),i("code",[e._v("searchableAttributes")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-1-1-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-response-definition"}},[e._v("#")]),e._v(" 3.3.1.1. Response Definition")]),e._v(" "),i("ul",[i("li",[e._v("Type: Array of String")]),e._v(" "),i("li",[e._v("Default: "),i("code",[e._v('["*"]')])])]),e._v(" "),i("h5",{attrs:{id:"_3-3-1-2-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-2-errors"}},[e._v("#")]),e._v(" 3.3.1.2. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),i("h4",{attrs:{id:"_3-3-2-put-indexes-index-uid-settings-searchable-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-put-indexes-index-uid-settings-searchable-attributes"}},[e._v("#")]),e._v(" 3.3.2. "),i("code",[e._v("PUT")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/searchable-attributes")])]),e._v(" "),i("p",[e._v("Modify the "),i("code",[e._v("searchableAttributes")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-2-1-request-payload-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-1-request-payload-definition"}},[e._v("#")]),e._v(" 3.3.2.1. Request Payload Definition")]),e._v(" "),i("ul",[i("li",[e._v("Type: Array of String / "),i("code",[e._v("null")])])]),e._v(" "),i("p",[e._v("Setting "),i("code",[e._v("null")]),e._v(" is equivalent to using the "),i("a",{attrs:{href:"#333-delete---indexesindexuidsettingssearchable-attributes"}},[e._v("3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/searchable-attributes")])]),e._v(" API endpoint.")]),e._v(" "),i("p",[e._v("Specifying a document attribute that does not exist as a "),i("code",[e._v("searchableAttributes")]),e._v(" index setting returns no error.")]),e._v(" "),i("p",[e._v("Specifying "),i("code",[e._v("[]")]),e._v(" for the "),i("code",[e._v("searchableAttributes")]),e._v(" index setting allows to specify that all fields are non-searchable.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-2-2-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-2-response-definition"}},[e._v("#")]),e._v(" 3.3.2.2. Response Definition")]),e._v(" "),i("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),i("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),i("code",[e._v("task")]),e._v(" Object for "),i("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),i("h5",{attrs:{id:"_3-3-2-3-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-errors"}},[e._v("#")]),e._v(" 3.3.2.3. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Omitting Content-Type header returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an empty Content-Type returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a different Content-Type than "),i("code",[e._v("application/json")]),e._v(" returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an empty payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an invalid JSON payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a request payload value type different of "),i("code",[e._v("Array of String")]),e._v(", "),i("code",[e._v("[]")]),e._v(" or "),i("code",[e._v("null")]),e._v(" returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_searchable_attributes"}},[e._v("invalid_settings_searchable_attributes")]),e._v(" error.")],1)]),e._v(" "),i("h6",{attrs:{id:"_3-3-2-3-1-async-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-1-async-errors"}},[e._v("#")]),e._v(" 3.3.2.3.1. Async Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 When Meilisearch is secured, if the API Key do not have the "),i("code",[e._v("indexes.create")]),e._v(" action defined, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related asynchronous "),i("code",[e._v("task")]),e._v(" resource. See "),i("a",{attrs:{href:"#3222-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")],1)]),e._v(" "),i("blockquote",[i("p",[e._v("Otherwise, Meilisearch will create the index in a lazy way. See "),i("a",{attrs:{href:"#3224-lazy-index-creation"}},[e._v("3.2.2.4. Lazy Index Creation")]),e._v(".")])]),e._v(" "),i("h5",{attrs:{id:"_3-3-2-4-lazy-index-creation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-4-lazy-index-creation"}},[e._v("#")]),e._v(" 3.3.2.4. Lazy Index Creation")]),e._v(" "),i("p",[e._v("If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, and the authorization layer allows it (See "),i("a",{attrs:{href:"#33231-async-errors"}},[e._v("3.3.2.3.1. Async Errors")]),e._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),i("a",{attrs:{href:"#3322-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")]),e._v(" "),i("h4",{attrs:{id:"_3-3-3-delete-indexes-index-uid-settings-searchable-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-delete-indexes-index-uid-settings-searchable-attributes"}},[e._v("#")]),e._v(" 3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/searchable-attributes")])]),e._v(" "),i("p",[e._v("Reset the "),i("code",[e._v("searchableAttributes")]),e._v(" setting of a Meilisearch index to the default value "),i("code",[e._v('["*"]')]),e._v(".")]),e._v(" "),i("h5",{attrs:{id:"_3-3-3-1-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-1-response-definition"}},[e._v("#")]),e._v(" 3.3.3.1. Response Definition")]),e._v(" "),i("p",[e._v("When the request is in a successful state, Meilisearch returns the HTTP code "),i("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),i("code",[e._v("task")]),e._v(" Object for "),i("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),i("h5",{attrs:{id:"_3-3-3-3-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-errors"}},[e._v("#")]),e._v(" 3.3.3.3. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1)]),e._v(" "),i("h6",{attrs:{id:"_3-3-3-3-1-asynchronous-index-not-found-error"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-1-asynchronous-index-not-found-error"}},[e._v("#")]),e._v(" 3.3.3.3.1. Asynchronous Index Not Found Error")]),e._v(" "),i("ul",[i("li",[e._v("🔴 If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related async "),i("code",[e._v("task")]),e._v(" resource. See "),i("a",{attrs:{href:"#3331-response-definition"}},[e._v("3.3.3.1. Response Definition")]),e._v(".")],1)]),e._v(" "),i("h4",{attrs:{id:"_3-3-4-general-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-general-errors"}},[e._v("#")]),e._v(" 3.3.4. General Errors")]),e._v(" "),i("p",[e._v("These errors apply to all endpoints described here.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-4-1-auth-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-1-auth-errors"}},[e._v("#")]),e._v(" 3.3.4.1 Auth Errors")]),e._v(" "),i("p",[e._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Accessing this route without the "),i("code",[e._v("Authorization")]),e._v(" header returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),i("h2",{attrs:{id:"_4-technical-details"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[e._v("#")]),e._v(" 4. Technical Details")]),e._v(" "),i("h3",{attrs:{id:"_4-1-triggering-documents-re-indexing"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-triggering-documents-re-indexing"}},[e._v("#")]),e._v(" 4.1. Triggering Documents Re-Indexing")]),e._v(" "),i("p",[e._v("Meilisearch favors search speed and makes a trade-off on indexing speed by computing internal data structures to get search results as fast as possible.")]),e._v(" "),i("p",[e._v("Modifying this index setting cause documents to be re-indexed.")]),e._v(" "),i("h2",{attrs:{id:"_5-future-possibilities"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),i("ul",[i("li",[e._v("Fix the reordering issue of document representation when "),i("code",[e._v("searchableAttributes")]),e._v(" is specified.")])])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/46.9f9d4a1b.js b/docs/assets/js/46.7f495a96.js similarity index 99% rename from docs/assets/js/46.9f9d4a1b.js rename to docs/assets/js/46.7f495a96.js index fcfa9f422..a250012a1 100644 --- a/docs/assets/js/46.9f9d4a1b.js +++ b/docs/assets/js/46.7f495a96.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[46],{471:function(e,t,i){"use strict";i.r(t);var s=i(62),r=Object(s.a)({},(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[i("h1",{attrs:{id:"stop-words-setting-api"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#stop-words-setting-api"}},[e._v("#")]),e._v(" Stop Words Setting API")]),e._v(" "),i("h2",{attrs:{id:"_1-summary"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),i("p",[e._v("This specification describes the "),i("code",[e._v("stopWords")]),e._v(" index setting API endpoints.")]),e._v(" "),i("h2",{attrs:{id:"_2-motivation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),i("p",[e._v("N/A")]),e._v(" "),i("h2",{attrs:{id:"_3-functional-specification"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),i("h3",{attrs:{id:"_3-1-explanations"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-explanations"}},[e._v("#")]),e._v(" 3.1. Explanations")]),e._v(" "),i("p",[e._v("The "),i("code",[e._v("stopWords")]),e._v(" index setting allows the configuration of a list of words to be ignored in search queries. The stop words contained in a search query will be ignored by the engine when matching and ranking search results.")]),e._v(" "),i("h4",{attrs:{id:"_3-1-1-usage-example"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-usage-example"}},[e._v("#")]),e._v(" 3.1.1. Usage Example")]),e._v(" "),i("p",[e._v("Suppose a database contains articles written in English. Countless occurrences of "),i("code",[e._v("the")]),e._v(" and "),i("code",[e._v("of")]),e._v(" could deteriorate the relevancy of search results. To set "),i("code",[e._v("the")]),e._v(" and "),i("code",[e._v("of")]),e._v(" words as stop words, it can be specified the following way.")]),e._v(" "),i("p",[i("em",[i("strong",[e._v("Request payload "),i("code",[e._v("PUT")]),e._v("- "),i("code",[e._v("/indexes/articles/settings/stop-words")])])])]),e._v(" "),i("div",{staticClass:"language-json extra-class"},[i("pre",{pre:!0,attrs:{class:"language-json"}},[i("code",[i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"the"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"of"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),i("p",[e._v("By adding common English words such as "),i("code",[e._v("the")]),e._v(" or "),i("code",[e._v("of")]),e._v(" to the stop-words list, Meilisearch will not take them into consideration when calculating how relevant a result is.")]),e._v(" "),i("h3",{attrs:{id:"_3-2-global-settings-api-endpoints-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-global-settings-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2. Global Settings API Endpoints Definition")]),e._v(" "),i("p",[i("code",[e._v("stopWords")]),e._v(" is a sub-resource of "),i("code",[e._v("/indexes/:index_uid/settings")]),e._v(".")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html"}},[e._v("Settings API")]),e._v(".")],1),e._v(" "),i("h3",{attrs:{id:"_3-3-api-endpoints-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.3. API Endpoints Definition")]),e._v(" "),i("p",[e._v("Manipulate the "),i("code",[e._v("stopWords")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h4",{attrs:{id:"_3-3-1-get-indexes-index-uid-settings-stop-words"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get-indexes-index-uid-settings-stop-words"}},[e._v("#")]),e._v(" 3.3.1. "),i("code",[e._v("GET")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/stop-words")])]),e._v(" "),i("p",[e._v("Fetch the "),i("code",[e._v("stopWords")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-1-1-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-response-definition"}},[e._v("#")]),e._v(" 3.3.1.1. Response Definition")]),e._v(" "),i("ul",[i("li",[e._v("Type: Array of String")]),e._v(" "),i("li",[e._v("Default: "),i("code",[e._v("[]")])])]),e._v(" "),i("h5",{attrs:{id:"_3-3-1-2-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-2-errors"}},[e._v("#")]),e._v(" 3.3.1.2. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),i("h4",{attrs:{id:"_3-3-2-put-indexes-index-uid-settings-stop-words"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-put-indexes-index-uid-settings-stop-words"}},[e._v("#")]),e._v(" 3.3.2. "),i("code",[e._v("PUT")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/stop-words")])]),e._v(" "),i("p",[e._v("Modify the "),i("code",[e._v("stopWords")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-2-1-request-payload-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-1-request-payload-definition"}},[e._v("#")]),e._v(" 3.3.2.1. Request Payload Definition")]),e._v(" "),i("ul",[i("li",[e._v("Type: Array of String / "),i("code",[e._v("null")])])]),e._v(" "),i("p",[e._v("Setting "),i("code",[e._v("null")]),e._v(" is equivalent to using the "),i("a",{attrs:{href:"#333-delete---indexesindexuidsettingsstop-words"}},[e._v("3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/stop-words")])]),e._v(" API endpoint.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-2-2-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-2-response-definition"}},[e._v("#")]),e._v(" 3.3.2.2. Response Definition")]),e._v(" "),i("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),i("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),i("code",[e._v("task")]),e._v(" Object for "),i("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),i("h5",{attrs:{id:"_3-3-2-3-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-errors"}},[e._v("#")]),e._v(" 3.3.2.3. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Omitting Content-Type header returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an empty Content-Type returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a different Content-Type than "),i("code",[e._v("application/json")]),e._v(" returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an empty payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an invalid JSON payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a request payload value type different of "),i("code",[e._v("Array of String")]),e._v(", "),i("code",[e._v("[]")]),e._v(", or "),i("code",[e._v("null")]),e._v(" returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_stop_words"}},[e._v("invalid_settings_stop_words")]),e._v(" error.")],1)]),e._v(" "),i("h6",{attrs:{id:"_3-3-2-3-1-async-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-1-async-errors"}},[e._v("#")]),e._v(" 3.3.2.3.1. Async Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 When Meilisearch is secured, if the API Key do not have the "),i("code",[e._v("indexes.create")]),e._v(" action defined, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related asynchronous "),i("code",[e._v("task")]),e._v(" resource. See "),i("a",{attrs:{href:"#3222-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")],1)]),e._v(" "),i("blockquote",[i("p",[e._v("Otherwise, Meilisearch will create the index in a lazy way. See "),i("a",{attrs:{href:"#3224-lazy-index-creation"}},[e._v("3.2.2.4. Lazy Index Creation")]),e._v(".")])]),e._v(" "),i("h5",{attrs:{id:"_3-3-2-4-lazy-index-creation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-4-lazy-index-creation"}},[e._v("#")]),e._v(" 3.3.2.4. Lazy Index Creation")]),e._v(" "),i("p",[e._v("If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, and the authorization layer allows it (See "),i("a",{attrs:{href:"#33231-async-errors"}},[e._v("3.3.2.3.1. Async Errors")]),e._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),i("a",{attrs:{href:"#3322-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")]),e._v(" "),i("h4",{attrs:{id:"_3-3-3-delete-indexes-index-uid-settings-stop-words"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-delete-indexes-index-uid-settings-stop-words"}},[e._v("#")]),e._v(" 3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/stop-words")])]),e._v(" "),i("p",[e._v("Reset the "),i("code",[e._v("stopWords")]),e._v(" setting of a Meilisearch index to the default value "),i("code",[e._v("[]")]),e._v(".")]),e._v(" "),i("h5",{attrs:{id:"_3-3-3-1-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-1-response-definition"}},[e._v("#")]),e._v(" 3.3.3.1. Response Definition")]),e._v(" "),i("p",[e._v("When the request is in a successful state, Meilisearch returns the HTTP code "),i("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),i("code",[e._v("task")]),e._v(" Object for "),i("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),i("h5",{attrs:{id:"_3-3-3-3-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-errors"}},[e._v("#")]),e._v(" 3.3.3.3. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1)]),e._v(" "),i("h6",{attrs:{id:"_3-3-3-3-1-asynchronous-index-not-found-error"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-1-asynchronous-index-not-found-error"}},[e._v("#")]),e._v(" 3.3.3.3.1. Asynchronous Index Not Found Error")]),e._v(" "),i("ul",[i("li",[e._v("🔴 If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related async "),i("code",[e._v("task")]),e._v(" resource. See "),i("a",{attrs:{href:"#3331-response-definition"}},[e._v("3.3.3.1. Response Definition")]),e._v(".")],1)]),e._v(" "),i("h4",{attrs:{id:"_3-3-4-general-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-general-errors"}},[e._v("#")]),e._v(" 3.3.4. General Errors")]),e._v(" "),i("p",[e._v("These errors apply to all endpoints described here.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-4-1-auth-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-1-auth-errors"}},[e._v("#")]),e._v(" 3.3.4.1 Auth Errors")]),e._v(" "),i("p",[e._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Accessing this route without the "),i("code",[e._v("Authorization")]),e._v(" header returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),i("h2",{attrs:{id:"_4-technical-details"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[e._v("#")]),e._v(" 4. Technical Details")]),e._v(" "),i("h3",{attrs:{id:"_4-1-triggering-documents-re-indexing"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-triggering-documents-re-indexing"}},[e._v("#")]),e._v(" 4.1. Triggering Documents Re-Indexing")]),e._v(" "),i("p",[e._v("Meilisearch favors search speed and makes a trade-off on indexing speed by computing internal data structures to get search results as fast as possible.")]),e._v(" "),i("p",[e._v("Modifying this index setting cause documents to be re-indexed.")]),e._v(" "),i("h2",{attrs:{id:"_5-future-possibilities"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),i("p",[e._v("n/a")])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[46],{470:function(e,t,i){"use strict";i.r(t);var s=i(62),r=Object(s.a)({},(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[i("h1",{attrs:{id:"stop-words-setting-api"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#stop-words-setting-api"}},[e._v("#")]),e._v(" Stop Words Setting API")]),e._v(" "),i("h2",{attrs:{id:"_1-summary"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),i("p",[e._v("This specification describes the "),i("code",[e._v("stopWords")]),e._v(" index setting API endpoints.")]),e._v(" "),i("h2",{attrs:{id:"_2-motivation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),i("p",[e._v("N/A")]),e._v(" "),i("h2",{attrs:{id:"_3-functional-specification"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),i("h3",{attrs:{id:"_3-1-explanations"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-explanations"}},[e._v("#")]),e._v(" 3.1. Explanations")]),e._v(" "),i("p",[e._v("The "),i("code",[e._v("stopWords")]),e._v(" index setting allows the configuration of a list of words to be ignored in search queries. The stop words contained in a search query will be ignored by the engine when matching and ranking search results.")]),e._v(" "),i("h4",{attrs:{id:"_3-1-1-usage-example"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-usage-example"}},[e._v("#")]),e._v(" 3.1.1. Usage Example")]),e._v(" "),i("p",[e._v("Suppose a database contains articles written in English. Countless occurrences of "),i("code",[e._v("the")]),e._v(" and "),i("code",[e._v("of")]),e._v(" could deteriorate the relevancy of search results. To set "),i("code",[e._v("the")]),e._v(" and "),i("code",[e._v("of")]),e._v(" words as stop words, it can be specified the following way.")]),e._v(" "),i("p",[i("em",[i("strong",[e._v("Request payload "),i("code",[e._v("PUT")]),e._v("- "),i("code",[e._v("/indexes/articles/settings/stop-words")])])])]),e._v(" "),i("div",{staticClass:"language-json extra-class"},[i("pre",{pre:!0,attrs:{class:"language-json"}},[i("code",[i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"the"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"of"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),i("p",[e._v("By adding common English words such as "),i("code",[e._v("the")]),e._v(" or "),i("code",[e._v("of")]),e._v(" to the stop-words list, Meilisearch will not take them into consideration when calculating how relevant a result is.")]),e._v(" "),i("h3",{attrs:{id:"_3-2-global-settings-api-endpoints-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-global-settings-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2. Global Settings API Endpoints Definition")]),e._v(" "),i("p",[i("code",[e._v("stopWords")]),e._v(" is a sub-resource of "),i("code",[e._v("/indexes/:index_uid/settings")]),e._v(".")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html"}},[e._v("Settings API")]),e._v(".")],1),e._v(" "),i("h3",{attrs:{id:"_3-3-api-endpoints-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.3. API Endpoints Definition")]),e._v(" "),i("p",[e._v("Manipulate the "),i("code",[e._v("stopWords")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h4",{attrs:{id:"_3-3-1-get-indexes-index-uid-settings-stop-words"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get-indexes-index-uid-settings-stop-words"}},[e._v("#")]),e._v(" 3.3.1. "),i("code",[e._v("GET")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/stop-words")])]),e._v(" "),i("p",[e._v("Fetch the "),i("code",[e._v("stopWords")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-1-1-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-response-definition"}},[e._v("#")]),e._v(" 3.3.1.1. Response Definition")]),e._v(" "),i("ul",[i("li",[e._v("Type: Array of String")]),e._v(" "),i("li",[e._v("Default: "),i("code",[e._v("[]")])])]),e._v(" "),i("h5",{attrs:{id:"_3-3-1-2-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-2-errors"}},[e._v("#")]),e._v(" 3.3.1.2. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),i("h4",{attrs:{id:"_3-3-2-put-indexes-index-uid-settings-stop-words"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-put-indexes-index-uid-settings-stop-words"}},[e._v("#")]),e._v(" 3.3.2. "),i("code",[e._v("PUT")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/stop-words")])]),e._v(" "),i("p",[e._v("Modify the "),i("code",[e._v("stopWords")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-2-1-request-payload-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-1-request-payload-definition"}},[e._v("#")]),e._v(" 3.3.2.1. Request Payload Definition")]),e._v(" "),i("ul",[i("li",[e._v("Type: Array of String / "),i("code",[e._v("null")])])]),e._v(" "),i("p",[e._v("Setting "),i("code",[e._v("null")]),e._v(" is equivalent to using the "),i("a",{attrs:{href:"#333-delete---indexesindexuidsettingsstop-words"}},[e._v("3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/stop-words")])]),e._v(" API endpoint.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-2-2-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-2-response-definition"}},[e._v("#")]),e._v(" 3.3.2.2. Response Definition")]),e._v(" "),i("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),i("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),i("code",[e._v("task")]),e._v(" Object for "),i("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),i("h5",{attrs:{id:"_3-3-2-3-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-errors"}},[e._v("#")]),e._v(" 3.3.2.3. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Omitting Content-Type header returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an empty Content-Type returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a different Content-Type than "),i("code",[e._v("application/json")]),e._v(" returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an empty payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an invalid JSON payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a request payload value type different of "),i("code",[e._v("Array of String")]),e._v(", "),i("code",[e._v("[]")]),e._v(", or "),i("code",[e._v("null")]),e._v(" returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_stop_words"}},[e._v("invalid_settings_stop_words")]),e._v(" error.")],1)]),e._v(" "),i("h6",{attrs:{id:"_3-3-2-3-1-async-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-1-async-errors"}},[e._v("#")]),e._v(" 3.3.2.3.1. Async Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 When Meilisearch is secured, if the API Key do not have the "),i("code",[e._v("indexes.create")]),e._v(" action defined, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related asynchronous "),i("code",[e._v("task")]),e._v(" resource. See "),i("a",{attrs:{href:"#3222-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")],1)]),e._v(" "),i("blockquote",[i("p",[e._v("Otherwise, Meilisearch will create the index in a lazy way. See "),i("a",{attrs:{href:"#3224-lazy-index-creation"}},[e._v("3.2.2.4. Lazy Index Creation")]),e._v(".")])]),e._v(" "),i("h5",{attrs:{id:"_3-3-2-4-lazy-index-creation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-4-lazy-index-creation"}},[e._v("#")]),e._v(" 3.3.2.4. Lazy Index Creation")]),e._v(" "),i("p",[e._v("If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, and the authorization layer allows it (See "),i("a",{attrs:{href:"#33231-async-errors"}},[e._v("3.3.2.3.1. Async Errors")]),e._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),i("a",{attrs:{href:"#3322-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")]),e._v(" "),i("h4",{attrs:{id:"_3-3-3-delete-indexes-index-uid-settings-stop-words"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-delete-indexes-index-uid-settings-stop-words"}},[e._v("#")]),e._v(" 3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/stop-words")])]),e._v(" "),i("p",[e._v("Reset the "),i("code",[e._v("stopWords")]),e._v(" setting of a Meilisearch index to the default value "),i("code",[e._v("[]")]),e._v(".")]),e._v(" "),i("h5",{attrs:{id:"_3-3-3-1-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-1-response-definition"}},[e._v("#")]),e._v(" 3.3.3.1. Response Definition")]),e._v(" "),i("p",[e._v("When the request is in a successful state, Meilisearch returns the HTTP code "),i("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),i("code",[e._v("task")]),e._v(" Object for "),i("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),i("h5",{attrs:{id:"_3-3-3-3-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-errors"}},[e._v("#")]),e._v(" 3.3.3.3. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1)]),e._v(" "),i("h6",{attrs:{id:"_3-3-3-3-1-asynchronous-index-not-found-error"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-1-asynchronous-index-not-found-error"}},[e._v("#")]),e._v(" 3.3.3.3.1. Asynchronous Index Not Found Error")]),e._v(" "),i("ul",[i("li",[e._v("🔴 If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related async "),i("code",[e._v("task")]),e._v(" resource. See "),i("a",{attrs:{href:"#3331-response-definition"}},[e._v("3.3.3.1. Response Definition")]),e._v(".")],1)]),e._v(" "),i("h4",{attrs:{id:"_3-3-4-general-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-general-errors"}},[e._v("#")]),e._v(" 3.3.4. General Errors")]),e._v(" "),i("p",[e._v("These errors apply to all endpoints described here.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-4-1-auth-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-1-auth-errors"}},[e._v("#")]),e._v(" 3.3.4.1 Auth Errors")]),e._v(" "),i("p",[e._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Accessing this route without the "),i("code",[e._v("Authorization")]),e._v(" header returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),i("h2",{attrs:{id:"_4-technical-details"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[e._v("#")]),e._v(" 4. Technical Details")]),e._v(" "),i("h3",{attrs:{id:"_4-1-triggering-documents-re-indexing"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-triggering-documents-re-indexing"}},[e._v("#")]),e._v(" 4.1. Triggering Documents Re-Indexing")]),e._v(" "),i("p",[e._v("Meilisearch favors search speed and makes a trade-off on indexing speed by computing internal data structures to get search results as fast as possible.")]),e._v(" "),i("p",[e._v("Modifying this index setting cause documents to be re-indexed.")]),e._v(" "),i("h2",{attrs:{id:"_5-future-possibilities"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),i("p",[e._v("n/a")])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/47.49c151b7.js b/docs/assets/js/47.bf881f32.js similarity index 99% rename from docs/assets/js/47.49c151b7.js rename to docs/assets/js/47.bf881f32.js index a74234fa2..a692af2d4 100644 --- a/docs/assets/js/47.49c151b7.js +++ b/docs/assets/js/47.bf881f32.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[47],{470:function(e,t,s){"use strict";s.r(t);var n=s(62),a=Object(n.a)({},(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[s("h1",{attrs:{id:"synonyms-setting-api"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#synonyms-setting-api"}},[e._v("#")]),e._v(" Synonyms Setting API")]),e._v(" "),s("h2",{attrs:{id:"_1-summary"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),s("p",[e._v("This specification describes the "),s("code",[e._v("synonyms")]),e._v(" index setting API endpoints.")]),e._v(" "),s("h2",{attrs:{id:"_2-motivation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),s("p",[e._v("N/A")]),e._v(" "),s("h2",{attrs:{id:"_3-functional-specification"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),s("h3",{attrs:{id:"_3-1-explanations"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-explanations"}},[e._v("#")]),e._v(" 3.1. Explanations")]),e._v(" "),s("p",[e._v("If multiple words have an equivalent meaning in a dataset, specifying a list of synonyms will make search results more relevant.")]),e._v(" "),s("p",[e._v("In general, a search on a word will return the same results as a search on any of its synonyms. There is one exception to this rule. See "),s("a",{attrs:{href:"#42-multi-word-phrases"}},[e._v("4.2. Multi-word Phrases")]),e._v(" section.")]),e._v(" "),s("p",[e._v("All synonyms are lowercased and de-unicoded during the indexing process. See "),s("a",{attrs:{href:"#41-normalization"}},[e._v("4.1. Normalization")]),e._v(" section.")]),e._v(" "),s("h4",{attrs:{id:"_3-1-1-usage-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-usage-examples"}},[e._v("#")]),e._v(" 3.1.1. Usage Examples")]),e._v(" "),s("p",[e._v("Meilisearch supports two types of synonym declarations.")]),e._v(" "),s("h5",{attrs:{id:"_3-1-1-1-one-way-association"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-one-way-association"}},[e._v("#")]),e._v(" 3.1.1.1. One-way Association")]),e._v(" "),s("p",[e._v("One-way association permits to declare one word to be synonymous with another, but not the other way around.")]),e._v(" "),s("p",[s("em",[s("strong",[e._v("Request payload "),s("code",[e._v("PUT")]),e._v("- "),s("code",[e._v("/indexes/proucts/settings/synonyms")])])])]),e._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[e._v('"phone"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"iphone"')]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),s("p",[e._v("In this case, a search for "),s("code",[e._v("phone")]),e._v(" will return documents containing "),s("code",[e._v("iphone")]),e._v(" as if they contained the word "),s("code",[e._v("phone")]),e._v(".")]),e._v(" "),s("p",[e._v("However, in the case of a search for "),s("code",[e._v("iphone")]),e._v(", documents containing "),s("code",[e._v("phone")]),e._v(" will be ranked lower in the results due to the "),s("code",[e._v("typo")]),e._v(" ranking rule.")]),e._v(" "),s("h5",{attrs:{id:"_3-1-1-2-mutual-association"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-mutual-association"}},[e._v("#")]),e._v(" 3.1.1.2. Mutual Association")]),e._v(" "),s("p",[e._v("By associating one or more synonyms with each other, they will be considered the same in both directions.")]),e._v(" "),s("p",[s("em",[s("strong",[e._v("Request payload "),s("code",[e._v("PUT")]),e._v("- "),s("code",[e._v("/indexes/proucts/settings/synonyms")])])])]),e._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[e._v('"shoe"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"boot"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"slipper"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"sneakers"')]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[e._v('"boot"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"shoe"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"slipper"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"sneakers"')]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[e._v('"slipper"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"shoe"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"boot"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"sneakers"')]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[e._v('"sneakers"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"shoe"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"boot"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"slipper"')]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),s("p",[e._v("When a search is done with one of these words, all synonyms will be considered as the same word and will appear in the search results.")]),e._v(" "),s("h3",{attrs:{id:"_3-2-global-settings-api-endpoints-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-global-settings-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2. Global Settings API Endpoints Definition")]),e._v(" "),s("p",[s("code",[e._v("synonyms")]),e._v(" is a sub-resource of "),s("code",[e._v("/indexes/:index_uid/settings")]),e._v(".")]),e._v(" "),s("p",[e._v("See "),s("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html"}},[e._v("Settings API")]),e._v(".")],1),e._v(" "),s("h3",{attrs:{id:"_3-3-api-endpoints-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.3. API Endpoints Definition")]),e._v(" "),s("p",[e._v("Manipulate the "),s("code",[e._v("synonyms")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),s("h4",{attrs:{id:"_3-3-1-get-indexes-index-uid-settings-synonyms"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get-indexes-index-uid-settings-synonyms"}},[e._v("#")]),e._v(" 3.3.1. "),s("code",[e._v("GET")]),e._v(" - "),s("code",[e._v("indexes/:index_uid/settings/synonyms")])]),e._v(" "),s("p",[e._v("Fetch the "),s("code",[e._v("synonyms")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),s("h5",{attrs:{id:"_3-3-1-1-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-response-definition"}},[e._v("#")]),e._v(" 3.3.1.1. Response Definition")]),e._v(" "),s("ul",[s("li",[e._v("Type: Object")]),e._v(" "),s("li",[e._v("Default: "),s("code",[e._v("{}")])])]),e._v(" "),s("h5",{attrs:{id:"_3-3-1-2-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-2-errors"}},[e._v("#")]),e._v(" 3.3.1.2. Errors")]),e._v(" "),s("ul",[s("li",[e._v("🔴 Sending an invalid index uid format for the "),s("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),s("li",[e._v("🔴 If the requested "),s("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),s("h4",{attrs:{id:"_3-3-2-put-indexes-index-uid-settings-synonyms"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-put-indexes-index-uid-settings-synonyms"}},[e._v("#")]),e._v(" 3.3.2. "),s("code",[e._v("PUT")]),e._v(" - "),s("code",[e._v("indexes/:index_uid/settings/synonyms")])]),e._v(" "),s("p",[e._v("Modify the "),s("code",[e._v("synonyms")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),s("h5",{attrs:{id:"_3-3-2-1-request-payload-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-1-request-payload-definition"}},[e._v("#")]),e._v(" 3.3.2.1. Request Payload Definition")]),e._v(" "),s("ul",[s("li",[e._v("Type: Object / "),s("code",[e._v("null")])])]),e._v(" "),s("p",[e._v("Setting "),s("code",[e._v("null")]),e._v(" is equivalent to using the "),s("a",{attrs:{href:"#333-delete---indexesindexuidsettingssynonyms"}},[e._v("3.3.3. "),s("code",[e._v("DELETE")]),e._v(" - "),s("code",[e._v("indexes/:index_uid/settings/synonyms")])]),e._v(" API endpoint.")]),e._v(" "),s("h5",{attrs:{id:"_3-3-2-2-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-2-response-definition"}},[e._v("#")]),e._v(" 3.3.2.2. Response Definition")]),e._v(" "),s("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),s("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),s("p",[e._v("See "),s("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),s("code",[e._v("task")]),e._v(" Object for "),s("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),s("h5",{attrs:{id:"_3-3-2-3-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-errors"}},[e._v("#")]),e._v(" 3.3.2.3. Errors")]),e._v(" "),s("ul",[s("li",[e._v("🔴 Omitting Content-Type header returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),s("li",[e._v("🔴 Sending an empty Content-Type returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),s("li",[e._v("🔴 Sending a different Content-Type than "),s("code",[e._v("application/json")]),e._v(" returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),s("li",[e._v("🔴 Sending an empty payload returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),s("li",[e._v("🔴 Sending an invalid JSON payload returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),s("li",[e._v("🔴 Sending an invalid index uid format for the "),s("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),s("li",[e._v("🔴 Sending a request payload value type different of "),s("code",[e._v("Object")]),e._v(", or "),s("code",[e._v("null")]),e._v(" returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_synonyms"}},[e._v("invalid_settings_synonyms")]),e._v(" error.")],1)]),e._v(" "),s("h6",{attrs:{id:"_3-3-2-3-1-async-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-1-async-errors"}},[e._v("#")]),e._v(" 3.3.2.3.1. Async Errors")]),e._v(" "),s("ul",[s("li",[e._v("🔴 When Meilisearch is secured, if the API Key do not have the "),s("code",[e._v("indexes.create")]),e._v(" action defined, the API returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related asynchronous "),s("code",[e._v("task")]),e._v(" resource. See "),s("a",{attrs:{href:"#3222-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")],1)]),e._v(" "),s("blockquote",[s("p",[e._v("Otherwise, Meilisearch will create the index in a lazy way. See "),s("a",{attrs:{href:"#3224-lazy-index-creation"}},[e._v("3.2.2.4. Lazy Index Creation")]),e._v(".")])]),e._v(" "),s("h5",{attrs:{id:"_3-3-2-4-lazy-index-creation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-4-lazy-index-creation"}},[e._v("#")]),e._v(" 3.3.2.4. Lazy Index Creation")]),e._v(" "),s("p",[e._v("If the requested "),s("code",[e._v("index_uid")]),e._v(" does not exist, and the authorization layer allows it (See "),s("a",{attrs:{href:"#33231-async-errors"}},[e._v("3.3.2.3.1. Async Errors")]),e._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),s("a",{attrs:{href:"#3322-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")]),e._v(" "),s("h4",{attrs:{id:"_3-3-3-delete-indexes-index-uid-settings-synonyms"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-delete-indexes-index-uid-settings-synonyms"}},[e._v("#")]),e._v(" 3.3.3. "),s("code",[e._v("DELETE")]),e._v(" - "),s("code",[e._v("indexes/:index_uid/settings/synonyms")])]),e._v(" "),s("p",[e._v("Reset the "),s("code",[e._v("synonyms")]),e._v(" setting of a Meilisearch index to the default value "),s("code",[e._v("{}")]),e._v(".")]),e._v(" "),s("h5",{attrs:{id:"_3-3-3-1-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-1-response-definition"}},[e._v("#")]),e._v(" 3.3.3.1. Response Definition")]),e._v(" "),s("p",[e._v("When the request is in a successful state, Meilisearch returns the HTTP code "),s("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),s("p",[e._v("See "),s("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),s("code",[e._v("task")]),e._v(" Object for "),s("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),s("h5",{attrs:{id:"_3-3-3-3-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-errors"}},[e._v("#")]),e._v(" 3.3.3.3. Errors")]),e._v(" "),s("ul",[s("li",[e._v("🔴 Sending an invalid index uid format for the "),s("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1)]),e._v(" "),s("h6",{attrs:{id:"_3-3-3-3-1-asynchronous-index-not-found-error"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-1-asynchronous-index-not-found-error"}},[e._v("#")]),e._v(" 3.3.3.3.1. Asynchronous Index Not Found Error")]),e._v(" "),s("ul",[s("li",[e._v("🔴 If the requested "),s("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related async "),s("code",[e._v("task")]),e._v(" resource. See "),s("a",{attrs:{href:"#3331-response-definition"}},[e._v("3.3.3.1. Response Definition")]),e._v(".")],1)]),e._v(" "),s("h4",{attrs:{id:"_3-3-4-general-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-general-errors"}},[e._v("#")]),e._v(" 3.3.4. General Errors")]),e._v(" "),s("p",[e._v("These errors apply to all endpoints described here.")]),e._v(" "),s("h5",{attrs:{id:"_3-3-4-1-auth-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-1-auth-errors"}},[e._v("#")]),e._v(" 3.3.4.1 Auth Errors")]),e._v(" "),s("p",[e._v("The auth layer can return the following errors if Meilisearch is secured (a master key is defined).")]),e._v(" "),s("ul",[s("li",[e._v("🔴 Accessing this route without the "),s("code",[e._v("Authorization")]),e._v(" header returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),s("li",[e._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),s("h2",{attrs:{id:"_4-technical-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[e._v("#")]),e._v(" 4. Technical Details")]),e._v(" "),s("h3",{attrs:{id:"_4-1-normalization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-normalization"}},[e._v("#")]),e._v(" 4.1. Normalization")]),e._v(" "),s("p",[e._v("All synonyms are lowercased and de-unicoded during the indexing process.")]),e._v(" "),s("h3",{attrs:{id:"_4-1-1-example"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-1-example"}},[e._v("#")]),e._v(" 4.1.1. Example")]),e._v(" "),s("p",[e._v("Consider a situation where "),s("code",[e._v("Résumé")]),e._v(" and "),s("code",[e._v("CV")]),e._v(" are set as synonyms.")]),e._v(" "),s("p",[s("em",[s("strong",[e._v("Request payload "),s("code",[e._v("GET")]),e._v("- "),s("code",[e._v("/indexes/jobs/settings/synonyms")])])])]),e._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[e._v('"Résumé"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"CV"')]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[e._v('"CV"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Résumé"')]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),s("p",[e._v("A search for "),s("code",[e._v("cv")]),e._v(" would return any documents containing "),s("code",[e._v("cv")]),e._v(" or "),s("code",[e._v("CV")]),e._v(", in addition to any that contain "),s("code",[e._v("Résumé")]),e._v(", "),s("code",[e._v("resumé")]),e._v(", "),s("code",[e._v("resume")]),e._v(", etc. unaffected by case or accent marks.")]),e._v(" "),s("h3",{attrs:{id:"_4-2-multi-word-phrases"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-multi-word-phrases"}},[e._v("#")]),e._v(" 4.2. Multi-word Phrases")]),e._v(" "),s("p",[e._v("Multi-word phrases are treated differently than associations between individual words.")]),e._v(" "),s("p",[e._v("When a multi-word phrase is considered the synonym of another word or phrase, the exact search query will always take precedence over its synonym(s).")]),e._v(" "),s("h4",{attrs:{id:"_4-2-1-example"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-1-example"}},[e._v("#")]),e._v(" 4.2.1. Example")]),e._v(" "),s("p",[e._v("Suppose "),s("code",[e._v("San Francisco")]),e._v(" and "),s("code",[e._v("SF")]),e._v(" as synonyms with a mutual association")]),e._v(" "),s("p",[s("em",[s("strong",[e._v("Request payload "),s("code",[e._v("GET")]),e._v("- "),s("code",[e._v("/indexes/jobs/settings/synonyms")])])])]),e._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[e._v('"San Francisco"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"SF"')]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[e._v('"SF"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"San Francisco"')]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),s("p",[e._v("In this case, a search for "),s("code",[e._v("SF")]),e._v(", results containing "),s("code",[e._v("San Francisco")]),e._v(" will also be returned. However, they will be considered less relevant than those containing "),s("code",[e._v("SF")]),e._v(". The reverse is also true.")]),e._v(" "),s("h3",{attrs:{id:"_4-3-three-words-limitation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-3-three-words-limitation"}},[e._v("#")]),e._v(" 4.3. Three Words Limitation")]),e._v(" "),s("p",[e._v("Multi-word synonyms are limited to a maximum of three words.")]),e._v(" "),s("p",[e._v("For example, although "),s("code",[e._v("League of Legends")]),e._v(" and "),s("code",[e._v("LOL")]),e._v(" can be synonymous, it will not work for "),s("code",[e._v("The Lord of the Rings")]),e._v(" and "),s("code",[e._v("LOTR")]),e._v(".")]),e._v(" "),s("h2",{attrs:{id:"_5-future-possibilities"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),s("ul",[s("li",[e._v("Automatically declare mutual association")])])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[47],{471:function(e,t,s){"use strict";s.r(t);var n=s(62),a=Object(n.a)({},(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[s("h1",{attrs:{id:"synonyms-setting-api"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#synonyms-setting-api"}},[e._v("#")]),e._v(" Synonyms Setting API")]),e._v(" "),s("h2",{attrs:{id:"_1-summary"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),s("p",[e._v("This specification describes the "),s("code",[e._v("synonyms")]),e._v(" index setting API endpoints.")]),e._v(" "),s("h2",{attrs:{id:"_2-motivation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),s("p",[e._v("N/A")]),e._v(" "),s("h2",{attrs:{id:"_3-functional-specification"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),s("h3",{attrs:{id:"_3-1-explanations"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-explanations"}},[e._v("#")]),e._v(" 3.1. Explanations")]),e._v(" "),s("p",[e._v("If multiple words have an equivalent meaning in a dataset, specifying a list of synonyms will make search results more relevant.")]),e._v(" "),s("p",[e._v("In general, a search on a word will return the same results as a search on any of its synonyms. There is one exception to this rule. See "),s("a",{attrs:{href:"#42-multi-word-phrases"}},[e._v("4.2. Multi-word Phrases")]),e._v(" section.")]),e._v(" "),s("p",[e._v("All synonyms are lowercased and de-unicoded during the indexing process. See "),s("a",{attrs:{href:"#41-normalization"}},[e._v("4.1. Normalization")]),e._v(" section.")]),e._v(" "),s("h4",{attrs:{id:"_3-1-1-usage-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-usage-examples"}},[e._v("#")]),e._v(" 3.1.1. Usage Examples")]),e._v(" "),s("p",[e._v("Meilisearch supports two types of synonym declarations.")]),e._v(" "),s("h5",{attrs:{id:"_3-1-1-1-one-way-association"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-one-way-association"}},[e._v("#")]),e._v(" 3.1.1.1. One-way Association")]),e._v(" "),s("p",[e._v("One-way association permits to declare one word to be synonymous with another, but not the other way around.")]),e._v(" "),s("p",[s("em",[s("strong",[e._v("Request payload "),s("code",[e._v("PUT")]),e._v("- "),s("code",[e._v("/indexes/proucts/settings/synonyms")])])])]),e._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[e._v('"phone"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"iphone"')]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),s("p",[e._v("In this case, a search for "),s("code",[e._v("phone")]),e._v(" will return documents containing "),s("code",[e._v("iphone")]),e._v(" as if they contained the word "),s("code",[e._v("phone")]),e._v(".")]),e._v(" "),s("p",[e._v("However, in the case of a search for "),s("code",[e._v("iphone")]),e._v(", documents containing "),s("code",[e._v("phone")]),e._v(" will be ranked lower in the results due to the "),s("code",[e._v("typo")]),e._v(" ranking rule.")]),e._v(" "),s("h5",{attrs:{id:"_3-1-1-2-mutual-association"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-mutual-association"}},[e._v("#")]),e._v(" 3.1.1.2. Mutual Association")]),e._v(" "),s("p",[e._v("By associating one or more synonyms with each other, they will be considered the same in both directions.")]),e._v(" "),s("p",[s("em",[s("strong",[e._v("Request payload "),s("code",[e._v("PUT")]),e._v("- "),s("code",[e._v("/indexes/proucts/settings/synonyms")])])])]),e._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[e._v('"shoe"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"boot"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"slipper"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"sneakers"')]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[e._v('"boot"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"shoe"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"slipper"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"sneakers"')]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[e._v('"slipper"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"shoe"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"boot"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"sneakers"')]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[e._v('"sneakers"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"shoe"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"boot"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"slipper"')]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),s("p",[e._v("When a search is done with one of these words, all synonyms will be considered as the same word and will appear in the search results.")]),e._v(" "),s("h3",{attrs:{id:"_3-2-global-settings-api-endpoints-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-global-settings-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2. Global Settings API Endpoints Definition")]),e._v(" "),s("p",[s("code",[e._v("synonyms")]),e._v(" is a sub-resource of "),s("code",[e._v("/indexes/:index_uid/settings")]),e._v(".")]),e._v(" "),s("p",[e._v("See "),s("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html"}},[e._v("Settings API")]),e._v(".")],1),e._v(" "),s("h3",{attrs:{id:"_3-3-api-endpoints-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.3. API Endpoints Definition")]),e._v(" "),s("p",[e._v("Manipulate the "),s("code",[e._v("synonyms")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),s("h4",{attrs:{id:"_3-3-1-get-indexes-index-uid-settings-synonyms"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get-indexes-index-uid-settings-synonyms"}},[e._v("#")]),e._v(" 3.3.1. "),s("code",[e._v("GET")]),e._v(" - "),s("code",[e._v("indexes/:index_uid/settings/synonyms")])]),e._v(" "),s("p",[e._v("Fetch the "),s("code",[e._v("synonyms")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),s("h5",{attrs:{id:"_3-3-1-1-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-response-definition"}},[e._v("#")]),e._v(" 3.3.1.1. Response Definition")]),e._v(" "),s("ul",[s("li",[e._v("Type: Object")]),e._v(" "),s("li",[e._v("Default: "),s("code",[e._v("{}")])])]),e._v(" "),s("h5",{attrs:{id:"_3-3-1-2-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-2-errors"}},[e._v("#")]),e._v(" 3.3.1.2. Errors")]),e._v(" "),s("ul",[s("li",[e._v("🔴 Sending an invalid index uid format for the "),s("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),s("li",[e._v("🔴 If the requested "),s("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),s("h4",{attrs:{id:"_3-3-2-put-indexes-index-uid-settings-synonyms"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-put-indexes-index-uid-settings-synonyms"}},[e._v("#")]),e._v(" 3.3.2. "),s("code",[e._v("PUT")]),e._v(" - "),s("code",[e._v("indexes/:index_uid/settings/synonyms")])]),e._v(" "),s("p",[e._v("Modify the "),s("code",[e._v("synonyms")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),s("h5",{attrs:{id:"_3-3-2-1-request-payload-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-1-request-payload-definition"}},[e._v("#")]),e._v(" 3.3.2.1. Request Payload Definition")]),e._v(" "),s("ul",[s("li",[e._v("Type: Object / "),s("code",[e._v("null")])])]),e._v(" "),s("p",[e._v("Setting "),s("code",[e._v("null")]),e._v(" is equivalent to using the "),s("a",{attrs:{href:"#333-delete---indexesindexuidsettingssynonyms"}},[e._v("3.3.3. "),s("code",[e._v("DELETE")]),e._v(" - "),s("code",[e._v("indexes/:index_uid/settings/synonyms")])]),e._v(" API endpoint.")]),e._v(" "),s("h5",{attrs:{id:"_3-3-2-2-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-2-response-definition"}},[e._v("#")]),e._v(" 3.3.2.2. Response Definition")]),e._v(" "),s("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),s("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),s("p",[e._v("See "),s("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),s("code",[e._v("task")]),e._v(" Object for "),s("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),s("h5",{attrs:{id:"_3-3-2-3-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-errors"}},[e._v("#")]),e._v(" 3.3.2.3. Errors")]),e._v(" "),s("ul",[s("li",[e._v("🔴 Omitting Content-Type header returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),s("li",[e._v("🔴 Sending an empty Content-Type returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),s("li",[e._v("🔴 Sending a different Content-Type than "),s("code",[e._v("application/json")]),e._v(" returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),s("li",[e._v("🔴 Sending an empty payload returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),s("li",[e._v("🔴 Sending an invalid JSON payload returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),s("li",[e._v("🔴 Sending an invalid index uid format for the "),s("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),s("li",[e._v("🔴 Sending a request payload value type different of "),s("code",[e._v("Object")]),e._v(", or "),s("code",[e._v("null")]),e._v(" returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_synonyms"}},[e._v("invalid_settings_synonyms")]),e._v(" error.")],1)]),e._v(" "),s("h6",{attrs:{id:"_3-3-2-3-1-async-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-1-async-errors"}},[e._v("#")]),e._v(" 3.3.2.3.1. Async Errors")]),e._v(" "),s("ul",[s("li",[e._v("🔴 When Meilisearch is secured, if the API Key do not have the "),s("code",[e._v("indexes.create")]),e._v(" action defined, the API returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related asynchronous "),s("code",[e._v("task")]),e._v(" resource. See "),s("a",{attrs:{href:"#3222-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")],1)]),e._v(" "),s("blockquote",[s("p",[e._v("Otherwise, Meilisearch will create the index in a lazy way. See "),s("a",{attrs:{href:"#3224-lazy-index-creation"}},[e._v("3.2.2.4. Lazy Index Creation")]),e._v(".")])]),e._v(" "),s("h5",{attrs:{id:"_3-3-2-4-lazy-index-creation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-4-lazy-index-creation"}},[e._v("#")]),e._v(" 3.3.2.4. Lazy Index Creation")]),e._v(" "),s("p",[e._v("If the requested "),s("code",[e._v("index_uid")]),e._v(" does not exist, and the authorization layer allows it (See "),s("a",{attrs:{href:"#33231-async-errors"}},[e._v("3.3.2.3.1. Async Errors")]),e._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),s("a",{attrs:{href:"#3322-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")]),e._v(" "),s("h4",{attrs:{id:"_3-3-3-delete-indexes-index-uid-settings-synonyms"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-delete-indexes-index-uid-settings-synonyms"}},[e._v("#")]),e._v(" 3.3.3. "),s("code",[e._v("DELETE")]),e._v(" - "),s("code",[e._v("indexes/:index_uid/settings/synonyms")])]),e._v(" "),s("p",[e._v("Reset the "),s("code",[e._v("synonyms")]),e._v(" setting of a Meilisearch index to the default value "),s("code",[e._v("{}")]),e._v(".")]),e._v(" "),s("h5",{attrs:{id:"_3-3-3-1-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-1-response-definition"}},[e._v("#")]),e._v(" 3.3.3.1. Response Definition")]),e._v(" "),s("p",[e._v("When the request is in a successful state, Meilisearch returns the HTTP code "),s("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),s("p",[e._v("See "),s("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),s("code",[e._v("task")]),e._v(" Object for "),s("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),s("h5",{attrs:{id:"_3-3-3-3-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-errors"}},[e._v("#")]),e._v(" 3.3.3.3. Errors")]),e._v(" "),s("ul",[s("li",[e._v("🔴 Sending an invalid index uid format for the "),s("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1)]),e._v(" "),s("h6",{attrs:{id:"_3-3-3-3-1-asynchronous-index-not-found-error"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-1-asynchronous-index-not-found-error"}},[e._v("#")]),e._v(" 3.3.3.3.1. Asynchronous Index Not Found Error")]),e._v(" "),s("ul",[s("li",[e._v("🔴 If the requested "),s("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related async "),s("code",[e._v("task")]),e._v(" resource. See "),s("a",{attrs:{href:"#3331-response-definition"}},[e._v("3.3.3.1. Response Definition")]),e._v(".")],1)]),e._v(" "),s("h4",{attrs:{id:"_3-3-4-general-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-general-errors"}},[e._v("#")]),e._v(" 3.3.4. General Errors")]),e._v(" "),s("p",[e._v("These errors apply to all endpoints described here.")]),e._v(" "),s("h5",{attrs:{id:"_3-3-4-1-auth-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-1-auth-errors"}},[e._v("#")]),e._v(" 3.3.4.1 Auth Errors")]),e._v(" "),s("p",[e._v("The auth layer can return the following errors if Meilisearch is secured (a master key is defined).")]),e._v(" "),s("ul",[s("li",[e._v("🔴 Accessing this route without the "),s("code",[e._v("Authorization")]),e._v(" header returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),s("li",[e._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),s("h2",{attrs:{id:"_4-technical-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[e._v("#")]),e._v(" 4. Technical Details")]),e._v(" "),s("h3",{attrs:{id:"_4-1-normalization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-normalization"}},[e._v("#")]),e._v(" 4.1. Normalization")]),e._v(" "),s("p",[e._v("All synonyms are lowercased and de-unicoded during the indexing process.")]),e._v(" "),s("h3",{attrs:{id:"_4-1-1-example"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-1-example"}},[e._v("#")]),e._v(" 4.1.1. Example")]),e._v(" "),s("p",[e._v("Consider a situation where "),s("code",[e._v("Résumé")]),e._v(" and "),s("code",[e._v("CV")]),e._v(" are set as synonyms.")]),e._v(" "),s("p",[s("em",[s("strong",[e._v("Request payload "),s("code",[e._v("GET")]),e._v("- "),s("code",[e._v("/indexes/jobs/settings/synonyms")])])])]),e._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[e._v('"Résumé"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"CV"')]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[e._v('"CV"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Résumé"')]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),s("p",[e._v("A search for "),s("code",[e._v("cv")]),e._v(" would return any documents containing "),s("code",[e._v("cv")]),e._v(" or "),s("code",[e._v("CV")]),e._v(", in addition to any that contain "),s("code",[e._v("Résumé")]),e._v(", "),s("code",[e._v("resumé")]),e._v(", "),s("code",[e._v("resume")]),e._v(", etc. unaffected by case or accent marks.")]),e._v(" "),s("h3",{attrs:{id:"_4-2-multi-word-phrases"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-multi-word-phrases"}},[e._v("#")]),e._v(" 4.2. Multi-word Phrases")]),e._v(" "),s("p",[e._v("Multi-word phrases are treated differently than associations between individual words.")]),e._v(" "),s("p",[e._v("When a multi-word phrase is considered the synonym of another word or phrase, the exact search query will always take precedence over its synonym(s).")]),e._v(" "),s("h4",{attrs:{id:"_4-2-1-example"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-1-example"}},[e._v("#")]),e._v(" 4.2.1. Example")]),e._v(" "),s("p",[e._v("Suppose "),s("code",[e._v("San Francisco")]),e._v(" and "),s("code",[e._v("SF")]),e._v(" as synonyms with a mutual association")]),e._v(" "),s("p",[s("em",[s("strong",[e._v("Request payload "),s("code",[e._v("GET")]),e._v("- "),s("code",[e._v("/indexes/jobs/settings/synonyms")])])])]),e._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[e._v('"San Francisco"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"SF"')]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[e._v('"SF"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"San Francisco"')]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),s("p",[e._v("In this case, a search for "),s("code",[e._v("SF")]),e._v(", results containing "),s("code",[e._v("San Francisco")]),e._v(" will also be returned. However, they will be considered less relevant than those containing "),s("code",[e._v("SF")]),e._v(". The reverse is also true.")]),e._v(" "),s("h3",{attrs:{id:"_4-3-three-words-limitation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-3-three-words-limitation"}},[e._v("#")]),e._v(" 4.3. Three Words Limitation")]),e._v(" "),s("p",[e._v("Multi-word synonyms are limited to a maximum of three words.")]),e._v(" "),s("p",[e._v("For example, although "),s("code",[e._v("League of Legends")]),e._v(" and "),s("code",[e._v("LOL")]),e._v(" can be synonymous, it will not work for "),s("code",[e._v("The Lord of the Rings")]),e._v(" and "),s("code",[e._v("LOTR")]),e._v(".")]),e._v(" "),s("h2",{attrs:{id:"_5-future-possibilities"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),s("ul",[s("li",[e._v("Automatically declare mutual association")])])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/50.79df3dcc.js b/docs/assets/js/50.4c8cb335.js similarity index 99% rename from docs/assets/js/50.79df3dcc.js rename to docs/assets/js/50.4c8cb335.js index a579b2ca1..2c9b6291f 100644 --- a/docs/assets/js/50.79df3dcc.js +++ b/docs/assets/js/50.4c8cb335.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[50],{474:function(e,t,i){"use strict";i.r(t);var r=i(62),a=Object(r.a)({},(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[i("h1",{attrs:{id:"indexes-api"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#indexes-api"}},[e._v("#")]),e._v(" Indexes API")]),e._v(" "),i("h2",{attrs:{id:"_1-summary"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),i("p",[e._v("This specification describes the indexes API endpoints. The endpoint gives the possibility to get, get all, create, update and delete Meilsearch indexes.")]),e._v(" "),i("h2",{attrs:{id:"_2-motivation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),i("p",[e._v("N/A")]),e._v(" "),i("h2",{attrs:{id:"_3-functional-specification"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),i("p",[e._v("Indexes contain a set of documents in which to search and have their specific settings.")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0124-documents-api.html"}},[e._v("Documents API specification")]),e._v(" and "),i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html"}},[e._v("Settings API specification")]),e._v(" for more details.")],1),e._v(" "),i("h3",{attrs:{id:"_3-1-index-api-resource-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-index-api-resource-definition"}},[e._v("#")]),e._v(" 3.1. "),i("code",[e._v("index")]),e._v(" API Resource Definition")]),e._v(" "),i("table",[i("thead",[i("tr",[i("th",[e._v("Field")]),e._v(" "),i("th",[e._v("Type")]),e._v(" "),i("th",[e._v("Required")])])]),e._v(" "),i("tbody",[i("tr",[i("td",[i("a",{attrs:{href:"#311-uid"}},[e._v("uid")])]),e._v(" "),i("td",[e._v("string")]),e._v(" "),i("td",[e._v("True")])]),e._v(" "),i("tr",[i("td",[i("a",{attrs:{href:"#313-primaryKey"}},[e._v("primaryKey")])]),e._v(" "),i("td",[e._v("string / "),i("code",[e._v("null")])]),e._v(" "),i("td",[e._v("False")])]),e._v(" "),i("tr",[i("td",[i("a",{attrs:{href:"#314-createdAt"}},[e._v("createdAt")])]),e._v(" "),i("td",[e._v("string")]),e._v(" "),i("td",[e._v("False")])]),e._v(" "),i("tr",[i("td",[i("a",{attrs:{href:"#315-updatedAt"}},[e._v("updatedAt")])]),e._v(" "),i("td",[e._v("string")]),e._v(" "),i("td",[e._v("False")])])])]),e._v(" "),i("h4",{attrs:{id:"_3-1-1-uid"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-uid"}},[e._v("#")]),e._v(" 3.1.1. "),i("code",[e._v("uid")])]),e._v(" "),i("ul",[i("li",[e._v("Type: string")]),e._v(" "),i("li",[e._v("Required: true")])]),e._v(" "),i("p",[e._v("A unique identifier for the index.")]),e._v(" "),i("p",[e._v("This field is mandatory when creating an index and cannot be changed afterwards.")]),e._v(" "),i("p",[e._v("The field "),i("code",[e._v("uid")]),e._v(" can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_).")]),e._v(" "),i("h4",{attrs:{id:"_3-1-2-primarykey"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-primarykey"}},[e._v("#")]),e._v(" 3.1.2. "),i("code",[e._v("primaryKey")])]),e._v(" "),i("ul",[i("li",[e._v("Type: string")]),e._v(" "),i("li",[e._v("Required: false")]),e._v(" "),i("li",[e._v("Default: "),i("code",[e._v("null")])])]),e._v(" "),i("p",[e._v("The primary key is the attribute in a document whose value is unique amongst all the other documents.")]),e._v(" "),i("p",[e._v("This field allows bypassing the auto-inference mechanism of the document identifiers.")]),e._v(" "),i("p",[e._v("By default, the "),i("code",[e._v("primaryKey")]),e._v(" will be chosen by the auto-inference mechanism by the engine when a first document is indexed.")]),e._v(" "),i("p",[e._v("Specifying this field tells the engine to use the document attribute specified in "),i("code",[e._v("primaryKey")]),e._v(" and bypasses this mechanism.")]),e._v(" "),i("p",[e._v("When the index is empty, it is possible to modify the "),i("code",[e._v("primaryKey")]),e._v(".")]),e._v(" "),i("h4",{attrs:{id:"_3-1-3-createdat"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-createdat"}},[e._v("#")]),e._v(" 3.1.3. "),i("code",[e._v("createdAt")])]),e._v(" "),i("ul",[i("li",[e._v("Type: string")]),e._v(" "),i("li",[e._v("Required: false")])]),e._v(" "),i("p",[e._v("The creation date on which the index has been created.")]),e._v(" "),i("p",[e._v("Automatically generated by the engine at the creation of an index.")]),e._v(" "),i("p",[e._v("Represented with the "),i("code",[e._v("RFC 3339")]),e._v(" format.")]),e._v(" "),i("h4",{attrs:{id:"_3-1-4-updatedat"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-updatedat"}},[e._v("#")]),e._v(" 3.1.4. "),i("code",[e._v("updatedAt")])]),e._v(" "),i("ul",[i("li",[e._v("Type: string")]),e._v(" "),i("li",[e._v("Required: false")])]),e._v(" "),i("p",[e._v("The latest date on which the index has been updated.")]),e._v(" "),i("p",[e._v("Automatically generated by the engine at the creation/update of an index.")]),e._v(" "),i("p",[e._v("Represented wih the "),i("code",[e._v("RFC 3339")]),e._v(" format.")]),e._v(" "),i("h3",{attrs:{id:"_3-2-api-endpoints-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2. API Endpoints Definition")]),e._v(" "),i("p",[e._v("Manipulate indexes of a Meilisearch instance.")]),e._v(" "),i("ul",[i("li",[i("a",{attrs:{href:"#321-get---indexes"}},[e._v("3.2.1. "),i("code",[e._v("GET")]),e._v(" - "),i("code",[e._v("indexes")])])]),e._v(" "),i("li",[i("a",{attrs:{href:"#322-get---indexesindexuid"}},[e._v("3.2.2. "),i("code",[e._v("GET")]),e._v(" - "),i("code",[e._v("indexes/:index_uid")])])]),e._v(" "),i("li",[i("a",{attrs:{href:"#323-post---indexes"}},[e._v("3.2.3. "),i("code",[e._v("POST")]),e._v(" - "),i("code",[e._v("indexes")])])]),e._v(" "),i("li",[i("a",{attrs:{href:"#324-patch---indexesindexuid"}},[e._v("3.2.4. "),i("code",[e._v("PATCH")]),e._v(" - "),i("code",[e._v("indexes/:index_uid")])])]),e._v(" "),i("li",[i("a",{attrs:{href:"#325-delete---indexesindexuid"}},[e._v("3.2.5. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid")])])])]),e._v(" "),i("h4",{attrs:{id:"_3-2-1-get-indexes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-get-indexes"}},[e._v("#")]),e._v(" 3.2.1. "),i("code",[e._v("GET")]),e._v(" - "),i("code",[e._v("indexes")])]),e._v(" "),i("p",[e._v("List all indexes of a Meilisearch instance.")]),e._v(" "),i("p",[e._v("The results are sorted in ascending alphanumeric order from the "),i("code",[e._v("uid")]),e._v(" field.")]),e._v(" "),i("h5",{attrs:{id:"_3-2-1-1-query-parameters"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-query-parameters"}},[e._v("#")]),e._v(" 3.2.1.1. Query Parameters")]),e._v(" "),i("table",[i("thead",[i("tr",[i("th",[e._v("Field")]),e._v(" "),i("th",[e._v("Type")]),e._v(" "),i("th",[e._v("Required")])])]),e._v(" "),i("tbody",[i("tr",[i("td",[i("code",[e._v("offset")])]),e._v(" "),i("td",[e._v("integer / "),i("code",[e._v("null")])]),e._v(" "),i("td",[e._v("false")])]),e._v(" "),i("tr",[i("td",[i("code",[e._v("limit")])]),e._v(" "),i("td",[e._v("integer / "),i("code",[e._v("null")])]),e._v(" "),i("td",[e._v("false")])])])]),e._v(" "),i("h6",{attrs:{id:"_3-2-1-1-1-offset"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-1-offset"}},[e._v("#")]),e._v(" 3.2.1.1.1. "),i("code",[e._v("offset")])]),e._v(" "),i("ul",[i("li",[e._v("Type: Integer")]),e._v(" "),i("li",[e._v("Required: False")]),e._v(" "),i("li",[e._v("Default: "),i("code",[e._v("0")])])]),e._v(" "),i("p",[e._v("Sets the starting point in the results, effectively skipping over a given number of indexes.")]),e._v(" "),i("h6",{attrs:{id:"_3-2-1-1-2-limit"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-2-limit"}},[e._v("#")]),e._v(" 3.2.1.1.2. "),i("code",[e._v("limit")])]),e._v(" "),i("ul",[i("li",[e._v("Type: Integer")]),e._v(" "),i("li",[e._v("Required: False")]),e._v(" "),i("li",[e._v("Default: "),i("code",[e._v("20")])])]),e._v(" "),i("p",[e._v("Sets the maximum number of indexes to be returned by the current request.")]),e._v(" "),i("h5",{attrs:{id:"_3-2-1-2-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-2-response-definition"}},[e._v("#")]),e._v(" 3.2.1.2. Response Definition")]),e._v(" "),i("p",[e._v("An object containing all the indexes.")]),e._v(" "),i("table",[i("thead",[i("tr",[i("th",[e._v("Field")]),e._v(" "),i("th",[e._v("Type")]),e._v(" "),i("th",[e._v("Required")])])]),e._v(" "),i("tbody",[i("tr",[i("td",[i("code",[e._v("results")])]),e._v(" "),i("td",[e._v("Array[Index]")]),e._v(" "),i("td",[e._v("true")])]),e._v(" "),i("tr",[i("td",[i("code",[e._v("offset")])]),e._v(" "),i("td",[e._v("integer")]),e._v(" "),i("td",[e._v("true")])]),e._v(" "),i("tr",[i("td",[i("code",[e._v("limit")])]),e._v(" "),i("td",[e._v("integer")]),e._v(" "),i("td",[e._v("true")])]),e._v(" "),i("tr",[i("td",[i("code",[e._v("total")])]),e._v(" "),i("td",[e._v("integer")]),e._v(" "),i("td",[e._v("true")])])])]),e._v(" "),i("h6",{attrs:{id:"_3-2-1-2-1-results"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-2-1-results"}},[e._v("#")]),e._v(" 3.2.1.2.1. "),i("code",[e._v("results")])]),e._v(" "),i("ul",[i("li",[e._v("Type: Array[Index]")]),e._v(" "),i("li",[e._v("Required: True")])]),e._v(" "),i("p",[e._v("An array containing the fetched indexes.")]),e._v(" "),i("h6",{attrs:{id:"_3-2-1-2-2-offset"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-2-2-offset"}},[e._v("#")]),e._v(" 3.2.1.2.2. "),i("code",[e._v("offset")])]),e._v(" "),i("ul",[i("li",[e._v("Type: Integer")]),e._v(" "),i("li",[e._v("Required: True")])]),e._v(" "),i("p",[e._v("Gives the "),i("code",[e._v("offset")]),e._v(" parameter used for the query.")]),e._v(" "),i("blockquote",[i("p",[e._v("See "),i("a",{attrs:{href:"#32111-offset"}},[e._v("3.2.1.1.1. "),i("code",[e._v("offset")])]),e._v(" section.")])]),e._v(" "),i("h6",{attrs:{id:"_3-2-1-2-3-limit"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-2-3-limit"}},[e._v("#")]),e._v(" 3.2.1.2.3. "),i("code",[e._v("limit")])]),e._v(" "),i("ul",[i("li",[e._v("Type: Integer")]),e._v(" "),i("li",[e._v("Required: True")])]),e._v(" "),i("p",[e._v("Gives the "),i("code",[e._v("limit")]),e._v(" parameter used for the query.")]),e._v(" "),i("blockquote",[i("p",[e._v("See "),i("a",{attrs:{href:"#32112-limit"}},[e._v("3.2.1.1.2. "),i("code",[e._v("limit")])]),e._v(" section.")])]),e._v(" "),i("h6",{attrs:{id:"_3-2-1-2-3-total"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-2-3-total"}},[e._v("#")]),e._v(" 3.2.1.2.3. "),i("code",[e._v("total")])]),e._v(" "),i("ul",[i("li",[e._v("Type: Integer")]),e._v(" "),i("li",[e._v("Required: True")])]),e._v(" "),i("p",[e._v("Gives the total number of indexes that can be browsed.")]),e._v(" "),i("h4",{attrs:{id:"_3-2-2-get-indexes-index-uid"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-get-indexes-index-uid"}},[e._v("#")]),e._v(" 3.2.2. "),i("code",[e._v("GET")]),e._v(" - "),i("code",[e._v("indexes/:index_uid")])]),e._v(" "),i("p",[e._v("Fetch an index of a Meilisearch instance.")]),e._v(" "),i("h5",{attrs:{id:"_3-2-2-1-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-response-definition"}},[e._v("#")]),e._v(" 3.2.2.1. Response Definition")]),e._v(" "),i("table",[i("thead",[i("tr",[i("th",[e._v("Field")]),e._v(" "),i("th",[e._v("Type")]),e._v(" "),i("th",[e._v("Required")])])]),e._v(" "),i("tbody",[i("tr",[i("td",[i("code",[e._v("uid")])]),e._v(" "),i("td",[e._v("string")]),e._v(" "),i("td",[e._v("true")])]),e._v(" "),i("tr",[i("td",[i("code",[e._v("primaryKey")])]),e._v(" "),i("td",[e._v("string / "),i("code",[e._v("null")])]),e._v(" "),i("td",[e._v("true")])]),e._v(" "),i("tr",[i("td",[i("code",[e._v("createdAt")])]),e._v(" "),i("td",[e._v("string")]),e._v(" "),i("td",[e._v("true")])]),e._v(" "),i("tr",[i("td",[i("code",[e._v("updatedAt")])]),e._v(" "),i("td",[e._v("string")]),e._v(" "),i("td",[e._v("true")])])])]),e._v(" "),i("h5",{attrs:{id:"_3-2-2-2-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-errors"}},[e._v("#")]),e._v(" 3.2.2.2. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a value with a different type than "),i("code",[e._v("Integer")]),e._v(" or "),i("code",[e._v("null")]),e._v(" for "),i("code",[e._v("offset")]),e._v(" will return a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_offset"}},[e._v("invalid_index_offset")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a value with a different type than "),i("code",[e._v("Integer")]),e._v(" or "),i("code",[e._v("null")]),e._v(" for "),i("code",[e._v("limit")]),e._v(" will return a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_limit"}},[e._v("invalid_index_limit")]),e._v(" error.")],1)]),e._v(" "),i("h4",{attrs:{id:"_3-2-3-post-indexes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-post-indexes"}},[e._v("#")]),e._v(" 3.2.3. "),i("code",[e._v("POST")]),e._v(" - "),i("code",[e._v("indexes")])]),e._v(" "),i("p",[e._v("Creates an index.")]),e._v(" "),i("h5",{attrs:{id:"_3-2-3-1-request-payload-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-1-request-payload-definition"}},[e._v("#")]),e._v(" 3.2.3.1. Request Payload Definition")]),e._v(" "),i("table",[i("thead",[i("tr",[i("th",[e._v("Field")]),e._v(" "),i("th",[e._v("Type")]),e._v(" "),i("th",[e._v("Required")])])]),e._v(" "),i("tbody",[i("tr",[i("td",[i("code",[e._v("uid")])]),e._v(" "),i("td",[e._v("string")]),e._v(" "),i("td",[e._v("true")])]),e._v(" "),i("tr",[i("td",[i("code",[e._v("primaryKey")])]),e._v(" "),i("td",[e._v("string / "),i("code",[e._v("null")])]),e._v(" "),i("td",[e._v("false")])])])]),e._v(" "),i("h5",{attrs:{id:"_3-2-3-2-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-2-response-definition"}},[e._v("#")]),e._v(" 3.2.3.2. Response Definition")]),e._v(" "),i("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),i("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),i("code",[e._v("task")]),e._v(" Object for "),i("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),i("h5",{attrs:{id:"_3-2-3-3-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-3-errors"}},[e._v("#")]),e._v(" 3.2.3.3. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Omitting Content-Type header returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an empty Content-Type returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a different Content-Type than "),i("code",[e._v("application/json")]),e._v(" returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an empty payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an invalid JSON payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Omitting "),i("code",[e._v("uid")]),e._v(" field from the payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_index_uid"}},[e._v("missing_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a value with a different type than "),i("code",[e._v("string")]),e._v(" for "),i("code",[e._v("uid")]),e._v(" will return a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an invalid index uid format for "),i("code",[e._v("uid")]),e._v(" returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a value with a different type than "),i("code",[e._v("string")]),e._v(" or "),i("code",[e._v("null")]),e._v(" for "),i("code",[e._v("primaryKey")]),e._v(" field will return a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_primary_key"}},[e._v("invalid_index_primary_key")]),e._v(" error.")],1)]),e._v(" "),i("h6",{attrs:{id:"_3-2-3-3-1-async-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-3-1-async-errors"}},[e._v("#")]),e._v(" 3.2.3.3.1. Async Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 When Meilisearch is secured by a master key, if the API Key used do not have the "),i("code",[e._v("indexes.create")]),e._v(" action defined, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related asynchronous "),i("code",[e._v("task")]),e._v(" resource. See "),i("a",{attrs:{href:"#3222-response-definition"}},[e._v("3.2.2.2. Response Definition")]),e._v(".")],1),e._v(" "),i("li",[e._v("🔴 Sending a "),i("code",[e._v("uid")]),e._v(" that already exists returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_already_exists"}},[e._v("index_already_exists")]),e._v(" error.")],1)]),e._v(" "),i("h4",{attrs:{id:"_3-2-4-patch-indexes-index-uid"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-patch-indexes-index-uid"}},[e._v("#")]),e._v(" 3.2.4. "),i("code",[e._v("PATCH")]),e._v(" - "),i("code",[e._v("indexes/:index_uid")])]),e._v(" "),i("p",[e._v("Updates an index.")]),e._v(" "),i("p",[e._v("The "),i("code",[e._v("primaryKey")]),e._v(" field can be updated when the index is empty. If the "),i("code",[e._v("primaryKey")]),e._v(" is not defined, the indexing process will try to auto-infer the "),i("code",[e._v("primaryKey")]),e._v(" by searching the first attribute containing "),i("code",[e._v("id")]),e._v(" in the first document payload to index.")]),e._v(" "),i("h5",{attrs:{id:"_3-2-4-1-request-payload-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-1-request-payload-definition"}},[e._v("#")]),e._v(" 3.2.4.1. Request Payload Definition")]),e._v(" "),i("table",[i("thead",[i("tr",[i("th",[e._v("Field")]),e._v(" "),i("th",[e._v("Type")]),e._v(" "),i("th",[e._v("Required")])])]),e._v(" "),i("tbody",[i("tr",[i("td",[i("code",[e._v("primaryKey")])]),e._v(" "),i("td",[e._v("string / "),i("code",[e._v("null")])]),e._v(" "),i("td",[e._v("False")])])])]),e._v(" "),i("h5",{attrs:{id:"_3-2-4-2-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-2-response-definition"}},[e._v("#")]),e._v(" 3.2.4.2. Response Definition")]),e._v(" "),i("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),i("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),i("code",[e._v("task")]),e._v(" Object for "),i("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),i("h5",{attrs:{id:"_3-2-4-3-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-3-errors"}},[e._v("#")]),e._v(" 3.2.4.3. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Omitting Content-Type header returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an empty Content-Type returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a different Content-Type than "),i("code",[e._v("application/json")]),e._v(" returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an empty payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an invalid JSON payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending "),i("code",[e._v("uid")]),e._v(" in the payload request returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#immutable_index_uid"}},[e._v("immutable_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending "),i("code",[e._v("createdAt")]),e._v(" in the payload request returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#immutable_index_created_at"}},[e._v("immutable_created_at")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending "),i("code",[e._v("updatedAt")]),e._v(" in the payload request returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#immutable_index_updated_at"}},[e._v("immutable_updated_at")]),e._v(" error.")],1)]),e._v(" "),i("h6",{attrs:{id:"_3-2-4-3-1-async-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-3-1-async-errors"}},[e._v("#")]),e._v(" 3.2.4.3.1. Async Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 When updating the "),i("code",[e._v("primaryKey")]),e._v(", if the previous "),i("code",[e._v("primaryKey")]),e._v(" value has already been used for a document, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_primary_key_already_exists"}},[e._v("index_primary_key_already_exists")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),i("h4",{attrs:{id:"_3-2-5-delete-indexes-index-uid"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-5-delete-indexes-index-uid"}},[e._v("#")]),e._v(" 3.2.5. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid")])]),e._v(" "),i("p",[e._v("Deletes an index.")]),e._v(" "),i("h5",{attrs:{id:"_3-2-4-1-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-1-response-definition"}},[e._v("#")]),e._v(" 3.2.4.1. Response Definition")]),e._v(" "),i("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),i("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),i("code",[e._v("task")]),e._v(" Object for "),i("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),i("h5",{attrs:{id:"_3-2-4-2-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-2-errors"}},[e._v("#")]),e._v(" 3.2.4.2. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1)]),e._v(" "),i("h6",{attrs:{id:"_3-2-4-2-1-async-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-2-1-async-errors"}},[e._v("#")]),e._v(" 3.2.4.2.1 Async Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),i("h4",{attrs:{id:"_3-2-6-general-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-6-general-errors"}},[e._v("#")]),e._v(" 3.2.6. General Errors")]),e._v(" "),i("p",[e._v("These errors apply to all endpoints described here.")]),e._v(" "),i("h5",{attrs:{id:"_3-2-6-1-auth-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-6-1-auth-errors"}},[e._v("#")]),e._v(" 3.2.6.1 Auth Errors")]),e._v(" "),i("p",[e._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Accessing this route without the "),i("code",[e._v("Authorization")]),e._v(" header returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Accessing this route with a key that does not have the required permissions (i.e. other than the master-key) returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),i("h2",{attrs:{id:"_4-technical-details"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[e._v("#")]),e._v(" 4. Technical Details")]),e._v(" "),i("ul",[i("li",[e._v("Meilisearch can accommodate an "),i("strong",[e._v("arbitrary number")]),e._v(" of indexes as long as the disk size they take is under 2TiB.")]),e._v(" "),i("li",[e._v("If having indexes bigger than 2TiB, then Meilisearch can still accommodate them as long as the sum of the disk sizes taken by any group of 20 of the existing indexes is below the size of the virtual address space devoted to a process by the OS (around 80 TiB on x64 Linux).")]),e._v(" "),i("li",[e._v("While indexes bigger in size than 2TiB are supported, the performance of making updates to these big indexes might be reduced.")]),e._v(" "),i("li",[e._v("While Meilisearch supports an arbitrary number of indexes, having hundreds of indexes accessed at random will trigger more reads from disk and might be slower, the number of concurrently accessed indexes should be limited if possible. For instance, if requiring multi-tenancy, consider using "),i("RouterLink",{attrs:{to:"/specifications/text/0089-tenant-tokens.html"}},[e._v("tenant tokens")]),e._v(" in a single index rather than creating one index per tenant.")],1)]),e._v(" "),i("h2",{attrs:{id:"_5-future-possibilities"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),i("ul",[i("li",[e._v("Rework the "),i("code",[e._v("primaryKey")]),e._v(" concept")])])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[50],{477:function(e,t,i){"use strict";i.r(t);var r=i(62),a=Object(r.a)({},(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[i("h1",{attrs:{id:"indexes-api"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#indexes-api"}},[e._v("#")]),e._v(" Indexes API")]),e._v(" "),i("h2",{attrs:{id:"_1-summary"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),i("p",[e._v("This specification describes the indexes API endpoints. The endpoint gives the possibility to get, get all, create, update and delete Meilsearch indexes.")]),e._v(" "),i("h2",{attrs:{id:"_2-motivation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),i("p",[e._v("N/A")]),e._v(" "),i("h2",{attrs:{id:"_3-functional-specification"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),i("p",[e._v("Indexes contain a set of documents in which to search and have their specific settings.")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0124-documents-api.html"}},[e._v("Documents API specification")]),e._v(" and "),i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html"}},[e._v("Settings API specification")]),e._v(" for more details.")],1),e._v(" "),i("h3",{attrs:{id:"_3-1-index-api-resource-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-index-api-resource-definition"}},[e._v("#")]),e._v(" 3.1. "),i("code",[e._v("index")]),e._v(" API Resource Definition")]),e._v(" "),i("table",[i("thead",[i("tr",[i("th",[e._v("Field")]),e._v(" "),i("th",[e._v("Type")]),e._v(" "),i("th",[e._v("Required")])])]),e._v(" "),i("tbody",[i("tr",[i("td",[i("a",{attrs:{href:"#311-uid"}},[e._v("uid")])]),e._v(" "),i("td",[e._v("string")]),e._v(" "),i("td",[e._v("True")])]),e._v(" "),i("tr",[i("td",[i("a",{attrs:{href:"#313-primaryKey"}},[e._v("primaryKey")])]),e._v(" "),i("td",[e._v("string / "),i("code",[e._v("null")])]),e._v(" "),i("td",[e._v("False")])]),e._v(" "),i("tr",[i("td",[i("a",{attrs:{href:"#314-createdAt"}},[e._v("createdAt")])]),e._v(" "),i("td",[e._v("string")]),e._v(" "),i("td",[e._v("False")])]),e._v(" "),i("tr",[i("td",[i("a",{attrs:{href:"#315-updatedAt"}},[e._v("updatedAt")])]),e._v(" "),i("td",[e._v("string")]),e._v(" "),i("td",[e._v("False")])])])]),e._v(" "),i("h4",{attrs:{id:"_3-1-1-uid"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-uid"}},[e._v("#")]),e._v(" 3.1.1. "),i("code",[e._v("uid")])]),e._v(" "),i("ul",[i("li",[e._v("Type: string")]),e._v(" "),i("li",[e._v("Required: true")])]),e._v(" "),i("p",[e._v("A unique identifier for the index.")]),e._v(" "),i("p",[e._v("This field is mandatory when creating an index and cannot be changed afterwards.")]),e._v(" "),i("p",[e._v("The field "),i("code",[e._v("uid")]),e._v(" can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_).")]),e._v(" "),i("h4",{attrs:{id:"_3-1-2-primarykey"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-primarykey"}},[e._v("#")]),e._v(" 3.1.2. "),i("code",[e._v("primaryKey")])]),e._v(" "),i("ul",[i("li",[e._v("Type: string")]),e._v(" "),i("li",[e._v("Required: false")]),e._v(" "),i("li",[e._v("Default: "),i("code",[e._v("null")])])]),e._v(" "),i("p",[e._v("The primary key is the attribute in a document whose value is unique amongst all the other documents.")]),e._v(" "),i("p",[e._v("This field allows bypassing the auto-inference mechanism of the document identifiers.")]),e._v(" "),i("p",[e._v("By default, the "),i("code",[e._v("primaryKey")]),e._v(" will be chosen by the auto-inference mechanism by the engine when a first document is indexed.")]),e._v(" "),i("p",[e._v("Specifying this field tells the engine to use the document attribute specified in "),i("code",[e._v("primaryKey")]),e._v(" and bypasses this mechanism.")]),e._v(" "),i("p",[e._v("When the index is empty, it is possible to modify the "),i("code",[e._v("primaryKey")]),e._v(".")]),e._v(" "),i("h4",{attrs:{id:"_3-1-3-createdat"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-createdat"}},[e._v("#")]),e._v(" 3.1.3. "),i("code",[e._v("createdAt")])]),e._v(" "),i("ul",[i("li",[e._v("Type: string")]),e._v(" "),i("li",[e._v("Required: false")])]),e._v(" "),i("p",[e._v("The creation date on which the index has been created.")]),e._v(" "),i("p",[e._v("Automatically generated by the engine at the creation of an index.")]),e._v(" "),i("p",[e._v("Represented with the "),i("code",[e._v("RFC 3339")]),e._v(" format.")]),e._v(" "),i("h4",{attrs:{id:"_3-1-4-updatedat"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-updatedat"}},[e._v("#")]),e._v(" 3.1.4. "),i("code",[e._v("updatedAt")])]),e._v(" "),i("ul",[i("li",[e._v("Type: string")]),e._v(" "),i("li",[e._v("Required: false")])]),e._v(" "),i("p",[e._v("The latest date on which the index has been updated.")]),e._v(" "),i("p",[e._v("Automatically generated by the engine at the creation/update of an index.")]),e._v(" "),i("p",[e._v("Represented wih the "),i("code",[e._v("RFC 3339")]),e._v(" format.")]),e._v(" "),i("h3",{attrs:{id:"_3-2-api-endpoints-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2. API Endpoints Definition")]),e._v(" "),i("p",[e._v("Manipulate indexes of a Meilisearch instance.")]),e._v(" "),i("ul",[i("li",[i("a",{attrs:{href:"#321-get---indexes"}},[e._v("3.2.1. "),i("code",[e._v("GET")]),e._v(" - "),i("code",[e._v("indexes")])])]),e._v(" "),i("li",[i("a",{attrs:{href:"#322-get---indexesindexuid"}},[e._v("3.2.2. "),i("code",[e._v("GET")]),e._v(" - "),i("code",[e._v("indexes/:index_uid")])])]),e._v(" "),i("li",[i("a",{attrs:{href:"#323-post---indexes"}},[e._v("3.2.3. "),i("code",[e._v("POST")]),e._v(" - "),i("code",[e._v("indexes")])])]),e._v(" "),i("li",[i("a",{attrs:{href:"#324-patch---indexesindexuid"}},[e._v("3.2.4. "),i("code",[e._v("PATCH")]),e._v(" - "),i("code",[e._v("indexes/:index_uid")])])]),e._v(" "),i("li",[i("a",{attrs:{href:"#325-delete---indexesindexuid"}},[e._v("3.2.5. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid")])])])]),e._v(" "),i("h4",{attrs:{id:"_3-2-1-get-indexes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-get-indexes"}},[e._v("#")]),e._v(" 3.2.1. "),i("code",[e._v("GET")]),e._v(" - "),i("code",[e._v("indexes")])]),e._v(" "),i("p",[e._v("List all indexes of a Meilisearch instance.")]),e._v(" "),i("p",[e._v("The results are sorted in ascending alphanumeric order from the "),i("code",[e._v("uid")]),e._v(" field.")]),e._v(" "),i("h5",{attrs:{id:"_3-2-1-1-query-parameters"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-query-parameters"}},[e._v("#")]),e._v(" 3.2.1.1. Query Parameters")]),e._v(" "),i("table",[i("thead",[i("tr",[i("th",[e._v("Field")]),e._v(" "),i("th",[e._v("Type")]),e._v(" "),i("th",[e._v("Required")])])]),e._v(" "),i("tbody",[i("tr",[i("td",[i("code",[e._v("offset")])]),e._v(" "),i("td",[e._v("integer / "),i("code",[e._v("null")])]),e._v(" "),i("td",[e._v("false")])]),e._v(" "),i("tr",[i("td",[i("code",[e._v("limit")])]),e._v(" "),i("td",[e._v("integer / "),i("code",[e._v("null")])]),e._v(" "),i("td",[e._v("false")])])])]),e._v(" "),i("h6",{attrs:{id:"_3-2-1-1-1-offset"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-1-offset"}},[e._v("#")]),e._v(" 3.2.1.1.1. "),i("code",[e._v("offset")])]),e._v(" "),i("ul",[i("li",[e._v("Type: Integer")]),e._v(" "),i("li",[e._v("Required: False")]),e._v(" "),i("li",[e._v("Default: "),i("code",[e._v("0")])])]),e._v(" "),i("p",[e._v("Sets the starting point in the results, effectively skipping over a given number of indexes.")]),e._v(" "),i("h6",{attrs:{id:"_3-2-1-1-2-limit"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-2-limit"}},[e._v("#")]),e._v(" 3.2.1.1.2. "),i("code",[e._v("limit")])]),e._v(" "),i("ul",[i("li",[e._v("Type: Integer")]),e._v(" "),i("li",[e._v("Required: False")]),e._v(" "),i("li",[e._v("Default: "),i("code",[e._v("20")])])]),e._v(" "),i("p",[e._v("Sets the maximum number of indexes to be returned by the current request.")]),e._v(" "),i("h5",{attrs:{id:"_3-2-1-2-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-2-response-definition"}},[e._v("#")]),e._v(" 3.2.1.2. Response Definition")]),e._v(" "),i("p",[e._v("An object containing all the indexes.")]),e._v(" "),i("table",[i("thead",[i("tr",[i("th",[e._v("Field")]),e._v(" "),i("th",[e._v("Type")]),e._v(" "),i("th",[e._v("Required")])])]),e._v(" "),i("tbody",[i("tr",[i("td",[i("code",[e._v("results")])]),e._v(" "),i("td",[e._v("Array[Index]")]),e._v(" "),i("td",[e._v("true")])]),e._v(" "),i("tr",[i("td",[i("code",[e._v("offset")])]),e._v(" "),i("td",[e._v("integer")]),e._v(" "),i("td",[e._v("true")])]),e._v(" "),i("tr",[i("td",[i("code",[e._v("limit")])]),e._v(" "),i("td",[e._v("integer")]),e._v(" "),i("td",[e._v("true")])]),e._v(" "),i("tr",[i("td",[i("code",[e._v("total")])]),e._v(" "),i("td",[e._v("integer")]),e._v(" "),i("td",[e._v("true")])])])]),e._v(" "),i("h6",{attrs:{id:"_3-2-1-2-1-results"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-2-1-results"}},[e._v("#")]),e._v(" 3.2.1.2.1. "),i("code",[e._v("results")])]),e._v(" "),i("ul",[i("li",[e._v("Type: Array[Index]")]),e._v(" "),i("li",[e._v("Required: True")])]),e._v(" "),i("p",[e._v("An array containing the fetched indexes.")]),e._v(" "),i("h6",{attrs:{id:"_3-2-1-2-2-offset"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-2-2-offset"}},[e._v("#")]),e._v(" 3.2.1.2.2. "),i("code",[e._v("offset")])]),e._v(" "),i("ul",[i("li",[e._v("Type: Integer")]),e._v(" "),i("li",[e._v("Required: True")])]),e._v(" "),i("p",[e._v("Gives the "),i("code",[e._v("offset")]),e._v(" parameter used for the query.")]),e._v(" "),i("blockquote",[i("p",[e._v("See "),i("a",{attrs:{href:"#32111-offset"}},[e._v("3.2.1.1.1. "),i("code",[e._v("offset")])]),e._v(" section.")])]),e._v(" "),i("h6",{attrs:{id:"_3-2-1-2-3-limit"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-2-3-limit"}},[e._v("#")]),e._v(" 3.2.1.2.3. "),i("code",[e._v("limit")])]),e._v(" "),i("ul",[i("li",[e._v("Type: Integer")]),e._v(" "),i("li",[e._v("Required: True")])]),e._v(" "),i("p",[e._v("Gives the "),i("code",[e._v("limit")]),e._v(" parameter used for the query.")]),e._v(" "),i("blockquote",[i("p",[e._v("See "),i("a",{attrs:{href:"#32112-limit"}},[e._v("3.2.1.1.2. "),i("code",[e._v("limit")])]),e._v(" section.")])]),e._v(" "),i("h6",{attrs:{id:"_3-2-1-2-3-total"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-2-3-total"}},[e._v("#")]),e._v(" 3.2.1.2.3. "),i("code",[e._v("total")])]),e._v(" "),i("ul",[i("li",[e._v("Type: Integer")]),e._v(" "),i("li",[e._v("Required: True")])]),e._v(" "),i("p",[e._v("Gives the total number of indexes that can be browsed.")]),e._v(" "),i("h4",{attrs:{id:"_3-2-2-get-indexes-index-uid"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-get-indexes-index-uid"}},[e._v("#")]),e._v(" 3.2.2. "),i("code",[e._v("GET")]),e._v(" - "),i("code",[e._v("indexes/:index_uid")])]),e._v(" "),i("p",[e._v("Fetch an index of a Meilisearch instance.")]),e._v(" "),i("h5",{attrs:{id:"_3-2-2-1-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-response-definition"}},[e._v("#")]),e._v(" 3.2.2.1. Response Definition")]),e._v(" "),i("table",[i("thead",[i("tr",[i("th",[e._v("Field")]),e._v(" "),i("th",[e._v("Type")]),e._v(" "),i("th",[e._v("Required")])])]),e._v(" "),i("tbody",[i("tr",[i("td",[i("code",[e._v("uid")])]),e._v(" "),i("td",[e._v("string")]),e._v(" "),i("td",[e._v("true")])]),e._v(" "),i("tr",[i("td",[i("code",[e._v("primaryKey")])]),e._v(" "),i("td",[e._v("string / "),i("code",[e._v("null")])]),e._v(" "),i("td",[e._v("true")])]),e._v(" "),i("tr",[i("td",[i("code",[e._v("createdAt")])]),e._v(" "),i("td",[e._v("string")]),e._v(" "),i("td",[e._v("true")])]),e._v(" "),i("tr",[i("td",[i("code",[e._v("updatedAt")])]),e._v(" "),i("td",[e._v("string")]),e._v(" "),i("td",[e._v("true")])])])]),e._v(" "),i("h5",{attrs:{id:"_3-2-2-2-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-errors"}},[e._v("#")]),e._v(" 3.2.2.2. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a value with a different type than "),i("code",[e._v("Integer")]),e._v(" or "),i("code",[e._v("null")]),e._v(" for "),i("code",[e._v("offset")]),e._v(" will return a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_offset"}},[e._v("invalid_index_offset")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a value with a different type than "),i("code",[e._v("Integer")]),e._v(" or "),i("code",[e._v("null")]),e._v(" for "),i("code",[e._v("limit")]),e._v(" will return a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_limit"}},[e._v("invalid_index_limit")]),e._v(" error.")],1)]),e._v(" "),i("h4",{attrs:{id:"_3-2-3-post-indexes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-post-indexes"}},[e._v("#")]),e._v(" 3.2.3. "),i("code",[e._v("POST")]),e._v(" - "),i("code",[e._v("indexes")])]),e._v(" "),i("p",[e._v("Creates an index.")]),e._v(" "),i("h5",{attrs:{id:"_3-2-3-1-request-payload-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-1-request-payload-definition"}},[e._v("#")]),e._v(" 3.2.3.1. Request Payload Definition")]),e._v(" "),i("table",[i("thead",[i("tr",[i("th",[e._v("Field")]),e._v(" "),i("th",[e._v("Type")]),e._v(" "),i("th",[e._v("Required")])])]),e._v(" "),i("tbody",[i("tr",[i("td",[i("code",[e._v("uid")])]),e._v(" "),i("td",[e._v("string")]),e._v(" "),i("td",[e._v("true")])]),e._v(" "),i("tr",[i("td",[i("code",[e._v("primaryKey")])]),e._v(" "),i("td",[e._v("string / "),i("code",[e._v("null")])]),e._v(" "),i("td",[e._v("false")])])])]),e._v(" "),i("h5",{attrs:{id:"_3-2-3-2-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-2-response-definition"}},[e._v("#")]),e._v(" 3.2.3.2. Response Definition")]),e._v(" "),i("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),i("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),i("code",[e._v("task")]),e._v(" Object for "),i("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),i("h5",{attrs:{id:"_3-2-3-3-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-3-errors"}},[e._v("#")]),e._v(" 3.2.3.3. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Omitting Content-Type header returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an empty Content-Type returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a different Content-Type than "),i("code",[e._v("application/json")]),e._v(" returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an empty payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an invalid JSON payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Omitting "),i("code",[e._v("uid")]),e._v(" field from the payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_index_uid"}},[e._v("missing_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a value with a different type than "),i("code",[e._v("string")]),e._v(" for "),i("code",[e._v("uid")]),e._v(" will return a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an invalid index uid format for "),i("code",[e._v("uid")]),e._v(" returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a value with a different type than "),i("code",[e._v("string")]),e._v(" or "),i("code",[e._v("null")]),e._v(" for "),i("code",[e._v("primaryKey")]),e._v(" field will return a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_primary_key"}},[e._v("invalid_index_primary_key")]),e._v(" error.")],1)]),e._v(" "),i("h6",{attrs:{id:"_3-2-3-3-1-async-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-3-1-async-errors"}},[e._v("#")]),e._v(" 3.2.3.3.1. Async Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 When Meilisearch is secured by a master key, if the API Key used do not have the "),i("code",[e._v("indexes.create")]),e._v(" action defined, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related asynchronous "),i("code",[e._v("task")]),e._v(" resource. See "),i("a",{attrs:{href:"#3222-response-definition"}},[e._v("3.2.2.2. Response Definition")]),e._v(".")],1),e._v(" "),i("li",[e._v("🔴 Sending a "),i("code",[e._v("uid")]),e._v(" that already exists returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_already_exists"}},[e._v("index_already_exists")]),e._v(" error.")],1)]),e._v(" "),i("h4",{attrs:{id:"_3-2-4-patch-indexes-index-uid"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-patch-indexes-index-uid"}},[e._v("#")]),e._v(" 3.2.4. "),i("code",[e._v("PATCH")]),e._v(" - "),i("code",[e._v("indexes/:index_uid")])]),e._v(" "),i("p",[e._v("Updates an index.")]),e._v(" "),i("p",[e._v("The "),i("code",[e._v("primaryKey")]),e._v(" field can be updated when the index is empty. If the "),i("code",[e._v("primaryKey")]),e._v(" is not defined, the indexing process will try to auto-infer the "),i("code",[e._v("primaryKey")]),e._v(" by searching the first attribute containing "),i("code",[e._v("id")]),e._v(" in the first document payload to index.")]),e._v(" "),i("h5",{attrs:{id:"_3-2-4-1-request-payload-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-1-request-payload-definition"}},[e._v("#")]),e._v(" 3.2.4.1. Request Payload Definition")]),e._v(" "),i("table",[i("thead",[i("tr",[i("th",[e._v("Field")]),e._v(" "),i("th",[e._v("Type")]),e._v(" "),i("th",[e._v("Required")])])]),e._v(" "),i("tbody",[i("tr",[i("td",[i("code",[e._v("primaryKey")])]),e._v(" "),i("td",[e._v("string / "),i("code",[e._v("null")])]),e._v(" "),i("td",[e._v("False")])])])]),e._v(" "),i("h5",{attrs:{id:"_3-2-4-2-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-2-response-definition"}},[e._v("#")]),e._v(" 3.2.4.2. Response Definition")]),e._v(" "),i("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),i("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),i("code",[e._v("task")]),e._v(" Object for "),i("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),i("h5",{attrs:{id:"_3-2-4-3-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-3-errors"}},[e._v("#")]),e._v(" 3.2.4.3. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Omitting Content-Type header returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an empty Content-Type returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a different Content-Type than "),i("code",[e._v("application/json")]),e._v(" returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an empty payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an invalid JSON payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending "),i("code",[e._v("uid")]),e._v(" in the payload request returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#immutable_index_uid"}},[e._v("immutable_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending "),i("code",[e._v("createdAt")]),e._v(" in the payload request returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#immutable_index_created_at"}},[e._v("immutable_created_at")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending "),i("code",[e._v("updatedAt")]),e._v(" in the payload request returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#immutable_index_updated_at"}},[e._v("immutable_updated_at")]),e._v(" error.")],1)]),e._v(" "),i("h6",{attrs:{id:"_3-2-4-3-1-async-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-3-1-async-errors"}},[e._v("#")]),e._v(" 3.2.4.3.1. Async Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 When updating the "),i("code",[e._v("primaryKey")]),e._v(", if the previous "),i("code",[e._v("primaryKey")]),e._v(" value has already been used for a document, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_primary_key_already_exists"}},[e._v("index_primary_key_already_exists")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),i("h4",{attrs:{id:"_3-2-5-delete-indexes-index-uid"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-5-delete-indexes-index-uid"}},[e._v("#")]),e._v(" 3.2.5. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid")])]),e._v(" "),i("p",[e._v("Deletes an index.")]),e._v(" "),i("h5",{attrs:{id:"_3-2-4-1-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-1-response-definition"}},[e._v("#")]),e._v(" 3.2.4.1. Response Definition")]),e._v(" "),i("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),i("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),i("code",[e._v("task")]),e._v(" Object for "),i("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),i("h5",{attrs:{id:"_3-2-4-2-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-2-errors"}},[e._v("#")]),e._v(" 3.2.4.2. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1)]),e._v(" "),i("h6",{attrs:{id:"_3-2-4-2-1-async-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-2-1-async-errors"}},[e._v("#")]),e._v(" 3.2.4.2.1 Async Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),i("h4",{attrs:{id:"_3-2-6-general-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-6-general-errors"}},[e._v("#")]),e._v(" 3.2.6. General Errors")]),e._v(" "),i("p",[e._v("These errors apply to all endpoints described here.")]),e._v(" "),i("h5",{attrs:{id:"_3-2-6-1-auth-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-6-1-auth-errors"}},[e._v("#")]),e._v(" 3.2.6.1 Auth Errors")]),e._v(" "),i("p",[e._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Accessing this route without the "),i("code",[e._v("Authorization")]),e._v(" header returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Accessing this route with a key that does not have the required permissions (i.e. other than the master-key) returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),i("h2",{attrs:{id:"_4-technical-details"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[e._v("#")]),e._v(" 4. Technical Details")]),e._v(" "),i("ul",[i("li",[e._v("Meilisearch can accommodate an "),i("strong",[e._v("arbitrary number")]),e._v(" of indexes as long as the disk size they take is under 2TiB.")]),e._v(" "),i("li",[e._v("If having indexes bigger than 2TiB, then Meilisearch can still accommodate them as long as the sum of the disk sizes taken by any group of 20 of the existing indexes is below the size of the virtual address space devoted to a process by the OS (around 80 TiB on x64 Linux).")]),e._v(" "),i("li",[e._v("While indexes bigger in size than 2TiB are supported, the performance of making updates to these big indexes might be reduced.")]),e._v(" "),i("li",[e._v("While Meilisearch supports an arbitrary number of indexes, having hundreds of indexes accessed at random will trigger more reads from disk and might be slower, the number of concurrently accessed indexes should be limited if possible. For instance, if requiring multi-tenancy, consider using "),i("RouterLink",{attrs:{to:"/specifications/text/0089-tenant-tokens.html"}},[e._v("tenant tokens")]),e._v(" in a single index rather than creating one index per tenant.")],1)]),e._v(" "),i("h2",{attrs:{id:"_5-future-possibilities"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),i("ul",[i("li",[e._v("Rework the "),i("code",[e._v("primaryKey")]),e._v(" concept")])])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/51.320631dd.js b/docs/assets/js/51.2eb15273.js similarity index 99% rename from docs/assets/js/51.320631dd.js rename to docs/assets/js/51.2eb15273.js index ddbaf72e0..76a57bdd8 100644 --- a/docs/assets/js/51.320631dd.js +++ b/docs/assets/js/51.2eb15273.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[51],{475:function(t,e,s){"use strict";s.r(e);var a=s(62),r=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"stats-api"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#stats-api"}},[t._v("#")]),t._v(" Stats API")]),t._v(" "),s("h2",{attrs:{id:"_1-summary"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),s("p",[t._v("This specification describes the stats API endpoints.")]),t._v(" "),s("p",[t._v("Stats routes give information and metrics about indexes and the Meilisearch database.")]),t._v(" "),s("h2",{attrs:{id:"_2-motivation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),s("p",[t._v("N/A")]),t._v(" "),s("h2",{attrs:{id:"_3-functional-specification"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),s("h3",{attrs:{id:"_3-1-api-endpoints-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-api-endpoints-definition"}},[t._v("#")]),t._v(" 3.1. API Endpoints Definition")]),t._v(" "),s("p",[t._v("See statistics of Meilisearch indexes.")]),t._v(" "),s("ul",[s("li",[s("a",{attrs:{href:"#311-get---indexesindexuidstats"}},[t._v("3.1.1. "),s("code",[t._v("GET")]),t._v(" - "),s("code",[t._v("indexes/:index_uid/stats")])])]),t._v(" "),s("li",[s("a",{attrs:{href:"#312-get---stats"}},[t._v("3.1.2. "),s("code",[t._v("GET")]),t._v(" - "),s("code",[t._v("stats")])])])]),t._v(" "),s("h4",{attrs:{id:"_3-1-1-get-indexes-index-uid-stats"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-get-indexes-index-uid-stats"}},[t._v("#")]),t._v(" 3.1.1. "),s("code",[t._v("GET")]),t._v(" - "),s("code",[t._v("indexes/:index_uid/stats")])]),t._v(" "),s("p",[t._v("Get stats of an index.")]),t._v(" "),s("h5",{attrs:{id:"_3-1-1-1-path-parameters"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-path-parameters"}},[t._v("#")]),t._v(" 3.1.1.1. Path Parameters")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Parameters")]),t._v(" "),s("th",[t._v("Type")]),t._v(" "),s("th",[t._v("Required")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("code",[t._v("index_uid")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("true")])])])]),t._v(" "),s("h6",{attrs:{id:"_3-1-1-1-1-index-uid"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-1-index-uid"}},[t._v("#")]),t._v(" 3.1.1.1.1. "),s("code",[t._v("index_uid")])]),t._v(" "),s("ul",[s("li",[t._v("Type: String")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("Unique identifier of an index.")]),t._v(" "),s("h5",{attrs:{id:"_3-1-1-2-request-payload-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-request-payload-definition"}},[t._v("#")]),t._v(" 3.1.1.2. Request Payload Definition")]),t._v(" "),s("p",[t._v("N/A")]),t._v(" "),s("h5",{attrs:{id:"_3-1-1-3-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-response-definition"}},[t._v("#")]),t._v(" 3.1.1.3. Response Definition")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Field")]),t._v(" "),s("th",[t._v("Type")]),t._v(" "),s("th",[t._v("Required")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("code",[t._v("numberOfDocuments")])]),t._v(" "),s("td",[t._v("Integer")]),t._v(" "),s("td",[t._v("true")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("isIndexing")])]),t._v(" "),s("td",[t._v("Boolean")]),t._v(" "),s("td",[t._v("true")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("fieldDistribution")])]),t._v(" "),s("td",[t._v("Object")]),t._v(" "),s("td",[t._v("true")])])])]),t._v(" "),s("h6",{attrs:{id:"_3-1-1-3-1-numberofdocuments"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-1-numberofdocuments"}},[t._v("#")]),t._v(" 3.1.1.3.1. "),s("code",[t._v("numberOfDocuments")])]),t._v(" "),s("ul",[s("li",[t._v("Type: Integer")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("The total number of documents in the index.")]),t._v(" "),s("h6",{attrs:{id:"_3-1-1-3-2-isindexing"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-2-isindexing"}},[t._v("#")]),t._v(" 3.1.1.3.2. "),s("code",[t._v("isIndexing")])]),t._v(" "),s("ul",[s("li",[t._v("Type: Boolean")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("If true, it indicates that the index is processing documents.")]),t._v(" "),s("h6",{attrs:{id:"_3-1-1-3-3-fielddistribution"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-3-fielddistribution"}},[t._v("#")]),t._v(" 3.1.1.3.3. "),s("code",[t._v("fieldDistribution")])]),t._v(" "),s("ul",[s("li",[t._v("Type: Object")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("Lists every field in the index and the total number of documents in the index containing that field.")]),t._v(" "),s("p",[s("code",[t._v("fieldDistribution")]),t._v(" is not impacted by searchableAttributes or displayedAttributes. If one of the fields is not displayed or searchable, it will still be displayed in the "),s("code",[t._v("fieldDistribution")]),t._v(" object.")]),t._v(" "),s("h5",{attrs:{id:"_3-1-1-4-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-4-errors"}},[t._v("#")]),t._v(" 3.1.1.4. Errors")]),t._v(" "),s("ul",[s("li",[t._v("🔴 Sending an invalid index uid format for the "),s("code",[t._v(":index_uid")]),t._v(" path parameter returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[t._v("invalid_index_uid")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 If the requested "),s("code",[t._v("index_uid")]),t._v(" does not exist, the API returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[t._v("index_not_found")]),t._v(" error.")],1)]),t._v(" "),s("h4",{attrs:{id:"_3-1-2-get-stats"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-get-stats"}},[t._v("#")]),t._v(" 3.1.2. "),s("code",[t._v("GET")]),t._v(" - "),s("code",[t._v("stats")])]),t._v(" "),s("p",[t._v("Get stats for all indexes.")]),t._v(" "),s("h5",{attrs:{id:"_3-1-2-1-path-parameters"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-path-parameters"}},[t._v("#")]),t._v(" 3.1.2.1. Path Parameters")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Parameter")]),t._v(" "),s("th",[t._v("Type")]),t._v(" "),s("th",[t._v("Required")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("code",[t._v("index_uid")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("true")])])])]),t._v(" "),s("h6",{attrs:{id:"_3-1-2-1-1-index-uid"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-1-index-uid"}},[t._v("#")]),t._v(" 3.1.2.1.1. "),s("code",[t._v("index_uid")])]),t._v(" "),s("ul",[s("li",[t._v("Type: String")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("Unique identifier of an index.")]),t._v(" "),s("h5",{attrs:{id:"_3-1-2-2-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-2-response-definition"}},[t._v("#")]),t._v(" 3.1.2.2. Response Definition")]),t._v(" "),s("p",[t._v("In addition to all fields returned by "),s("a",{attrs:{href:"#311-get---indexesindexuidstats"}},[t._v("3.1.1. "),s("code",[t._v("GET")]),t._v(" - "),s("code",[t._v("indexes/:index_uid/stats")])]),t._v(", this route returns the instance-level fields.")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Field")]),t._v(" "),s("th",[t._v("Type")]),t._v(" "),s("th",[t._v("Required")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("code",[t._v("databaseSize")])]),t._v(" "),s("td",[t._v("Integer")]),t._v(" "),s("td",[t._v("true")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("lastUpdate")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("true")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("indexes")])]),t._v(" "),s("td",[t._v("Object")]),t._v(" "),s("td",[t._v("true")])])])]),t._v(" "),s("h6",{attrs:{id:"_3-1-2-2-1-databasesize"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-2-1-databasesize"}},[t._v("#")]),t._v(" 3.1.2.2.1. "),s("code",[t._v("databaseSize")])]),t._v(" "),s("ul",[s("li",[t._v("Type: Integer")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("Size of the database in bytes. It represents the size on the disk of all the indexes.")]),t._v(" "),s("h6",{attrs:{id:"_3-1-2-2-2-lastupdate"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-2-2-lastupdate"}},[t._v("#")]),t._v(" 3.1.2.2.2. "),s("code",[t._v("lastUpdate")])]),t._v(" "),s("ul",[s("li",[t._v("Type: String")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("The last update date time when the index was updated.")]),t._v(" "),s("p",[t._v("Represented wih the RFC 3339 format.")]),t._v(" "),s("h6",{attrs:{id:"_3-1-2-2-3-indexes"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-2-3-indexes"}},[t._v("#")]),t._v(" 3.1.2.2.3. "),s("code",[t._v("indexes")])]),t._v(" "),s("ul",[s("li",[t._v("Type: Object")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("An object representing the statistics for each index found in the database.")]),t._v(" "),s("p",[t._v("e.g.")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"databaseSize"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("447819776")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"lastUpdate"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-11-15T11:15:22.092896Z"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexes"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"movies"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"numberOfDocuments"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19654")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"isIndexing"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"fieldDistribution"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"poster"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19654")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"overview"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19654")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19654")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19654")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"release_date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19654")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("See "),s("a",{attrs:{href:"#3113-response-definition"}},[t._v("3.1.1.3. Response Definition")]),t._v(" section for more details.")]),t._v(" "),s("h5",{attrs:{id:"_3-1-2-3-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-3-errors"}},[t._v("#")]),t._v(" 3.1.2.3. Errors")]),t._v(" "),s("ul",[s("li",[t._v("🔴 If the requested "),s("code",[t._v("index_uid")]),t._v(" does not exist, the API returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[t._v("index_not_found")]),t._v(" error.")],1)]),t._v(" "),s("h4",{attrs:{id:"_3-1-3-general-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-general-errors"}},[t._v("#")]),t._v(" 3.1.3. General Errors")]),t._v(" "),s("p",[t._v("These errors apply to all endpoints described here.")]),t._v(" "),s("h5",{attrs:{id:"_3-1-3-1-auth-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-1-auth-errors"}},[t._v("#")]),t._v(" 3.1.3.1 Auth Errors")]),t._v(" "),s("p",[t._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),t._v(" "),s("ul",[s("li",[t._v("🔴 Accessing this route without the "),s("code",[t._v("Authorization")]),t._v(" header returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),s("h2",{attrs:{id:"_4-technical-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[t._v("#")]),t._v(" 4. Technical Details")]),t._v(" "),s("p",[t._v("N/A")]),t._v(" "),s("h2",{attrs:{id:"_5-future-possibilities"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[t._v("#")]),t._v(" 5. Future Possibilities")]),t._v(" "),s("ul",[s("li",[t._v("Rename "),s("code",[t._v("lastUpdate")]),t._v(" to "),s("code",[t._v("updatedAt")])]),t._v(" "),s("li",[t._v("Reconsider the existence of "),s("code",[t._v("isIndexing")])])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[51],{474:function(t,e,s){"use strict";s.r(e);var a=s(62),r=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"stats-api"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#stats-api"}},[t._v("#")]),t._v(" Stats API")]),t._v(" "),s("h2",{attrs:{id:"_1-summary"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),s("p",[t._v("This specification describes the stats API endpoints.")]),t._v(" "),s("p",[t._v("Stats routes give information and metrics about indexes and the Meilisearch database.")]),t._v(" "),s("h2",{attrs:{id:"_2-motivation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),s("p",[t._v("N/A")]),t._v(" "),s("h2",{attrs:{id:"_3-functional-specification"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),s("h3",{attrs:{id:"_3-1-api-endpoints-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-api-endpoints-definition"}},[t._v("#")]),t._v(" 3.1. API Endpoints Definition")]),t._v(" "),s("p",[t._v("See statistics of Meilisearch indexes.")]),t._v(" "),s("ul",[s("li",[s("a",{attrs:{href:"#311-get---indexesindexuidstats"}},[t._v("3.1.1. "),s("code",[t._v("GET")]),t._v(" - "),s("code",[t._v("indexes/:index_uid/stats")])])]),t._v(" "),s("li",[s("a",{attrs:{href:"#312-get---stats"}},[t._v("3.1.2. "),s("code",[t._v("GET")]),t._v(" - "),s("code",[t._v("stats")])])])]),t._v(" "),s("h4",{attrs:{id:"_3-1-1-get-indexes-index-uid-stats"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-get-indexes-index-uid-stats"}},[t._v("#")]),t._v(" 3.1.1. "),s("code",[t._v("GET")]),t._v(" - "),s("code",[t._v("indexes/:index_uid/stats")])]),t._v(" "),s("p",[t._v("Get stats of an index.")]),t._v(" "),s("h5",{attrs:{id:"_3-1-1-1-path-parameters"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-path-parameters"}},[t._v("#")]),t._v(" 3.1.1.1. Path Parameters")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Parameters")]),t._v(" "),s("th",[t._v("Type")]),t._v(" "),s("th",[t._v("Required")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("code",[t._v("index_uid")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("true")])])])]),t._v(" "),s("h6",{attrs:{id:"_3-1-1-1-1-index-uid"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-1-index-uid"}},[t._v("#")]),t._v(" 3.1.1.1.1. "),s("code",[t._v("index_uid")])]),t._v(" "),s("ul",[s("li",[t._v("Type: String")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("Unique identifier of an index.")]),t._v(" "),s("h5",{attrs:{id:"_3-1-1-2-request-payload-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-request-payload-definition"}},[t._v("#")]),t._v(" 3.1.1.2. Request Payload Definition")]),t._v(" "),s("p",[t._v("N/A")]),t._v(" "),s("h5",{attrs:{id:"_3-1-1-3-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-response-definition"}},[t._v("#")]),t._v(" 3.1.1.3. Response Definition")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Field")]),t._v(" "),s("th",[t._v("Type")]),t._v(" "),s("th",[t._v("Required")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("code",[t._v("numberOfDocuments")])]),t._v(" "),s("td",[t._v("Integer")]),t._v(" "),s("td",[t._v("true")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("isIndexing")])]),t._v(" "),s("td",[t._v("Boolean")]),t._v(" "),s("td",[t._v("true")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("fieldDistribution")])]),t._v(" "),s("td",[t._v("Object")]),t._v(" "),s("td",[t._v("true")])])])]),t._v(" "),s("h6",{attrs:{id:"_3-1-1-3-1-numberofdocuments"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-1-numberofdocuments"}},[t._v("#")]),t._v(" 3.1.1.3.1. "),s("code",[t._v("numberOfDocuments")])]),t._v(" "),s("ul",[s("li",[t._v("Type: Integer")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("The total number of documents in the index.")]),t._v(" "),s("h6",{attrs:{id:"_3-1-1-3-2-isindexing"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-2-isindexing"}},[t._v("#")]),t._v(" 3.1.1.3.2. "),s("code",[t._v("isIndexing")])]),t._v(" "),s("ul",[s("li",[t._v("Type: Boolean")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("If true, it indicates that the index is processing documents.")]),t._v(" "),s("h6",{attrs:{id:"_3-1-1-3-3-fielddistribution"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-3-fielddistribution"}},[t._v("#")]),t._v(" 3.1.1.3.3. "),s("code",[t._v("fieldDistribution")])]),t._v(" "),s("ul",[s("li",[t._v("Type: Object")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("Lists every field in the index and the total number of documents in the index containing that field.")]),t._v(" "),s("p",[s("code",[t._v("fieldDistribution")]),t._v(" is not impacted by searchableAttributes or displayedAttributes. If one of the fields is not displayed or searchable, it will still be displayed in the "),s("code",[t._v("fieldDistribution")]),t._v(" object.")]),t._v(" "),s("h5",{attrs:{id:"_3-1-1-4-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-4-errors"}},[t._v("#")]),t._v(" 3.1.1.4. Errors")]),t._v(" "),s("ul",[s("li",[t._v("🔴 Sending an invalid index uid format for the "),s("code",[t._v(":index_uid")]),t._v(" path parameter returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[t._v("invalid_index_uid")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 If the requested "),s("code",[t._v("index_uid")]),t._v(" does not exist, the API returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[t._v("index_not_found")]),t._v(" error.")],1)]),t._v(" "),s("h4",{attrs:{id:"_3-1-2-get-stats"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-get-stats"}},[t._v("#")]),t._v(" 3.1.2. "),s("code",[t._v("GET")]),t._v(" - "),s("code",[t._v("stats")])]),t._v(" "),s("p",[t._v("Get stats for all indexes.")]),t._v(" "),s("h5",{attrs:{id:"_3-1-2-1-path-parameters"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-path-parameters"}},[t._v("#")]),t._v(" 3.1.2.1. Path Parameters")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Parameter")]),t._v(" "),s("th",[t._v("Type")]),t._v(" "),s("th",[t._v("Required")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("code",[t._v("index_uid")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("true")])])])]),t._v(" "),s("h6",{attrs:{id:"_3-1-2-1-1-index-uid"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-1-index-uid"}},[t._v("#")]),t._v(" 3.1.2.1.1. "),s("code",[t._v("index_uid")])]),t._v(" "),s("ul",[s("li",[t._v("Type: String")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("Unique identifier of an index.")]),t._v(" "),s("h5",{attrs:{id:"_3-1-2-2-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-2-response-definition"}},[t._v("#")]),t._v(" 3.1.2.2. Response Definition")]),t._v(" "),s("p",[t._v("In addition to all fields returned by "),s("a",{attrs:{href:"#311-get---indexesindexuidstats"}},[t._v("3.1.1. "),s("code",[t._v("GET")]),t._v(" - "),s("code",[t._v("indexes/:index_uid/stats")])]),t._v(", this route returns the instance-level fields.")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Field")]),t._v(" "),s("th",[t._v("Type")]),t._v(" "),s("th",[t._v("Required")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("code",[t._v("databaseSize")])]),t._v(" "),s("td",[t._v("Integer")]),t._v(" "),s("td",[t._v("true")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("lastUpdate")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("true")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("indexes")])]),t._v(" "),s("td",[t._v("Object")]),t._v(" "),s("td",[t._v("true")])])])]),t._v(" "),s("h6",{attrs:{id:"_3-1-2-2-1-databasesize"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-2-1-databasesize"}},[t._v("#")]),t._v(" 3.1.2.2.1. "),s("code",[t._v("databaseSize")])]),t._v(" "),s("ul",[s("li",[t._v("Type: Integer")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("Size of the database in bytes. It represents the size on the disk of all the indexes.")]),t._v(" "),s("h6",{attrs:{id:"_3-1-2-2-2-lastupdate"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-2-2-lastupdate"}},[t._v("#")]),t._v(" 3.1.2.2.2. "),s("code",[t._v("lastUpdate")])]),t._v(" "),s("ul",[s("li",[t._v("Type: String")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("The last update date time when the index was updated.")]),t._v(" "),s("p",[t._v("Represented wih the RFC 3339 format.")]),t._v(" "),s("h6",{attrs:{id:"_3-1-2-2-3-indexes"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-2-3-indexes"}},[t._v("#")]),t._v(" 3.1.2.2.3. "),s("code",[t._v("indexes")])]),t._v(" "),s("ul",[s("li",[t._v("Type: Object")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("An object representing the statistics for each index found in the database.")]),t._v(" "),s("p",[t._v("e.g.")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"databaseSize"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("447819776")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"lastUpdate"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-11-15T11:15:22.092896Z"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexes"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"movies"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"numberOfDocuments"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19654")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"isIndexing"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"fieldDistribution"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"poster"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19654")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"overview"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19654")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19654")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19654")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"release_date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19654")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("See "),s("a",{attrs:{href:"#3113-response-definition"}},[t._v("3.1.1.3. Response Definition")]),t._v(" section for more details.")]),t._v(" "),s("h5",{attrs:{id:"_3-1-2-3-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-3-errors"}},[t._v("#")]),t._v(" 3.1.2.3. Errors")]),t._v(" "),s("ul",[s("li",[t._v("🔴 If the requested "),s("code",[t._v("index_uid")]),t._v(" does not exist, the API returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[t._v("index_not_found")]),t._v(" error.")],1)]),t._v(" "),s("h4",{attrs:{id:"_3-1-3-general-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-general-errors"}},[t._v("#")]),t._v(" 3.1.3. General Errors")]),t._v(" "),s("p",[t._v("These errors apply to all endpoints described here.")]),t._v(" "),s("h5",{attrs:{id:"_3-1-3-1-auth-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-1-auth-errors"}},[t._v("#")]),t._v(" 3.1.3.1 Auth Errors")]),t._v(" "),s("p",[t._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),t._v(" "),s("ul",[s("li",[t._v("🔴 Accessing this route without the "),s("code",[t._v("Authorization")]),t._v(" header returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),s("h2",{attrs:{id:"_4-technical-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[t._v("#")]),t._v(" 4. Technical Details")]),t._v(" "),s("p",[t._v("N/A")]),t._v(" "),s("h2",{attrs:{id:"_5-future-possibilities"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[t._v("#")]),t._v(" 5. Future Possibilities")]),t._v(" "),s("ul",[s("li",[t._v("Rename "),s("code",[t._v("lastUpdate")]),t._v(" to "),s("code",[t._v("updatedAt")])]),t._v(" "),s("li",[t._v("Reconsider the existence of "),s("code",[t._v("isIndexing")])])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/52.0681cb16.js b/docs/assets/js/52.55ac3382.js similarity index 99% rename from docs/assets/js/52.0681cb16.js rename to docs/assets/js/52.55ac3382.js index 4314bd8b6..279037526 100644 --- a/docs/assets/js/52.0681cb16.js +++ b/docs/assets/js/52.55ac3382.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[52],{478:function(t,s,a){"use strict";a.r(s);var e=a(62),n=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("ul",[a("li",[t._v("Title: Indexing JSON")]),t._v(" "),a("li",[t._v("Start Date: 2022-08-16")]),t._v(" "),a("li",[t._v("Specification PR: "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/167",target:"_blank",rel:"noopener noreferrer"}},[t._v("PR-#167"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("Discovery Issue: n/a")])]),t._v(" "),a("h1",{attrs:{id:"indexing-json"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#indexing-json"}},[t._v("#")]),t._v(" Indexing JSON")]),t._v(" "),a("h2",{attrs:{id:"_1-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-functional-specification"}},[t._v("#")]),t._v(" 1. Functional Specification")]),t._v(" "),a("h3",{attrs:{id:"i-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#i-summary"}},[t._v("#")]),t._v(" I. Summary")]),t._v(" "),a("p",[t._v("To index documents, the body of the add documents request has to match a specific format. That specific format is then parsed and tokenized inside MeiliSearch. After which, the documents added are in the pool of searchable and returnable documents.")]),t._v(" "),a("p",[t._v("A "),a("a",{attrs:{href:"http://json.org/",target:"_blank",rel:"noopener noreferrer"}},[t._v("JSON"),a("OutboundLink")],1),t._v(" data format is easier to use than a CSV format because it propose a convenient format for storing structured data.\nWhen indexing multiple documents you should prefer using "),a("RouterLink",{attrs:{to:"/specifications/text/0028-indexing-ndjson.html"}},[t._v("ndjson")]),t._v(". It's faster and more concise.")],1),t._v(" "),a("h4",{attrs:{id:"summary-key-points"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#summary-key-points"}},[t._v("#")]),t._v(" Summary Key Points")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("application/json")]),t._v(" Content-Type header is now supported.")]),t._v(" "),a("li",[t._v("The error cases have been strengthened and completed. See Errors part.")])]),t._v(" "),a("h3",{attrs:{id:"ii-explanation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ii-explanation"}},[t._v("#")]),t._v(" II. Explanation")]),t._v(" "),a("ul",[a("li",[t._v("Meilisearch accept an array of documents")]),t._v(" "),a("li",[t._v("Or a single document.")]),t._v(" "),a("li",[t._v("The data should be encoded in UTF-8.")])]),t._v(" "),a("h4",{attrs:{id:"example-of-a-valid-json"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-of-a-valid-json"}},[t._v("#")]),t._v(" Example of a valid JSON")]),t._v(" "),a("p",[t._v('To send the following documents;\n\'\'\'\n{"id":1, "label": "t-shirt", "colors": ["red", "green", "blue"]}\n{"id":499, "label": "hoodie", "colors": ["purple"]}\n\'\'\'')]),t._v(" "),a("p",[t._v("You can send them in an array like that;")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t-shirt"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"blue"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("499")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"hoodie"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"purple"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("You also have the possibility to format the json however you like. Here is another way to send the two same documents;")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t-shirt"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"blue"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("499")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"hoodie"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"purple"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Or you could two requests to send the documents directly;")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t-shirt"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"blue"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("And")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("499")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"hoodie"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"purple"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("For example.")]),t._v(" "),a("p",[t._v("/!\\ Be cautious though, if you send the two documents in a single request like that for example;")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t-shirt"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"blue"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("499")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"hoodie"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"purple"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Meilisearch will only index the first document and "),a("strong",[t._v("won't")]),t._v(" throw an error.")]),t._v(" "),a("h4",{attrs:{id:"api-endpoints"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#api-endpoints"}},[t._v("#")]),t._v(" API Endpoints")]),t._v(" "),a("blockquote",[a("p",[t._v("Each API endpoints mentioned above will now require a "),a("code",[t._v("application/json")]),t._v(" as "),a("code",[t._v("Content-Type")]),t._v(" header to be processed as JSON data.")])]),t._v(" "),a("p",[a("strong",[t._v("As a developer, I want to upload a JSON payload of documents so that end-user can search them")])]),t._v(" "),a("p",[a("strong",[t._v("POST documents")]),t._v(" "),a("code",[t._v("/indexes/:indexUid/documents")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("curl")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n -X POST "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'http://localhost:7700/indexes/movies/documents'")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n -H "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Content-Type: application/json'")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n --data-binary "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('\'\n [{"id":1, "label": "t-shirt", "price": 4.99, "colors": ["red", "green", "blue"]},{"id":499, "label": "hoodie", "price": 19.99, "colors": ["purple"]}]\'')]),t._v("\n")])])]),a("blockquote",[a("p",[t._v("202 Accepted - Response")])]),t._v(" "),a("p",[a("strong",[t._v("PUT documents")]),t._v(" "),a("code",[t._v("/indexes/:indexUid/documents")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("curl")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n -X PUT "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'http://localhost:7700/indexes/movies/documents'")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n -H "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Content-Type: application/json'")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n --data-binary "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('\'\n [{"id":1, "label": "t-shirt", "price": 4.99, "colors": ["red", "green", "blue"]},{"id":499, "label": "hoodie", "price": 19.99, "colors": ["purple"]}]\'')]),t._v("\n")])])]),a("blockquote",[a("p",[t._v("202 Accepted - Response")])]),t._v(" "),a("h5",{attrs:{id:"errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#errors"}},[t._v("#")]),t._v(" Errors")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Omitted "),a("code",[t._v("Content-Type")]),t._v(" header will lead to a 415 Unsupported Media Type - "),a("strong",[t._v("missing_content_type")]),t._v(" error code.")]),t._v(" "),a("li",[t._v("🔴 Sending an empty "),a("code",[t._v("Content-Type")]),t._v(" will lead to a 415 Unsupported Media Type - "),a("strong",[t._v("invalid_content_type")]),t._v(" error code.")]),t._v(" "),a("li",[t._v("🔴 Sending a different "),a("code",[t._v("Content-Type")]),t._v(" than "),a("code",[t._v("application/json")]),t._v(", "),a("code",[t._v("application/x-ndjson")]),t._v(" or "),a("code",[t._v("text/csv")]),t._v(" will lead to 415 Unsupported Media Type "),a("strong",[t._v("invalid_content_type")]),t._v(" error code.")]),t._v(" "),a("li",[t._v("🔴 Sending an empty payload will lead to a 400 Bad Request - "),a("strong",[t._v("missing_payload")]),t._v(" error code.")]),t._v(" "),a("li",[t._v("🔴 Sending a different payload type than the "),a("code",[t._v("Content-Type")]),t._v(" header should return a 400 Bad Request - "),a("strong",[t._v("malformed_payload")]),t._v(" error code.")]),t._v(" "),a("li",[t._v("🔴 Sending a payload excessing the limit will lead to a 413 Payload Too Large - "),a("strong",[t._v("payload_too_large")]),t._v(" error code.")]),t._v(" "),a("li",[t._v("🔴 Sending an invalid json format will lead to a 400 bad_request - "),a("strong",[t._v("malformed_payload")]),t._v(" error code.")])]),t._v(" "),a("h5",{attrs:{id:"errors-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#errors-definition"}},[t._v("#")]),t._v(" Errors Definition")]),t._v(" "),a("h2",{attrs:{id:"missing-content-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-content-type"}},[t._v("#")]),t._v(" missing_content_type")]),t._v(" "),a("h3",{attrs:{id:"context"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the Content-Type header is missing.")]),t._v(" "),a("h3",{attrs:{id:"error-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("415 Unsupported Media Type")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"A Content-Type header is missing. Accepted values for the Content-Type header are: :contentTypeList"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_content_type"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_content_type"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[t._v("The "),a("code",[t._v(":contentTypeList")]),t._v(" is inferred when the message is generated. The values are separated by a "),a("code",[t._v(",")]),t._v(" char. e.g. "),a("code",[t._v("application/json")]),t._v(", "),a("code",[t._v("text/csv")]),t._v(".")])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-content-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-content-type"}},[t._v("#")]),t._v(" invalid_content_type")]),t._v(" "),a("h3",{attrs:{id:"context-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-2"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the provided content-type is not handled by the API method.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-2"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("415 Unsupported Media Type")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Content-Type :contentType is invalid. Accepted values for the Content-Type header are: :contentTypeList"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_content_type"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_content_type"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[t._v("The "),a("code",[t._v(":contentTypeList")]),t._v(" is inferred when the message is generated. The values are separated by a "),a("code",[t._v(",")]),t._v(" char. e.g. "),a("code",[t._v("application/json")]),t._v(", "),a("code",[t._v("text/csv")]),t._v(".")])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-payload"}},[t._v("#")]),t._v(" missing_payload")]),t._v(" "),a("h3",{attrs:{id:"context-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-3"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the client does not provide a mandatory payload to the request.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-3"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"A :payloadType payload is missing."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_payload"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_payload"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[t._v("The "),a("code",[t._v(":payloadType")]),t._v(" is inferred when the message is generated. e.g. "),a("code",[t._v("json")]),t._v(", "),a("code",[t._v("ndjson")]),t._v(", "),a("code",[t._v("csv")])])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"malformed-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#malformed-payload"}},[t._v("#")]),t._v(" malformed_payload")]),t._v(" "),a("h3",{attrs:{id:"context-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-4"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the format sent in the payload is malformed. The payload contains a syntax error.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-4"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The :payloadType payload provided is malformed. :syntaxErrorHelper."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"malformed_payload"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#malformed_payload"')]),t._v("\n")])])]),a("ul",[a("li",[t._v("The "),a("code",[t._v(":payloadType")]),t._v(" is inferred when the message is generated. e.g. "),a("code",[t._v("json")]),t._v(", "),a("code",[t._v("ndjson")]),t._v(", "),a("code",[t._v("csv")])]),t._v(" "),a("li",[t._v("The "),a("code",[t._v(":syntaxErrorHelper")]),t._v(" is inferred when the message is generated.")])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"_2-technical-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-details"}},[t._v("#")]),t._v(" 2. Technical details")]),t._v(" "),a("p",[t._v("n/a")]),t._v(" "),a("h2",{attrs:{id:"_3-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[t._v("#")]),t._v(" 3. Future possibilities")]),t._v(" "),a("ul",[a("li",[t._v("Throw an error when there is multiple documents in the payload but not in an array.")])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[52],{475:function(t,s,a){"use strict";a.r(s);var e=a(62),n=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("ul",[a("li",[t._v("Title: Indexing JSON")]),t._v(" "),a("li",[t._v("Start Date: 2022-08-16")]),t._v(" "),a("li",[t._v("Specification PR: "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/167",target:"_blank",rel:"noopener noreferrer"}},[t._v("PR-#167"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("Discovery Issue: n/a")])]),t._v(" "),a("h1",{attrs:{id:"indexing-json"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#indexing-json"}},[t._v("#")]),t._v(" Indexing JSON")]),t._v(" "),a("h2",{attrs:{id:"_1-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-functional-specification"}},[t._v("#")]),t._v(" 1. Functional Specification")]),t._v(" "),a("h3",{attrs:{id:"i-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#i-summary"}},[t._v("#")]),t._v(" I. Summary")]),t._v(" "),a("p",[t._v("To index documents, the body of the add documents request has to match a specific format. That specific format is then parsed and tokenized inside MeiliSearch. After which, the documents added are in the pool of searchable and returnable documents.")]),t._v(" "),a("p",[t._v("A "),a("a",{attrs:{href:"http://json.org/",target:"_blank",rel:"noopener noreferrer"}},[t._v("JSON"),a("OutboundLink")],1),t._v(" data format is easier to use than a CSV format because it propose a convenient format for storing structured data.\nWhen indexing multiple documents you should prefer using "),a("RouterLink",{attrs:{to:"/specifications/text/0028-indexing-ndjson.html"}},[t._v("ndjson")]),t._v(". It's faster and more concise.")],1),t._v(" "),a("h4",{attrs:{id:"summary-key-points"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#summary-key-points"}},[t._v("#")]),t._v(" Summary Key Points")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("application/json")]),t._v(" Content-Type header is now supported.")]),t._v(" "),a("li",[t._v("The error cases have been strengthened and completed. See Errors part.")])]),t._v(" "),a("h3",{attrs:{id:"ii-explanation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ii-explanation"}},[t._v("#")]),t._v(" II. Explanation")]),t._v(" "),a("ul",[a("li",[t._v("Meilisearch accept an array of documents")]),t._v(" "),a("li",[t._v("Or a single document.")]),t._v(" "),a("li",[t._v("The data should be encoded in UTF-8.")])]),t._v(" "),a("h4",{attrs:{id:"example-of-a-valid-json"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-of-a-valid-json"}},[t._v("#")]),t._v(" Example of a valid JSON")]),t._v(" "),a("p",[t._v('To send the following documents;\n\'\'\'\n{"id":1, "label": "t-shirt", "colors": ["red", "green", "blue"]}\n{"id":499, "label": "hoodie", "colors": ["purple"]}\n\'\'\'')]),t._v(" "),a("p",[t._v("You can send them in an array like that;")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t-shirt"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"blue"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("499")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"hoodie"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"purple"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("You also have the possibility to format the json however you like. Here is another way to send the two same documents;")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t-shirt"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"blue"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("499")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"hoodie"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"purple"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Or you could two requests to send the documents directly;")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t-shirt"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"blue"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("And")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("499")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"hoodie"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"purple"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("For example.")]),t._v(" "),a("p",[t._v("/!\\ Be cautious though, if you send the two documents in a single request like that for example;")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t-shirt"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"blue"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("499")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"hoodie"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"purple"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Meilisearch will only index the first document and "),a("strong",[t._v("won't")]),t._v(" throw an error.")]),t._v(" "),a("h4",{attrs:{id:"api-endpoints"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#api-endpoints"}},[t._v("#")]),t._v(" API Endpoints")]),t._v(" "),a("blockquote",[a("p",[t._v("Each API endpoints mentioned above will now require a "),a("code",[t._v("application/json")]),t._v(" as "),a("code",[t._v("Content-Type")]),t._v(" header to be processed as JSON data.")])]),t._v(" "),a("p",[a("strong",[t._v("As a developer, I want to upload a JSON payload of documents so that end-user can search them")])]),t._v(" "),a("p",[a("strong",[t._v("POST documents")]),t._v(" "),a("code",[t._v("/indexes/:indexUid/documents")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("curl")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n -X POST "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'http://localhost:7700/indexes/movies/documents'")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n -H "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Content-Type: application/json'")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n --data-binary "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('\'\n [{"id":1, "label": "t-shirt", "price": 4.99, "colors": ["red", "green", "blue"]},{"id":499, "label": "hoodie", "price": 19.99, "colors": ["purple"]}]\'')]),t._v("\n")])])]),a("blockquote",[a("p",[t._v("202 Accepted - Response")])]),t._v(" "),a("p",[a("strong",[t._v("PUT documents")]),t._v(" "),a("code",[t._v("/indexes/:indexUid/documents")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("curl")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n -X PUT "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'http://localhost:7700/indexes/movies/documents'")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n -H "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Content-Type: application/json'")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n --data-binary "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('\'\n [{"id":1, "label": "t-shirt", "price": 4.99, "colors": ["red", "green", "blue"]},{"id":499, "label": "hoodie", "price": 19.99, "colors": ["purple"]}]\'')]),t._v("\n")])])]),a("blockquote",[a("p",[t._v("202 Accepted - Response")])]),t._v(" "),a("h5",{attrs:{id:"errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#errors"}},[t._v("#")]),t._v(" Errors")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Omitted "),a("code",[t._v("Content-Type")]),t._v(" header will lead to a 415 Unsupported Media Type - "),a("strong",[t._v("missing_content_type")]),t._v(" error code.")]),t._v(" "),a("li",[t._v("🔴 Sending an empty "),a("code",[t._v("Content-Type")]),t._v(" will lead to a 415 Unsupported Media Type - "),a("strong",[t._v("invalid_content_type")]),t._v(" error code.")]),t._v(" "),a("li",[t._v("🔴 Sending a different "),a("code",[t._v("Content-Type")]),t._v(" than "),a("code",[t._v("application/json")]),t._v(", "),a("code",[t._v("application/x-ndjson")]),t._v(" or "),a("code",[t._v("text/csv")]),t._v(" will lead to 415 Unsupported Media Type "),a("strong",[t._v("invalid_content_type")]),t._v(" error code.")]),t._v(" "),a("li",[t._v("🔴 Sending an empty payload will lead to a 400 Bad Request - "),a("strong",[t._v("missing_payload")]),t._v(" error code.")]),t._v(" "),a("li",[t._v("🔴 Sending a different payload type than the "),a("code",[t._v("Content-Type")]),t._v(" header should return a 400 Bad Request - "),a("strong",[t._v("malformed_payload")]),t._v(" error code.")]),t._v(" "),a("li",[t._v("🔴 Sending a payload excessing the limit will lead to a 413 Payload Too Large - "),a("strong",[t._v("payload_too_large")]),t._v(" error code.")]),t._v(" "),a("li",[t._v("🔴 Sending an invalid json format will lead to a 400 bad_request - "),a("strong",[t._v("malformed_payload")]),t._v(" error code.")])]),t._v(" "),a("h5",{attrs:{id:"errors-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#errors-definition"}},[t._v("#")]),t._v(" Errors Definition")]),t._v(" "),a("h2",{attrs:{id:"missing-content-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-content-type"}},[t._v("#")]),t._v(" missing_content_type")]),t._v(" "),a("h3",{attrs:{id:"context"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the Content-Type header is missing.")]),t._v(" "),a("h3",{attrs:{id:"error-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("415 Unsupported Media Type")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"A Content-Type header is missing. Accepted values for the Content-Type header are: :contentTypeList"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_content_type"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_content_type"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[t._v("The "),a("code",[t._v(":contentTypeList")]),t._v(" is inferred when the message is generated. The values are separated by a "),a("code",[t._v(",")]),t._v(" char. e.g. "),a("code",[t._v("application/json")]),t._v(", "),a("code",[t._v("text/csv")]),t._v(".")])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-content-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-content-type"}},[t._v("#")]),t._v(" invalid_content_type")]),t._v(" "),a("h3",{attrs:{id:"context-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-2"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the provided content-type is not handled by the API method.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-2"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("415 Unsupported Media Type")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Content-Type :contentType is invalid. Accepted values for the Content-Type header are: :contentTypeList"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_content_type"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_content_type"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[t._v("The "),a("code",[t._v(":contentTypeList")]),t._v(" is inferred when the message is generated. The values are separated by a "),a("code",[t._v(",")]),t._v(" char. e.g. "),a("code",[t._v("application/json")]),t._v(", "),a("code",[t._v("text/csv")]),t._v(".")])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-payload"}},[t._v("#")]),t._v(" missing_payload")]),t._v(" "),a("h3",{attrs:{id:"context-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-3"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the client does not provide a mandatory payload to the request.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-3"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"A :payloadType payload is missing."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_payload"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_payload"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[t._v("The "),a("code",[t._v(":payloadType")]),t._v(" is inferred when the message is generated. e.g. "),a("code",[t._v("json")]),t._v(", "),a("code",[t._v("ndjson")]),t._v(", "),a("code",[t._v("csv")])])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"malformed-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#malformed-payload"}},[t._v("#")]),t._v(" malformed_payload")]),t._v(" "),a("h3",{attrs:{id:"context-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-4"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the format sent in the payload is malformed. The payload contains a syntax error.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-4"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The :payloadType payload provided is malformed. :syntaxErrorHelper."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"malformed_payload"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#malformed_payload"')]),t._v("\n")])])]),a("ul",[a("li",[t._v("The "),a("code",[t._v(":payloadType")]),t._v(" is inferred when the message is generated. e.g. "),a("code",[t._v("json")]),t._v(", "),a("code",[t._v("ndjson")]),t._v(", "),a("code",[t._v("csv")])]),t._v(" "),a("li",[t._v("The "),a("code",[t._v(":syntaxErrorHelper")]),t._v(" is inferred when the message is generated.")])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"_2-technical-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-details"}},[t._v("#")]),t._v(" 2. Technical details")]),t._v(" "),a("p",[t._v("n/a")]),t._v(" "),a("h2",{attrs:{id:"_3-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[t._v("#")]),t._v(" 3. Future possibilities")]),t._v(" "),a("ul",[a("li",[t._v("Throw an error when there is multiple documents in the payload but not in an array.")])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/54.36756f53.js b/docs/assets/js/54.70550584.js similarity index 99% rename from docs/assets/js/54.36756f53.js rename to docs/assets/js/54.70550584.js index 499793531..d6aa82aee 100644 --- a/docs/assets/js/54.36756f53.js +++ b/docs/assets/js/54.70550584.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[54],{477:function(t,e,r){"use strict";r.r(e);var a=r(62),s=Object(a.a)({},(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[r("h1",{attrs:{id:"version-api"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#version-api"}},[t._v("#")]),t._v(" Version API")]),t._v(" "),r("h2",{attrs:{id:"_1-summary"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),r("p",[t._v("This specification describes the version API endpoint. The "),r("code",[t._v("/version")]),t._v(" route allows to check the version of a running Meilisearch instance.")]),t._v(" "),r("h2",{attrs:{id:"_2-motivation"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),r("p",[t._v("Since users don't always have SSH access at hand, it can be useful to give information about the version concerned when they encounter a bug or a problem.")]),t._v(" "),r("h2",{attrs:{id:"_3-functional-specification"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),r("h3",{attrs:{id:"_3-1-version-api-resource-properties"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-version-api-resource-properties"}},[t._v("#")]),t._v(" 3.1. "),r("code",[t._v("version")]),t._v(" API resource properties")]),t._v(" "),r("table",[r("thead",[r("tr",[r("th",[t._v("Field")]),t._v(" "),r("th",[t._v("Type")]),t._v(" "),r("th",[t._v("Required")])])]),t._v(" "),r("tbody",[r("tr",[r("td",[r("a",{attrs:{href:"#311-commitSha"}},[t._v("commitSha")])]),t._v(" "),r("td",[t._v("String")]),t._v(" "),r("td",[t._v("True")])]),t._v(" "),r("tr",[r("td",[r("a",{attrs:{href:"#312-commitDate"}},[t._v("commitDate")])]),t._v(" "),r("td",[t._v("String")]),t._v(" "),r("td",[t._v("True")])]),t._v(" "),r("tr",[r("td",[r("a",{attrs:{href:"#313-pkgVersion"}},[t._v("pkgVersion")])]),t._v(" "),r("td",[t._v("String")]),t._v(" "),r("td",[t._v("True")])])])]),t._v(" "),r("h4",{attrs:{id:"_3-1-1-commitsha"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-commitsha"}},[t._v("#")]),t._v(" 3.1.1. "),r("code",[t._v("commitSHa")])]),t._v(" "),r("ul",[r("li",[t._v("Type: String")]),t._v(" "),r("li",[t._v("Required: True")])]),t._v(" "),r("p",[t._v("The git commit identifier that tagged this release version number.")]),t._v(" "),r("h4",{attrs:{id:"_3-1-2-commitdate"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-commitdate"}},[t._v("#")]),t._v(" 3.1.2. "),r("code",[t._v("commitDate")])]),t._v(" "),r("ul",[r("li",[t._v("Type: String")]),t._v(" "),r("li",[t._v("Required: True")])]),t._v(" "),r("p",[t._v("The date when the version tag has been created.")]),t._v(" "),r("h4",{attrs:{id:"_3-1-3-pkgversion"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-pkgversion"}},[t._v("#")]),t._v(" 3.1.3. "),r("code",[t._v("pkgVersion")])]),t._v(" "),r("ul",[r("li",[t._v("Type: String")]),t._v(" "),r("li",[t._v("Required: True")])]),t._v(" "),r("p",[t._v("The Meilisearch binary version number.")]),t._v(" "),r("h2",{attrs:{id:"_3-2-api-endpoints-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-api-endpoints-definition"}},[t._v("#")]),t._v(" 3.2. API Endpoints Definition")]),t._v(" "),r("h3",{attrs:{id:"_3-2-1-get-version"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-get-version"}},[t._v("#")]),t._v(" 3.2.1. "),r("code",[t._v("GET")]),t._v(" - "),r("code",[t._v("version")])]),t._v(" "),r("p",[t._v("Retrieves the version information of the Meilisearch binary.")]),t._v(" "),r("p",[r("code",[t._v("200")]),t._v(" - Response body")]),t._v(" "),r("div",{staticClass:"language-json extra-class"},[r("pre",{pre:!0,attrs:{class:"language-json"}},[r("code",[t._v(" "),r("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[t._v('"commitSha"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),r("span",{pre:!0,attrs:{class:"token string"}},[t._v('"b46889b5f0f2f8b91438a08a358ba8f05fc09fc1"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[t._v('"commitDate"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),r("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-11-15T09:51:54.278247+00:00"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pkgVersion"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),r("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0.1.1"')]),t._v("\n "),r("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),r("p",[t._v("All properties must be returned when the resource is retrieved.")]),t._v(" "),r("h3",{attrs:{id:"_3-2-2-general-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-general-errors"}},[t._v("#")]),t._v(" 3.2.2. General Errors")]),t._v(" "),r("p",[t._v("These errors apply to all endpoints described here.")]),t._v(" "),r("h4",{attrs:{id:"_3-2-2-1-auth-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-auth-errors"}},[t._v("#")]),t._v(" 3.2.2.1. Auth Errors")]),t._v(" "),r("p",[t._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),t._v(" "),r("ul",[r("li",[t._v("🔴 Accessing this route without the "),r("code",[t._v("Authorization")]),t._v(" header returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),r("li",[t._v("🔴 Accessing this route with a key that does not have the "),r("code",[t._v("version")]),t._v(" action as a permission returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),r("h2",{attrs:{id:"_2-technical-details"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-details"}},[t._v("#")]),t._v(" 2. Technical Details")]),t._v(" "),r("p",[t._v("n/a")]),t._v(" "),r("h2",{attrs:{id:"_3-future-possibilities"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[t._v("#")]),t._v(" 3. Future Possibilities")]),t._v(" "),r("p",[t._v("n/a")])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[54],{478:function(t,e,r){"use strict";r.r(e);var a=r(62),s=Object(a.a)({},(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[r("h1",{attrs:{id:"version-api"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#version-api"}},[t._v("#")]),t._v(" Version API")]),t._v(" "),r("h2",{attrs:{id:"_1-summary"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),r("p",[t._v("This specification describes the version API endpoint. The "),r("code",[t._v("/version")]),t._v(" route allows to check the version of a running Meilisearch instance.")]),t._v(" "),r("h2",{attrs:{id:"_2-motivation"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),r("p",[t._v("Since users don't always have SSH access at hand, it can be useful to give information about the version concerned when they encounter a bug or a problem.")]),t._v(" "),r("h2",{attrs:{id:"_3-functional-specification"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),r("h3",{attrs:{id:"_3-1-version-api-resource-properties"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-version-api-resource-properties"}},[t._v("#")]),t._v(" 3.1. "),r("code",[t._v("version")]),t._v(" API resource properties")]),t._v(" "),r("table",[r("thead",[r("tr",[r("th",[t._v("Field")]),t._v(" "),r("th",[t._v("Type")]),t._v(" "),r("th",[t._v("Required")])])]),t._v(" "),r("tbody",[r("tr",[r("td",[r("a",{attrs:{href:"#311-commitSha"}},[t._v("commitSha")])]),t._v(" "),r("td",[t._v("String")]),t._v(" "),r("td",[t._v("True")])]),t._v(" "),r("tr",[r("td",[r("a",{attrs:{href:"#312-commitDate"}},[t._v("commitDate")])]),t._v(" "),r("td",[t._v("String")]),t._v(" "),r("td",[t._v("True")])]),t._v(" "),r("tr",[r("td",[r("a",{attrs:{href:"#313-pkgVersion"}},[t._v("pkgVersion")])]),t._v(" "),r("td",[t._v("String")]),t._v(" "),r("td",[t._v("True")])])])]),t._v(" "),r("h4",{attrs:{id:"_3-1-1-commitsha"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-commitsha"}},[t._v("#")]),t._v(" 3.1.1. "),r("code",[t._v("commitSHa")])]),t._v(" "),r("ul",[r("li",[t._v("Type: String")]),t._v(" "),r("li",[t._v("Required: True")])]),t._v(" "),r("p",[t._v("The git commit identifier that tagged this release version number.")]),t._v(" "),r("h4",{attrs:{id:"_3-1-2-commitdate"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-commitdate"}},[t._v("#")]),t._v(" 3.1.2. "),r("code",[t._v("commitDate")])]),t._v(" "),r("ul",[r("li",[t._v("Type: String")]),t._v(" "),r("li",[t._v("Required: True")])]),t._v(" "),r("p",[t._v("The date when the version tag has been created.")]),t._v(" "),r("h4",{attrs:{id:"_3-1-3-pkgversion"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-pkgversion"}},[t._v("#")]),t._v(" 3.1.3. "),r("code",[t._v("pkgVersion")])]),t._v(" "),r("ul",[r("li",[t._v("Type: String")]),t._v(" "),r("li",[t._v("Required: True")])]),t._v(" "),r("p",[t._v("The Meilisearch binary version number.")]),t._v(" "),r("h2",{attrs:{id:"_3-2-api-endpoints-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-api-endpoints-definition"}},[t._v("#")]),t._v(" 3.2. API Endpoints Definition")]),t._v(" "),r("h3",{attrs:{id:"_3-2-1-get-version"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-get-version"}},[t._v("#")]),t._v(" 3.2.1. "),r("code",[t._v("GET")]),t._v(" - "),r("code",[t._v("version")])]),t._v(" "),r("p",[t._v("Retrieves the version information of the Meilisearch binary.")]),t._v(" "),r("p",[r("code",[t._v("200")]),t._v(" - Response body")]),t._v(" "),r("div",{staticClass:"language-json extra-class"},[r("pre",{pre:!0,attrs:{class:"language-json"}},[r("code",[t._v(" "),r("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[t._v('"commitSha"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),r("span",{pre:!0,attrs:{class:"token string"}},[t._v('"b46889b5f0f2f8b91438a08a358ba8f05fc09fc1"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[t._v('"commitDate"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),r("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-11-15T09:51:54.278247+00:00"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pkgVersion"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),r("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0.1.1"')]),t._v("\n "),r("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),r("p",[t._v("All properties must be returned when the resource is retrieved.")]),t._v(" "),r("h3",{attrs:{id:"_3-2-2-general-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-general-errors"}},[t._v("#")]),t._v(" 3.2.2. General Errors")]),t._v(" "),r("p",[t._v("These errors apply to all endpoints described here.")]),t._v(" "),r("h4",{attrs:{id:"_3-2-2-1-auth-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-auth-errors"}},[t._v("#")]),t._v(" 3.2.2.1. Auth Errors")]),t._v(" "),r("p",[t._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),t._v(" "),r("ul",[r("li",[t._v("🔴 Accessing this route without the "),r("code",[t._v("Authorization")]),t._v(" header returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),r("li",[t._v("🔴 Accessing this route with a key that does not have the "),r("code",[t._v("version")]),t._v(" action as a permission returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),r("h2",{attrs:{id:"_2-technical-details"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-details"}},[t._v("#")]),t._v(" 2. Technical Details")]),t._v(" "),r("p",[t._v("n/a")]),t._v(" "),r("h2",{attrs:{id:"_3-future-possibilities"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[t._v("#")]),t._v(" 3. Future Possibilities")]),t._v(" "),r("p",[t._v("n/a")])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/59.a3757b9e.js b/docs/assets/js/59.d39ab2af.js similarity index 99% rename from docs/assets/js/59.a3757b9e.js rename to docs/assets/js/59.d39ab2af.js index 2d79f3b8d..da33011af 100644 --- a/docs/assets/js/59.a3757b9e.js +++ b/docs/assets/js/59.d39ab2af.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[59],{483:function(e,t,a){"use strict";a.r(t);var n=a(62),s=Object(n.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"swap-indexes-api"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#swap-indexes-api"}},[e._v("#")]),e._v(" Swap Indexes API")]),e._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("The swap indexes API allows to atomically deploy several new versions of indexes without any downtime for the search clients.")]),e._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[e._v("It's critical to deploy a new version of an index without any downtimes to the search clients. This capability improves the development experience by allowing Meilisearch to better fit into their workflow.")]),e._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("h3",{attrs:{id:"_3-1-0-downtime-deployment-workflow"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-0-downtime-deployment-workflow"}},[e._v("#")]),e._v(" 3.1. 0 downtime deployment workflow")]),e._v(" "),a("p",[e._v("A 0 downtime deployment looks like this:")]),e._v(" "),a("ol",[a("li",[e._v("Search clients search on "),a("code",[e._v("indexA")]),e._v(".")]),e._v(" "),a("li",[e._v("The developer builds a new index "),a("code",[e._v("indexB")]),e._v(" representing the new index version to deploy to the search clients.")]),e._v(" "),a("li",[e._v("When "),a("code",[e._v("indexB")]),e._v(" is built and ready to be deployed, the developer sends an indexes swap request to Meilisearch for "),a("code",[e._v("indexA")]),e._v(" and "),a("code",[e._v("indexB")]),e._v(".")]),e._v(" "),a("li",[a("code",[e._v("indexB")]),e._v(" documents, settings and tasks are swapped with "),a("code",[e._v("indexA")]),e._v(".")]),e._v(" "),a("li",[e._v("Search clients search on the updated "),a("code",[e._v("indexA")]),e._v(" without experiencing any downtime.")])]),e._v(" "),a("h3",{attrs:{id:"_3-2-deploying-multiple-new-indexes-versions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-deploying-multiple-new-indexes-versions"}},[e._v("#")]),e._v(" 3.2. Deploying Multiple New Indexes Versions")]),e._v(" "),a("p",[e._v("The swap API supports multiple swap operations in an atomic fashion.")]),e._v(" "),a("p",[e._v("This means that for a search experience built using multiple indexes, Meilisearch is able to deploy all changes at once and thus clients will access the new version of all indexes at once without any downtime.")]),e._v(" "),a("p",[e._v("There is no need to deploy each new version of indexes one by one.")]),e._v(" "),a("h3",{attrs:{id:"_3-3-enqueued-tasks-after-a-swap-operation-creation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-enqueued-tasks-after-a-swap-operation-creation"}},[e._v("#")]),e._v(" 3.3. Enqueued Tasks After A Swap Operation Creation")]),e._v(" "),a("p",[e._v("Tasks enqueued after an "),a("code",[e._v("indexSwap")]),e._v(" task creation date do not have their "),a("code",[e._v("indexUid")]),e._v(" modified when the "),a("code",[e._v("indexSwap")]),e._v(" will succeed. That is, if they are enqueued on "),a("code",[e._v("indexA")]),e._v(", they will run on the new version of "),a("code",[e._v("indexA")]),e._v(".")]),e._v(" "),a("h3",{attrs:{id:"_3-4-api-endpoints-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.4. API Endpoints Definition")]),e._v(" "),a("h4",{attrs:{id:"_3-4-1-post-swap-indexes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-post-swap-indexes"}},[e._v("#")]),e._v(" 3.4.1. "),a("code",[e._v("POST")]),e._v(" - "),a("code",[e._v("/swap-indexes")])]),e._v(" "),a("p",[e._v("Send one or many indexes swap operation at once.")]),e._v(" "),a("h5",{attrs:{id:"_3-4-1-1-payload-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-1-payload-definition"}},[e._v("#")]),e._v(" 3.4.1.1. Payload definition")]),e._v(" "),a("p",[e._v("The payload body expects an array of JSON objects representing swap operations.")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"indexes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"indexA"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"indexA_new"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"indexes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"indexB"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"indexB_new"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),a("p",[e._v("💡 In the given example, two swap operations will occur at the same time and atomically.")]),e._v(" "),a("p",[a("code",[e._v("indexA")]),e._v(" data will be swapped with "),a("code",[e._v("indexA_new")]),e._v(" data while "),a("code",[e._v("indexB")]),e._v(" data will be swapped with "),a("code",[e._v("indexB_new")]),e._v(" data.")]),e._v(" "),a("blockquote",[a("p",[e._v("Sending "),a("code",[e._v("[]")]),e._v(" is considered valid. No swap transactions will be performed.")])]),e._v(" "),a("h6",{attrs:{id:"swap-object-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#swap-object-definition"}},[e._v("#")]),e._v(" Swap Object Definition")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Field")]),e._v(" "),a("th",[e._v("Type")]),e._v(" "),a("th",[e._v("Required")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("a",{attrs:{href:"#33111-indexes"}},[e._v("indexes")])]),e._v(" "),a("td",[e._v("Array of string representing indexUids")]),e._v(" "),a("td",[e._v("True")])])])]),e._v(" "),a("h6",{attrs:{id:"_3-4-1-1-1-indexes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-1-1-indexes"}},[e._v("#")]),e._v(" 3.4.1.1.1. "),a("code",[e._v("indexes")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Array of string")]),e._v(" "),a("li",[e._v("Required: True")])]),e._v(" "),a("p",[e._v("Determines which two indexes should exchange their data for their given swap object.")]),e._v(" "),a("h5",{attrs:{id:"_3-4-1-2-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-2-response-definition"}},[e._v("#")]),e._v(" 3.4.1.2. Response Definition")]),e._v(" "),a("p",[e._v("When the request is in a successful state, Meilisearch returns the HTTP code "),a("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"taskUid"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"indexUid"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[e._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"status"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"enqueued"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"indexSwap"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"enqueuedAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2021-08-12T10:00:00.000000Z"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("blockquote",[a("p",[e._v("An "),a("code",[e._v("indexSwap")]),e._v(" task is considered a global task; thus "),a("code",[e._v("indexUid")]),e._v(" is null.")])]),e._v(" "),a("p",[e._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),a("code",[e._v("task")]),e._v(" Object for "),a("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),a("h5",{attrs:{id:"_3-4-1-3-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-3-errors"}},[e._v("#")]),e._v(" 3.4.1.3. Errors")]),e._v(" "),a("h6",{attrs:{id:"_3-4-1-3-1-synchronous-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-3-1-synchronous-errors"}},[e._v("#")]),e._v(" 3.4.1.3.1. Synchronous Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 If the instance is secured by a master key, accessing this route without the "),a("code",[e._v("Authorization")]),e._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 If the instance is secured by a master key, accessing this route with a key that does not have permissions (missing "),a("code",[e._v("indexes.swap")]),e._v(" action or having a value for the "),a("code",[e._v("indexes")]),e._v(" field of a swap operation not being defined in the API Key "),a("code",[e._v("indexes")]),e._v(" array) (i.e. other than the master key) returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Omitting Content-Type header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an empty Content-Type returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a different Content-Type than "),a("code",[e._v("application/json")]),e._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an empty payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid JSON payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Omitting the "),a("code",[e._v("indexes")]),e._v(" array in a swap payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_swap_indexes"}},[e._v("missing_swap_indexes")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an "),a("code",[e._v("indexes")]),e._v(" array containing an invalid index uid format returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_swap_indexes"}},[e._v("invalid_swap_indexes")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an "),a("code",[e._v("indexes")]),e._v(" array not containing "),a("strong",[e._v("exactly")]),e._v(" 2 indexUids for a swap operation object returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_swap_indexes"}},[e._v("invalid_swap_indexes")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an indexUid more than once in the request payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_swap_duplicate_index_found"}},[e._v("invalid_swap_duplicate_index_found")]),e._v(" error.")],1)]),e._v(" "),a("h6",{attrs:{id:"_3-4-1-3-2-asynchronous-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-3-2-asynchronous-errors"}},[e._v("#")]),e._v(" 3.4.1.3.2. Asynchronous Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Sending indexUids that do not exist within the "),a("code",[e._v("indexes")]),e._v(" field of a swap operation returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),a("h2",{attrs:{id:"_4-technical-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[e._v("#")]),e._v(" 4. Technical Details")]),e._v(" "),a("h3",{attrs:{id:"_4-1-swapping-data"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-swapping-data"}},[e._v("#")]),e._v(" 4.1. Swapping Data")]),e._v(" "),a("p",[e._v("When indexes are swapped their data is exchanged. It concerns:")]),e._v(" "),a("ul",[a("li",[e._v("The documents")]),e._v(" "),a("li",[e._v("The settings")]),e._v(" "),a("li",[e._v("The tasks history\n"),a("ul",[a("li",[e._v("An index swap between index_a and index_b will also replace every mention of index_a by index_b (and vice-versa) in the task history. Enqueued tasks are left unmodified.")])])])]),e._v(" "),a("h2",{attrs:{id:"_5-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),a("ul",[a("li",[e._v("Introduce a way to delete one of the swapped indexes when the swap operation occurs.")])])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[59],{484:function(e,t,a){"use strict";a.r(t);var n=a(62),s=Object(n.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"swap-indexes-api"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#swap-indexes-api"}},[e._v("#")]),e._v(" Swap Indexes API")]),e._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("The swap indexes API allows to atomically deploy several new versions of indexes without any downtime for the search clients.")]),e._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[e._v("It's critical to deploy a new version of an index without any downtimes to the search clients. This capability improves the development experience by allowing Meilisearch to better fit into their workflow.")]),e._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("h3",{attrs:{id:"_3-1-0-downtime-deployment-workflow"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-0-downtime-deployment-workflow"}},[e._v("#")]),e._v(" 3.1. 0 downtime deployment workflow")]),e._v(" "),a("p",[e._v("A 0 downtime deployment looks like this:")]),e._v(" "),a("ol",[a("li",[e._v("Search clients search on "),a("code",[e._v("indexA")]),e._v(".")]),e._v(" "),a("li",[e._v("The developer builds a new index "),a("code",[e._v("indexB")]),e._v(" representing the new index version to deploy to the search clients.")]),e._v(" "),a("li",[e._v("When "),a("code",[e._v("indexB")]),e._v(" is built and ready to be deployed, the developer sends an indexes swap request to Meilisearch for "),a("code",[e._v("indexA")]),e._v(" and "),a("code",[e._v("indexB")]),e._v(".")]),e._v(" "),a("li",[a("code",[e._v("indexB")]),e._v(" documents, settings and tasks are swapped with "),a("code",[e._v("indexA")]),e._v(".")]),e._v(" "),a("li",[e._v("Search clients search on the updated "),a("code",[e._v("indexA")]),e._v(" without experiencing any downtime.")])]),e._v(" "),a("h3",{attrs:{id:"_3-2-deploying-multiple-new-indexes-versions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-deploying-multiple-new-indexes-versions"}},[e._v("#")]),e._v(" 3.2. Deploying Multiple New Indexes Versions")]),e._v(" "),a("p",[e._v("The swap API supports multiple swap operations in an atomic fashion.")]),e._v(" "),a("p",[e._v("This means that for a search experience built using multiple indexes, Meilisearch is able to deploy all changes at once and thus clients will access the new version of all indexes at once without any downtime.")]),e._v(" "),a("p",[e._v("There is no need to deploy each new version of indexes one by one.")]),e._v(" "),a("h3",{attrs:{id:"_3-3-enqueued-tasks-after-a-swap-operation-creation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-enqueued-tasks-after-a-swap-operation-creation"}},[e._v("#")]),e._v(" 3.3. Enqueued Tasks After A Swap Operation Creation")]),e._v(" "),a("p",[e._v("Tasks enqueued after an "),a("code",[e._v("indexSwap")]),e._v(" task creation date do not have their "),a("code",[e._v("indexUid")]),e._v(" modified when the "),a("code",[e._v("indexSwap")]),e._v(" will succeed. That is, if they are enqueued on "),a("code",[e._v("indexA")]),e._v(", they will run on the new version of "),a("code",[e._v("indexA")]),e._v(".")]),e._v(" "),a("h3",{attrs:{id:"_3-4-api-endpoints-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.4. API Endpoints Definition")]),e._v(" "),a("h4",{attrs:{id:"_3-4-1-post-swap-indexes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-post-swap-indexes"}},[e._v("#")]),e._v(" 3.4.1. "),a("code",[e._v("POST")]),e._v(" - "),a("code",[e._v("/swap-indexes")])]),e._v(" "),a("p",[e._v("Send one or many indexes swap operation at once.")]),e._v(" "),a("h5",{attrs:{id:"_3-4-1-1-payload-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-1-payload-definition"}},[e._v("#")]),e._v(" 3.4.1.1. Payload definition")]),e._v(" "),a("p",[e._v("The payload body expects an array of JSON objects representing swap operations.")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"indexes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"indexA"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"indexA_new"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"indexes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"indexB"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"indexB_new"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),a("p",[e._v("💡 In the given example, two swap operations will occur at the same time and atomically.")]),e._v(" "),a("p",[a("code",[e._v("indexA")]),e._v(" data will be swapped with "),a("code",[e._v("indexA_new")]),e._v(" data while "),a("code",[e._v("indexB")]),e._v(" data will be swapped with "),a("code",[e._v("indexB_new")]),e._v(" data.")]),e._v(" "),a("blockquote",[a("p",[e._v("Sending "),a("code",[e._v("[]")]),e._v(" is considered valid. No swap transactions will be performed.")])]),e._v(" "),a("h6",{attrs:{id:"swap-object-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#swap-object-definition"}},[e._v("#")]),e._v(" Swap Object Definition")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Field")]),e._v(" "),a("th",[e._v("Type")]),e._v(" "),a("th",[e._v("Required")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("a",{attrs:{href:"#33111-indexes"}},[e._v("indexes")])]),e._v(" "),a("td",[e._v("Array of string representing indexUids")]),e._v(" "),a("td",[e._v("True")])])])]),e._v(" "),a("h6",{attrs:{id:"_3-4-1-1-1-indexes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-1-1-indexes"}},[e._v("#")]),e._v(" 3.4.1.1.1. "),a("code",[e._v("indexes")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Array of string")]),e._v(" "),a("li",[e._v("Required: True")])]),e._v(" "),a("p",[e._v("Determines which two indexes should exchange their data for their given swap object.")]),e._v(" "),a("h5",{attrs:{id:"_3-4-1-2-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-2-response-definition"}},[e._v("#")]),e._v(" 3.4.1.2. Response Definition")]),e._v(" "),a("p",[e._v("When the request is in a successful state, Meilisearch returns the HTTP code "),a("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"taskUid"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"indexUid"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[e._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"status"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"enqueued"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"indexSwap"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"enqueuedAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2021-08-12T10:00:00.000000Z"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("blockquote",[a("p",[e._v("An "),a("code",[e._v("indexSwap")]),e._v(" task is considered a global task; thus "),a("code",[e._v("indexUid")]),e._v(" is null.")])]),e._v(" "),a("p",[e._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),a("code",[e._v("task")]),e._v(" Object for "),a("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),a("h5",{attrs:{id:"_3-4-1-3-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-3-errors"}},[e._v("#")]),e._v(" 3.4.1.3. Errors")]),e._v(" "),a("h6",{attrs:{id:"_3-4-1-3-1-synchronous-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-3-1-synchronous-errors"}},[e._v("#")]),e._v(" 3.4.1.3.1. Synchronous Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 If the instance is secured by a master key, accessing this route without the "),a("code",[e._v("Authorization")]),e._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 If the instance is secured by a master key, accessing this route with a key that does not have permissions (missing "),a("code",[e._v("indexes.swap")]),e._v(" action or having a value for the "),a("code",[e._v("indexes")]),e._v(" field of a swap operation not being defined in the API Key "),a("code",[e._v("indexes")]),e._v(" array) (i.e. other than the master key) returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Omitting Content-Type header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an empty Content-Type returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a different Content-Type than "),a("code",[e._v("application/json")]),e._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an empty payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid JSON payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Omitting the "),a("code",[e._v("indexes")]),e._v(" array in a swap payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_swap_indexes"}},[e._v("missing_swap_indexes")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an "),a("code",[e._v("indexes")]),e._v(" array containing an invalid index uid format returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_swap_indexes"}},[e._v("invalid_swap_indexes")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an "),a("code",[e._v("indexes")]),e._v(" array not containing "),a("strong",[e._v("exactly")]),e._v(" 2 indexUids for a swap operation object returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_swap_indexes"}},[e._v("invalid_swap_indexes")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an indexUid more than once in the request payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_swap_duplicate_index_found"}},[e._v("invalid_swap_duplicate_index_found")]),e._v(" error.")],1)]),e._v(" "),a("h6",{attrs:{id:"_3-4-1-3-2-asynchronous-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-3-2-asynchronous-errors"}},[e._v("#")]),e._v(" 3.4.1.3.2. Asynchronous Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Sending indexUids that do not exist within the "),a("code",[e._v("indexes")]),e._v(" field of a swap operation returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),a("h2",{attrs:{id:"_4-technical-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[e._v("#")]),e._v(" 4. Technical Details")]),e._v(" "),a("h3",{attrs:{id:"_4-1-swapping-data"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-swapping-data"}},[e._v("#")]),e._v(" 4.1. Swapping Data")]),e._v(" "),a("p",[e._v("When indexes are swapped their data is exchanged. It concerns:")]),e._v(" "),a("ul",[a("li",[e._v("The documents")]),e._v(" "),a("li",[e._v("The settings")]),e._v(" "),a("li",[e._v("The tasks history\n"),a("ul",[a("li",[e._v("An index swap between index_a and index_b will also replace every mention of index_a by index_b (and vice-versa) in the task history. Enqueued tasks are left unmodified.")])])])]),e._v(" "),a("h2",{attrs:{id:"_5-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),a("ul",[a("li",[e._v("Introduce a way to delete one of the swapped indexes when the swap operation occurs.")])])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/60.df174b2b.js b/docs/assets/js/60.5e7d293f.js similarity index 99% rename from docs/assets/js/60.df174b2b.js rename to docs/assets/js/60.5e7d293f.js index dd48fad79..155bea465 100644 --- a/docs/assets/js/60.df174b2b.js +++ b/docs/assets/js/60.5e7d293f.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[60],{484:function(t,e,s){"use strict";s.r(e);var a=s(62),r=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"multi-search-api"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#multi-search-api"}},[t._v("#")]),t._v(" Multi-search API")]),t._v(" "),s("h2",{attrs:{id:"_1-summary"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),s("p",[t._v("The multi-search endpoint performs multiple search queries on one or more indexes by bundling them into a single request.\nEach search query has its own results set.")]),t._v(" "),s("h2",{attrs:{id:"_2-motivation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),s("ul",[s("li",[t._v("Perform multiple queries in a single HTTP request")])]),t._v(" "),s("h2",{attrs:{id:"_3-functional-specification"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),s("p",[t._v("Meilisearch exposes 1 route to perform multi-search requests:")]),t._v(" "),s("ul",[s("li",[t._v("POST "),s("code",[t._v("/multi-search")])])]),t._v(" "),s("p",[t._v("If a master key is used to secure a Meilisearch instance, the auth layer returns the following errors:")]),t._v(" "),s("ul",[s("li",[t._v("🔴 Accessing these routes without the "),s("code",[t._v("Authorization")]),t._v(" header returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Accessing these routes with a key that does not have permissions (i.e. other than the master key) returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),s("p",[t._v("If any of the search queries fail to execute, the response returns the corresponding error instead of the array of results. If multiple queries fail, only the first encountered failure is returned.")]),t._v(" "),s("p",[s("code",[t._v("POST")]),t._v(" HTTP verb errors:")]),t._v(" "),s("ul",[s("li",[t._v("🔴 Omitting the Content-Type header returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[t._v("missing_content_type")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an empty Content-Type returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[t._v("invalid_content_type")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending a different Content-Type than "),s("code",[t._v("application/json")]),t._v(" returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[t._v("invalid_content_type")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an empty payload returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[t._v("missing_payload")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an invalid JSON payload returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[t._v("malformed_payload")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an inexistent "),s("code",[t._v("indexUid")]),t._v(" in a query object returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[t._v("index_not_found")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an invalid format for the "),s("code",[t._v("indexUid")]),t._v(" property in a query object returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[t._v("invalid_index_uid")]),t._v(" error.")],1)]),t._v(" "),s("h3",{attrs:{id:"_3-1-search-payload-parameters"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-search-payload-parameters"}},[t._v("#")]),t._v(" 3.1. Search Payload Parameters")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Field")]),t._v(" "),s("th",[t._v("Type")]),t._v(" "),s("th",[t._v("Required")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("a",{attrs:{href:"#311-queries"}},[s("code",[t._v("queries")])])]),t._v(" "),s("td",[t._v("Array of Objects")]),t._v(" "),s("td",[t._v("True")])])])]),t._v(" "),s("h4",{attrs:{id:"_3-1-1-queries"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-queries"}},[t._v("#")]),t._v(" 3.1.1. "),s("code",[t._v("queries")])]),t._v(" "),s("ul",[s("li",[t._v("Type: Object")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("The "),s("code",[t._v("queries")]),t._v(" object contains the list of search queries to perform.")]),t._v(" "),s("p",[t._v("Each element of this array is a JSON object with the required field "),s("code",[t._v("indexUid")]),t._v(", the uid of the index to be searched. Other fields of this object are optional, and identical to the ones in the "),s("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#31-search-payload-parameters"}},[t._v("existing search routes")]),t._v(" ("),s("code",[t._v("q")]),t._v(", "),s("code",[t._v("limit")]),t._v(", etc.).")],1),t._v(" "),s("h3",{attrs:{id:"_3-2-search-response-properties"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-search-response-properties"}},[t._v("#")]),t._v(" 3.2. Search Response Properties")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Field")]),t._v(" "),s("th",[t._v("Type")]),t._v(" "),s("th",[t._v("Required")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("a",{attrs:{href:"#321-results"}},[s("code",[t._v("results")])])]),t._v(" "),s("td",[t._v("Array[Object]")]),t._v(" "),s("td",[t._v("True")])])])]),t._v(" "),s("h4",{attrs:{id:"_3-2-1-results"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-results"}},[t._v("#")]),t._v(" 3.2.1. "),s("code",[t._v("results")])]),t._v(" "),s("ul",[s("li",[t._v("Type: Array[Objets]")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("Results of the search queries as an array of search results.")]),t._v(" "),s("p",[t._v("Each element in this array contains the results of the search queries in the same order they have been requested. Additionally to the "),s("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#31-formatting-search-results"}},[t._v("usual fields returned by a search result")]),t._v(", an "),s("code",[t._v("indexUid")]),t._v(" field is present with the index UID on which the search has been performed.")],1),t._v(" "),s("p",[t._v("example:")]),t._v(" "),s("p",[t._v("Search queries:")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"queries"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movie"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wonder"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"books"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"king"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Search results:")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"results"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movie"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wonderwoman"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// other search results fields: processingTimeMs, limit, ...")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"books"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"king kong theory"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// other search results fields: processingTimeMs, limit, ...")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("The other fields of an element from the "),s("code",[t._v("results")]),t._v(" array are identical to the fields of the "),s("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#31-formatting-search-results"}},[t._v("response from the other search routes")]),t._v(".")],1),t._v(" "),s("h2",{attrs:{id:"_2-technical-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-details"}},[t._v("#")]),t._v(" 2. Technical Details")]),t._v(" "),s("p",[t._v("n/a")]),t._v(" "),s("h2",{attrs:{id:"_3-future-possibilities"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[t._v("#")]),t._v(" 3. Future Possibilities")]),t._v(" "),s("ul",[s("li",[t._v("Allow specifying an index uid pattern instead of an index uid to produce searches on all indexes matching the pattern.")]),t._v(" "),s("li",[t._v("Allow additional arguments to the request specifying a strategy to aggregate results from the multiple searches.")])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[60],{483:function(t,e,s){"use strict";s.r(e);var a=s(62),r=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"multi-search-api"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#multi-search-api"}},[t._v("#")]),t._v(" Multi-search API")]),t._v(" "),s("h2",{attrs:{id:"_1-summary"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),s("p",[t._v("The multi-search endpoint performs multiple search queries on one or more indexes by bundling them into a single request.\nEach search query has its own results set.")]),t._v(" "),s("h2",{attrs:{id:"_2-motivation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),s("ul",[s("li",[t._v("Perform multiple queries in a single HTTP request")])]),t._v(" "),s("h2",{attrs:{id:"_3-functional-specification"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),s("p",[t._v("Meilisearch exposes 1 route to perform multi-search requests:")]),t._v(" "),s("ul",[s("li",[t._v("POST "),s("code",[t._v("/multi-search")])])]),t._v(" "),s("p",[t._v("If a master key is used to secure a Meilisearch instance, the auth layer returns the following errors:")]),t._v(" "),s("ul",[s("li",[t._v("🔴 Accessing these routes without the "),s("code",[t._v("Authorization")]),t._v(" header returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Accessing these routes with a key that does not have permissions (i.e. other than the master key) returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),s("p",[t._v("If any of the search queries fail to execute, the response returns the corresponding error instead of the array of results. If multiple queries fail, only the first encountered failure is returned.")]),t._v(" "),s("p",[s("code",[t._v("POST")]),t._v(" HTTP verb errors:")]),t._v(" "),s("ul",[s("li",[t._v("🔴 Omitting the Content-Type header returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[t._v("missing_content_type")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an empty Content-Type returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[t._v("invalid_content_type")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending a different Content-Type than "),s("code",[t._v("application/json")]),t._v(" returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[t._v("invalid_content_type")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an empty payload returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[t._v("missing_payload")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an invalid JSON payload returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[t._v("malformed_payload")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an inexistent "),s("code",[t._v("indexUid")]),t._v(" in a query object returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[t._v("index_not_found")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an invalid format for the "),s("code",[t._v("indexUid")]),t._v(" property in a query object returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[t._v("invalid_index_uid")]),t._v(" error.")],1)]),t._v(" "),s("h3",{attrs:{id:"_3-1-search-payload-parameters"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-search-payload-parameters"}},[t._v("#")]),t._v(" 3.1. Search Payload Parameters")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Field")]),t._v(" "),s("th",[t._v("Type")]),t._v(" "),s("th",[t._v("Required")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("a",{attrs:{href:"#311-queries"}},[s("code",[t._v("queries")])])]),t._v(" "),s("td",[t._v("Array of Objects")]),t._v(" "),s("td",[t._v("True")])])])]),t._v(" "),s("h4",{attrs:{id:"_3-1-1-queries"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-queries"}},[t._v("#")]),t._v(" 3.1.1. "),s("code",[t._v("queries")])]),t._v(" "),s("ul",[s("li",[t._v("Type: Object")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("The "),s("code",[t._v("queries")]),t._v(" object contains the list of search queries to perform.")]),t._v(" "),s("p",[t._v("Each element of this array is a JSON object with the required field "),s("code",[t._v("indexUid")]),t._v(", the uid of the index to be searched. Other fields of this object are optional, and identical to the ones in the "),s("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#31-search-payload-parameters"}},[t._v("existing search routes")]),t._v(" ("),s("code",[t._v("q")]),t._v(", "),s("code",[t._v("limit")]),t._v(", etc.).")],1),t._v(" "),s("h3",{attrs:{id:"_3-2-search-response-properties"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-search-response-properties"}},[t._v("#")]),t._v(" 3.2. Search Response Properties")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Field")]),t._v(" "),s("th",[t._v("Type")]),t._v(" "),s("th",[t._v("Required")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("a",{attrs:{href:"#321-results"}},[s("code",[t._v("results")])])]),t._v(" "),s("td",[t._v("Array[Object]")]),t._v(" "),s("td",[t._v("True")])])])]),t._v(" "),s("h4",{attrs:{id:"_3-2-1-results"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-results"}},[t._v("#")]),t._v(" 3.2.1. "),s("code",[t._v("results")])]),t._v(" "),s("ul",[s("li",[t._v("Type: Array[Objets]")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("Results of the search queries as an array of search results.")]),t._v(" "),s("p",[t._v("Each element in this array contains the results of the search queries in the same order they have been requested. Additionally to the "),s("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#31-formatting-search-results"}},[t._v("usual fields returned by a search result")]),t._v(", an "),s("code",[t._v("indexUid")]),t._v(" field is present with the index UID on which the search has been performed.")],1),t._v(" "),s("p",[t._v("example:")]),t._v(" "),s("p",[t._v("Search queries:")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"queries"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movie"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wonder"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"books"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"king"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Search results:")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"results"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movie"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wonderwoman"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// other search results fields: processingTimeMs, limit, ...")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"books"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"king kong theory"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// other search results fields: processingTimeMs, limit, ...")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("The other fields of an element from the "),s("code",[t._v("results")]),t._v(" array are identical to the fields of the "),s("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#31-formatting-search-results"}},[t._v("response from the other search routes")]),t._v(".")],1),t._v(" "),s("h2",{attrs:{id:"_2-technical-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-details"}},[t._v("#")]),t._v(" 2. Technical Details")]),t._v(" "),s("p",[t._v("n/a")]),t._v(" "),s("h2",{attrs:{id:"_3-future-possibilities"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[t._v("#")]),t._v(" 3. Future Possibilities")]),t._v(" "),s("ul",[s("li",[t._v("Allow specifying an index uid pattern instead of an index uid to produce searches on all indexes matching the pattern.")]),t._v(" "),s("li",[t._v("Allow additional arguments to the request specifying a strategy to aggregate results from the multiple searches.")])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/63.6da3fdac.js b/docs/assets/js/63.ce3b2fe7.js similarity index 99% rename from docs/assets/js/63.6da3fdac.js rename to docs/assets/js/63.ce3b2fe7.js index 0019fd2e4..948935c64 100644 --- a/docs/assets/js/63.6da3fdac.js +++ b/docs/assets/js/63.ce3b2fe7.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[63],{488:function(e,t,a){"use strict";a.r(t);var r=a(62),s=Object(r.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"ranking-score"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ranking-score"}},[e._v("#")]),e._v(" Ranking Score")]),e._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("Adds two kinds of scores to documents returned by a "),a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html"}},[e._v("search query")]),e._v(".")],1),e._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[e._v("When configuring the Meilisearch relevancy according to their needs, users cannot know why one document has been favored over another.")]),e._v(" "),a("p",[e._v("Showing how the documents ranked according to Meilisearch’s ranking rules unlocks:")]),e._v(" "),a("ul",[a("li",[e._v("Further customization of the developer workflow, such as fine-tuning settings and improving relevancy for example.")]),e._v(" "),a("li",[e._v("Returning a unified list of results for multi-index search queries")]),e._v(" "),a("li",[e._v("Sharding")]),e._v(" "),a("li",[e._v("Debugging and helping users better understand how ranking works")])]),e._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("h3",{attrs:{id:"_3-1-ranking-score"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-ranking-score"}},[e._v("#")]),e._v(" 3.1. Ranking score")]),e._v(" "),a("p",[e._v("A ranking score is a number attached to each document returned by a search when the "),a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#3117-showrankingscore"}},[a("code",[e._v("showRankingScore")])]),e._v(" flag is set to true in the search query.")],1),e._v(" "),a("h4",{attrs:{id:"_3-1-1-scale-and-interpretation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-scale-and-interpretation"}},[e._v("#")]),e._v(" 3.1.1. Scale and interpretation")]),e._v(" "),a("p",[e._v("The ranking score is contained between 1.0 and 0.0. A higher score signifies better relevancy, with 1.0 representing a perfect match, and 0.0 indicating that the document does not match the query (Meilisearch should not return documents that do not match the query).")]),e._v(" "),a("p",[e._v("That number rates the relevancy of the document with respect to the specified search query and the current settings of the index.")]),e._v(" "),a("p",[e._v("The score of a document follows its relevancy in the sense of Meilisearch, in that the first few ranking rules have a much higher influence on the score than the next rules. This is consistent with the way that later ranking rules are only used to break ties with earlier ranking rules, when ranking documents.")]),e._v(" "),a("h4",{attrs:{id:"_3-1-2-score-independence"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-score-independence"}},[e._v("#")]),e._v(" 3.1.2. Score independence")]),e._v(" "),a("p",[e._v("The score of a document is independent of what other documents are contained in the index but is influenced by the settings of the index. The table below details all the settings that can influence the score. Unlisted settings do not influence the ranking score.")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Setting name")]),e._v(" "),a("th",[e._v("Influences if")]),e._v(" "),a("th",[e._v("Rationale")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("code",[e._v("searchableAttributes")])]),e._v(" "),a("td",[e._v("The "),a("code",[e._v("attribute")]),e._v(" ranking rule is used")]),e._v(" "),a("td",[e._v("The "),a("code",[e._v("attribute")]),e._v(" ranking rule rates the document depending on the attribute in which the query terms show up. The order is determined by "),a("code",[e._v("searchableAttributes")])])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("rankingRules")])]),e._v(" "),a("td",[e._v("Always")]),e._v(" "),a("td",[e._v("The score is computed by computing the subscore of each ranking rule with a weight that depends on their order.")])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("stopWords")])]),e._v(" "),a("td",[e._v("Always")]),e._v(" "),a("td",[e._v("Stop words influence the "),a("code",[e._v("words")]),e._v(" ranking rule, which is almost always used")])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("synonyms")])]),e._v(" "),a("td",[e._v("Always")]),e._v(" "),a("td",[e._v("Synonyms influence the "),a("code",[e._v("words")]),e._v(" ranking rule, which is almost always used")])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("typoTolerance")])]),e._v(" "),a("td",[e._v("The "),a("code",[e._v("typo")]),e._v(" ranking rule is used")]),e._v(" "),a("td",[e._v("Used to compute the maximum number of typos for a query")])])])]),e._v(" "),a("p",[e._v("Additionally, the following can impact score independence:")]),e._v(" "),a("ul",[a("li",[e._v("If the "),a("code",[e._v("attribute")]),e._v(" ranking rule is used, but "),a("code",[e._v("searchableAttributes")]),e._v(" has not been specified, then the score is dependent on all the fields that appear in documents and their precise order, as determined by Meilisearch.\nthe score is dependent on the search query.")])]),e._v(" "),a("p",[e._v("Depending on the use case, it can be meaningful to compare scores coming from indexes with settings that are different:")]),e._v(" "),a("ul",[a("li",[e._v("When comparing two scores produced on two indexes with different settings, possibly on a distinct search query, one is comparing the relevancy of each of the scored documents to their respective search query. This is good to present the most relevant documents first when working with heterogeneous indexes, without taking into account which document best suits one single query.")]),e._v(" "),a("li",[e._v("On the other hand, to find what document best suits one single query against two homogeneous indexes, one must be careful to make sure that the indexes have the settings above set to the same value.")])]),e._v(" "),a("h4",{attrs:{id:"_3-1-3-the-sort-ranking-rules-do-not-impact-the-score"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-the-sort-ranking-rules-do-not-impact-the-score"}},[e._v("#")]),e._v(" 3.1.3. The sort ranking rules do not impact the score")]),e._v(" "),a("p",[e._v("Custom "),a("code",[e._v("sort")]),e._v(" and "),a("code",[e._v("geosort")]),e._v(" ranking rules modify the ranking of documents such that they are returned sorted by the value of the target field, rather than by their relevancy to the search query.")]),e._v(" "),a("p",[e._v("As such, these ranking rules have no impact on the score. As a corollary of this, if a "),a("code",[e._v("sort")]),e._v(" ranking rule is not the last ranking rule, then it is possible to see documents returned with ranking scores that are not monotonically decreasing.")]),e._v(" "),a("p",[e._v("Similarly, re-ranking documents by their ranking score will ignore any "),a("code",[e._v("sort")]),e._v(" ranking rule.")]),e._v(" "),a("p",[e._v("If you need to factor sort ranking rules into your score, then use the "),a("a",{attrs:{href:"#32-ranking-score-details"}},[e._v("ranking score details")]),e._v(".")]),e._v(" "),a("h3",{attrs:{id:"_3-2-ranking-score-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-ranking-score-details"}},[e._v("#")]),e._v(" 3.2. Ranking score details")]),e._v(" "),a("p",[e._v("The ranking score details are represented as an object attached to each document returned by a search when the "),a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#3118-showrankingscoredetails"}},[a("code",[e._v("showRankingScoreDetails")])]),e._v(" flag is set to true in the search query.")],1),e._v(" "),a("h4",{attrs:{id:"_3-2-1-general-shape"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-general-shape"}},[e._v("#")]),e._v(" 3.2.1. General shape")]),e._v(" "),a("p",[e._v("The fields of the object have for key the identifier of the various ranking rules that were applied, and for value an object with at least the following field:")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("order")]),e._v(": the numerical order in which the ranking rule was applied. Starts at 0. Consecutive numbers denote ranking rules consecutively applied.")])]),e._v(" "),a("p",[e._v("Additionally, all ranking rules except the "),a("code",[e._v("sort")]),e._v(" and "),a("code",[e._v("geosort")]),e._v(" ranking rules have the following field:")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("score")]),e._v(": the relevancy score of the document relative to this search query, for this ranking rule. A number between 1.0 and 0.0, with 1.0 meaning a perfect match to the query according to the ranking rule, and 0.0 no match.")])]),e._v(" "),a("h4",{attrs:{id:"_3-2-2-ranking-rule-specific-fields"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-ranking-rule-specific-fields"}},[e._v("#")]),e._v(" 3.2.2. Ranking-rule-specific fields")]),e._v(" "),a("p",[e._v("Each ranking rule exposes specific fields meant to provide semantic information about how the ranking rule was applied to the document.")]),e._v(" "),a("p",[e._v("The table below details these rule-specific fields.")]),e._v(" "),a("p",[e._v("​")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",{staticStyle:{"text-align":"left"}},[e._v("Ranking rule")]),e._v(" "),a("th",{staticStyle:{"text-align":"left"}},[e._v("Field description")])])]),e._v(" "),a("tbody",[a("tr",[a("td",{staticStyle:{"text-align":"left"}},[a("code",[e._v("words")])]),e._v(" "),a("td",{staticStyle:{"text-align":"left"}},[a("ul",[a("li",[a("code",[e._v("matchingWords")]),e._v(": Number of words in the query that match in the document. The higher the better")]),a("li",[a("code",[e._v("maxMatchingWords")]),e._v(": Maximum number of words in the query that can match in the document for this iteration of the "),a("code",[e._v("words")]),e._v(" ranking rule. Usually, the query length, but if one of the query terms is set as a stop word, it won’t be counted here.")])])])]),e._v(" "),a("tr",[a("td",{staticStyle:{"text-align":"left"}},[a("code",[e._v("typo")])]),e._v(" "),a("td",{staticStyle:{"text-align":"left"}},[a("ul",[a("li",[a("code",[e._v("typoCount")]),e._v(": Number of typos to correct in the query so that the document matches for this iteration of the "),a("code",[e._v("typo")]),e._v(" ranking rule.")]),a("li",[a("code",[e._v("maxTypoCount")]),e._v(": Maximum number of typos possible in a document for this iteration of the "),a("code",[e._v("typo")]),e._v(" ranking rule.")])])])]),e._v(" "),a("tr",[a("td",{staticStyle:{"text-align":"left"}},[a("code",[e._v("proximity")])]),e._v(" "),a("td",{staticStyle:{"text-align":"left"}},[e._v("No rule-specific field")])]),e._v(" "),a("tr",[a("td",{staticStyle:{"text-align":"left"}},[a("code",[e._v("attribute")])]),e._v(" "),a("td",{staticStyle:{"text-align":"left"}},[a("ul",[a("li",[a("code",[e._v("attributeRankingOrderScore")]),e._v(": Results sorted based on the attribute ranking order")]),a("li",[a("code",[e._v("queryWordDistanceScore")]),e._v(": Documents with attributes containing the query words close to their position in the query will be considered more relevant than documents containing the query words far from their position in the query")])])])]),e._v(" "),a("tr",[a("td",{staticStyle:{"text-align":"left"}},[a("code",[e._v("exactness")])]),e._v(" "),a("td",{staticStyle:{"text-align":"left"}},[a("ul",[a("li",[a("code",[e._v("matchType")]),e._v(": It has one of the following values:"),a("ul",[a("li",[a("code",[e._v("exactMatch")]),e._v(": The query exactly matches the entire value of an attribute")]),a("li",[a("code",[e._v("matchesStart")]),e._v(": The query matches exactly the start of the value of an attribute")]),a("li",[a("code",[e._v("noExactMatch")]),e._v(": The query doesn't exactly match a document ")])])]),a("li",[a("code",[e._v("matchingWords")]),e._v(": for "),a("code",[e._v("matchesStart")]),e._v(", the number of exact words contained in an attribute. The higher the better")]),a("li",[a("code",[e._v("maxMatchingWords")]),e._v(": for "),a("code",[e._v("noExactMatch")]),e._v(", the maximum number of exact words contained in an attribute")])])])])])]),e._v(" "),a("h4",{attrs:{id:"_3-2-3-sort-ranking-rules"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-sort-ranking-rules"}},[e._v("#")]),e._v(" 3.2.3. Sort ranking rules")]),e._v(" "),a("p",[a("code",[e._v("Sort")]),e._v(", "),a("code",[e._v("_geosort")]),e._v(" and (EXPERIMENTAL) "),a("code",[e._v("vectorSort")]),e._v(" ranking rules appear as fields in the score details, but with the following difference:")]),e._v(" "),a("ul",[a("li",[e._v("Their key follows the following format: "),a("code",[e._v("{:attribute-sorted-on}:{:sort-direction}")]),e._v(", with the "),a("code",[e._v(":attribute-sorted-on")]),e._v(" the name of the attribute that is being sorted on, and the "),a("code",[e._v(":sort-direction")]),e._v(" either "),a("code",[e._v("asc")]),e._v(" if the sort is in ascending order, or "),a("code",[e._v("desc")]),e._v(" if the sort is in descending order. For the "),a("code",[e._v("geosort")]),e._v(" ranking rule, it is similarly "),a("code",[e._v("_geoPoint({:lat}, {:lng}):{:sort-direction}")]),e._v(", with the "),a("code",[e._v(":lat")]),e._v(" and "),a("code",[e._v(":lng")]),e._v(" being the latitude and respective longitude of the point that serves as base to sort by distance. (EXPERIMENTAL) For the "),a("code",[e._v("vectorSort")]),e._v(" ranking rule, it is similarly "),a("code",[e._v("vectorSort(:targetVector)")]),e._v(" with the "),a("code",[e._v(":targetVector")]),e._v(" being the searched for vector.")]),e._v(" "),a("li",[e._v("They don't have a "),a("code",[e._v("score")]),e._v(" field, but instead they have a "),a("code",[e._v("value")]),e._v(" field, representing the value used to sort the document. It is typically the value of the sorted attribute for the document, but can sometimes be a subvalue (case where the value is an array of values).")]),e._v(" "),a("li",[e._v("For the "),a("code",[e._v("_geosort")]),e._v(", there is an additional "),a("code",[e._v("distance")]),e._v(" field representing the distance between the target point and the point used in the document to sort the document.")]),e._v(" "),a("li",[e._v("(EXPERIMENTAL) for the "),a("code",[e._v("vectorSort")]),e._v(", there is an additional "),a("code",[e._v("similarity")]),e._v(" field representing the similarity between the target vector and the value vector.")])]),e._v(" "),a("h4",{attrs:{id:"_3-2-4-example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-example"}},[e._v("#")]),e._v(" 3.2.4 Example")]),e._v(" "),a("p",[e._v("The following is an example of a "),a("code",[e._v("_scoreDetails")]),e._v(" returned for a document matching a search query.")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"_rankingScoreDetails"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"words"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"order"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"matchingWords"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"maxMatchingWords"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"score"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"typo"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"order"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"typoCount"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"maxTypoCount"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"score"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"proximity"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"order"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"score"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"attribute"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"order"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("3")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"attributes_ranking_order"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0.8333333333333334")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"attributes_query_word_order"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"score"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0.8333333333333334")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"exactness"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"order"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("4")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"matchType"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"exactMatch"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"score"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"release_date:asc"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"order"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("5")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1165881600")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("h2",{attrs:{id:"_4-technical-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[e._v("#")]),e._v(" 4. Technical Details")]),e._v(" "),a("h3",{attrs:{id:"_4-1-ranking-score-calculation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-ranking-score-calculation"}},[e._v("#")]),e._v(" 4.1. Ranking score calculation")]),e._v(" "),a("p",[e._v("The ranking score calculation in this section is given for informative purposes and is not normative.")]),e._v(" "),a("p",[e._v("The implementation computes the "),a("a",{attrs:{href:"#31-ranking-score"}},[e._v("ranking score")]),e._v(" from each ranking rule (excluding "),a("code",[e._v("sort")]),e._v(" and "),a("code",[e._v("geosort")]),e._v(") with two bits of data per ranking rule. For the "),a("code",[e._v("k")]),e._v("th applied ranking rule:")]),e._v(" "),a("ul",[a("li",[e._v("The maximum rank "),a("code",[e._v("max_rank_k")]),e._v(" that a document can score with the rule, "),a("a",{attrs:{href:"#312-score-independence"}},[e._v("independently from the other documents in the index")])]),e._v(" "),a("li",[e._v("The rank "),a("code",[e._v("rank_k")]),e._v(" of that document for that rule, with the highest rank being equal to the maximum rank, and the lowest rank being equal to 1.")])]),e._v(" "),a("p",[e._v("The score is given by the following formula, assuming "),a("code",[e._v("n")]),e._v(" ranking rules denoted from "),a("code",[e._v("0")]),e._v(" to "),a("code",[e._v("n-1")]),e._v(":")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("score = sum(i in 0..(n-1), (rank_i - 1) / product(j in 0..=i, max_rank_j)) + (rank_(n-1) / product(i in 0..n, max_rank_i))\n")])])]),a("p",[e._v("The intuition behind this formula is that every document falls in a range for each rule, between "),a("code",[e._v("rank_i / max_rank_i")]),e._v(" and "),a("code",[e._v("(rank_i - 1) / max_rank_i")]),e._v(", and the next ranking rule allows to refine where the document is in this range, with the last ranking rule providing the exact score.")]),e._v(" "),a("h3",{attrs:{id:"_4-2-hidden-ranking-rules"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-hidden-ranking-rules"}},[e._v("#")]),e._v(" 4.2. Hidden ranking rules")]),e._v(" "),a("p",[e._v("If the "),a("RouterLink",{attrs:{to:"/specifications/text/0123-displayed-attributes-setting-api.html"}},[a("code",[e._v("displayedAttributes")])]),e._v(" list is defined, then attributes that are not part of that list, but are used in "),a("code",[e._v("sort")]),e._v(" ranking rules are "),a("strong",[e._v("hidden")]),e._v(".")],1),e._v(" "),a("p",[e._v("Instead of seeing "),a("code",[e._v("{:attribute-sorted-on}:{:sort-direction}")]),e._v(" like described in "),a("a",{attrs:{href:"#323-sort-ranking-rules"}},[e._v("the relevant section")]),e._v(", the name of that field is replaced with "),a("code",[e._v("")]),e._v(", with "),a("code",[e._v("{:number}")]),e._v(" a number that serves to uniquely distinguish between such hidden rules.")]),e._v(" "),a("p",[e._v("Note: that number is not guaranteed to start at 0 nor to be consecutive. The only guarantee is that no hidden ranking rule will have the same number.")]),e._v(" "),a("p",[e._v("Furthermore, the "),a("code",[e._v("value")]),e._v(" that was used to sort the document is also hidden and replaced by "),a("code",[e._v('""')]),e._v(".")]),e._v(" "),a("h3",{attrs:{id:"_4-3-disabled-optimization"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-3-disabled-optimization"}},[e._v("#")]),e._v(" 4.3. Disabled optimization")]),e._v(" "),a("p",[e._v("The engine optimizes search by skipping the application of ranking rules when there's only one remaining document (no tie to break).")]),e._v(" "),a("p",[e._v("To compute an accurate score, however, all ranking rules must be applied, so this optimization is disabled as soon as a score is requested in the search request. When no scores are requested, the optimization is active.")]),e._v(" "),a("h2",{attrs:{id:"_5-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),a("ul",[a("li",[e._v("Extend the "),a("RouterLink",{attrs:{to:"/specifications/text/0192-multi-search-api.html"}},[e._v("multi-search API")]),e._v(" to rerank documents according to their score, providing federated search.")],1)])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[63],{491:function(e,t,a){"use strict";a.r(t);var r=a(62),s=Object(r.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"ranking-score"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ranking-score"}},[e._v("#")]),e._v(" Ranking Score")]),e._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("Adds two kinds of scores to documents returned by a "),a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html"}},[e._v("search query")]),e._v(".")],1),e._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[e._v("When configuring the Meilisearch relevancy according to their needs, users cannot know why one document has been favored over another.")]),e._v(" "),a("p",[e._v("Showing how the documents ranked according to Meilisearch’s ranking rules unlocks:")]),e._v(" "),a("ul",[a("li",[e._v("Further customization of the developer workflow, such as fine-tuning settings and improving relevancy for example.")]),e._v(" "),a("li",[e._v("Returning a unified list of results for multi-index search queries")]),e._v(" "),a("li",[e._v("Sharding")]),e._v(" "),a("li",[e._v("Debugging and helping users better understand how ranking works")])]),e._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("h3",{attrs:{id:"_3-1-ranking-score"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-ranking-score"}},[e._v("#")]),e._v(" 3.1. Ranking score")]),e._v(" "),a("p",[e._v("A ranking score is a number attached to each document returned by a search when the "),a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#3117-showrankingscore"}},[a("code",[e._v("showRankingScore")])]),e._v(" flag is set to true in the search query.")],1),e._v(" "),a("h4",{attrs:{id:"_3-1-1-scale-and-interpretation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-scale-and-interpretation"}},[e._v("#")]),e._v(" 3.1.1. Scale and interpretation")]),e._v(" "),a("p",[e._v("The ranking score is contained between 1.0 and 0.0. A higher score signifies better relevancy, with 1.0 representing a perfect match, and 0.0 indicating that the document does not match the query (Meilisearch should not return documents that do not match the query).")]),e._v(" "),a("p",[e._v("That number rates the relevancy of the document with respect to the specified search query and the current settings of the index.")]),e._v(" "),a("p",[e._v("The score of a document follows its relevancy in the sense of Meilisearch, in that the first few ranking rules have a much higher influence on the score than the next rules. This is consistent with the way that later ranking rules are only used to break ties with earlier ranking rules, when ranking documents.")]),e._v(" "),a("h4",{attrs:{id:"_3-1-2-score-independence"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-score-independence"}},[e._v("#")]),e._v(" 3.1.2. Score independence")]),e._v(" "),a("p",[e._v("The score of a document is independent of what other documents are contained in the index but is influenced by the settings of the index. The table below details all the settings that can influence the score. Unlisted settings do not influence the ranking score.")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Setting name")]),e._v(" "),a("th",[e._v("Influences if")]),e._v(" "),a("th",[e._v("Rationale")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("code",[e._v("searchableAttributes")])]),e._v(" "),a("td",[e._v("The "),a("code",[e._v("attribute")]),e._v(" ranking rule is used")]),e._v(" "),a("td",[e._v("The "),a("code",[e._v("attribute")]),e._v(" ranking rule rates the document depending on the attribute in which the query terms show up. The order is determined by "),a("code",[e._v("searchableAttributes")])])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("rankingRules")])]),e._v(" "),a("td",[e._v("Always")]),e._v(" "),a("td",[e._v("The score is computed by computing the subscore of each ranking rule with a weight that depends on their order.")])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("stopWords")])]),e._v(" "),a("td",[e._v("Always")]),e._v(" "),a("td",[e._v("Stop words influence the "),a("code",[e._v("words")]),e._v(" ranking rule, which is almost always used")])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("synonyms")])]),e._v(" "),a("td",[e._v("Always")]),e._v(" "),a("td",[e._v("Synonyms influence the "),a("code",[e._v("words")]),e._v(" ranking rule, which is almost always used")])]),e._v(" "),a("tr",[a("td",[a("code",[e._v("typoTolerance")])]),e._v(" "),a("td",[e._v("The "),a("code",[e._v("typo")]),e._v(" ranking rule is used")]),e._v(" "),a("td",[e._v("Used to compute the maximum number of typos for a query")])])])]),e._v(" "),a("p",[e._v("Additionally, the following can impact score independence:")]),e._v(" "),a("ul",[a("li",[e._v("If the "),a("code",[e._v("attribute")]),e._v(" ranking rule is used, but "),a("code",[e._v("searchableAttributes")]),e._v(" has not been specified, then the score is dependent on all the fields that appear in documents and their precise order, as determined by Meilisearch.\nthe score is dependent on the search query.")])]),e._v(" "),a("p",[e._v("Depending on the use case, it can be meaningful to compare scores coming from indexes with settings that are different:")]),e._v(" "),a("ul",[a("li",[e._v("When comparing two scores produced on two indexes with different settings, possibly on a distinct search query, one is comparing the relevancy of each of the scored documents to their respective search query. This is good to present the most relevant documents first when working with heterogeneous indexes, without taking into account which document best suits one single query.")]),e._v(" "),a("li",[e._v("On the other hand, to find what document best suits one single query against two homogeneous indexes, one must be careful to make sure that the indexes have the settings above set to the same value.")])]),e._v(" "),a("h4",{attrs:{id:"_3-1-3-the-sort-ranking-rules-do-not-impact-the-score"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-the-sort-ranking-rules-do-not-impact-the-score"}},[e._v("#")]),e._v(" 3.1.3. The sort ranking rules do not impact the score")]),e._v(" "),a("p",[e._v("Custom "),a("code",[e._v("sort")]),e._v(" and "),a("code",[e._v("geosort")]),e._v(" ranking rules modify the ranking of documents such that they are returned sorted by the value of the target field, rather than by their relevancy to the search query.")]),e._v(" "),a("p",[e._v("As such, these ranking rules have no impact on the score. As a corollary of this, if a "),a("code",[e._v("sort")]),e._v(" ranking rule is not the last ranking rule, then it is possible to see documents returned with ranking scores that are not monotonically decreasing.")]),e._v(" "),a("p",[e._v("Similarly, re-ranking documents by their ranking score will ignore any "),a("code",[e._v("sort")]),e._v(" ranking rule.")]),e._v(" "),a("p",[e._v("If you need to factor sort ranking rules into your score, then use the "),a("a",{attrs:{href:"#32-ranking-score-details"}},[e._v("ranking score details")]),e._v(".")]),e._v(" "),a("h3",{attrs:{id:"_3-2-ranking-score-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-ranking-score-details"}},[e._v("#")]),e._v(" 3.2. Ranking score details")]),e._v(" "),a("p",[e._v("The ranking score details are represented as an object attached to each document returned by a search when the "),a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#3118-showrankingscoredetails"}},[a("code",[e._v("showRankingScoreDetails")])]),e._v(" flag is set to true in the search query.")],1),e._v(" "),a("h4",{attrs:{id:"_3-2-1-general-shape"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-general-shape"}},[e._v("#")]),e._v(" 3.2.1. General shape")]),e._v(" "),a("p",[e._v("The fields of the object have for key the identifier of the various ranking rules that were applied, and for value an object with at least the following field:")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("order")]),e._v(": the numerical order in which the ranking rule was applied. Starts at 0. Consecutive numbers denote ranking rules consecutively applied.")])]),e._v(" "),a("p",[e._v("Additionally, all ranking rules except the "),a("code",[e._v("sort")]),e._v(" and "),a("code",[e._v("geosort")]),e._v(" ranking rules have the following field:")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("score")]),e._v(": the relevancy score of the document relative to this search query, for this ranking rule. A number between 1.0 and 0.0, with 1.0 meaning a perfect match to the query according to the ranking rule, and 0.0 no match.")])]),e._v(" "),a("h4",{attrs:{id:"_3-2-2-ranking-rule-specific-fields"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-ranking-rule-specific-fields"}},[e._v("#")]),e._v(" 3.2.2. Ranking-rule-specific fields")]),e._v(" "),a("p",[e._v("Each ranking rule exposes specific fields meant to provide semantic information about how the ranking rule was applied to the document.")]),e._v(" "),a("p",[e._v("The table below details these rule-specific fields.")]),e._v(" "),a("p",[e._v("​")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",{staticStyle:{"text-align":"left"}},[e._v("Ranking rule")]),e._v(" "),a("th",{staticStyle:{"text-align":"left"}},[e._v("Field description")])])]),e._v(" "),a("tbody",[a("tr",[a("td",{staticStyle:{"text-align":"left"}},[a("code",[e._v("words")])]),e._v(" "),a("td",{staticStyle:{"text-align":"left"}},[a("ul",[a("li",[a("code",[e._v("matchingWords")]),e._v(": Number of words in the query that match in the document. The higher the better")]),a("li",[a("code",[e._v("maxMatchingWords")]),e._v(": Maximum number of words in the query that can match in the document for this iteration of the "),a("code",[e._v("words")]),e._v(" ranking rule. Usually, the query length, but if one of the query terms is set as a stop word, it won’t be counted here.")])])])]),e._v(" "),a("tr",[a("td",{staticStyle:{"text-align":"left"}},[a("code",[e._v("typo")])]),e._v(" "),a("td",{staticStyle:{"text-align":"left"}},[a("ul",[a("li",[a("code",[e._v("typoCount")]),e._v(": Number of typos to correct in the query so that the document matches for this iteration of the "),a("code",[e._v("typo")]),e._v(" ranking rule.")]),a("li",[a("code",[e._v("maxTypoCount")]),e._v(": Maximum number of typos possible in a document for this iteration of the "),a("code",[e._v("typo")]),e._v(" ranking rule.")])])])]),e._v(" "),a("tr",[a("td",{staticStyle:{"text-align":"left"}},[a("code",[e._v("proximity")])]),e._v(" "),a("td",{staticStyle:{"text-align":"left"}},[e._v("No rule-specific field")])]),e._v(" "),a("tr",[a("td",{staticStyle:{"text-align":"left"}},[a("code",[e._v("attribute")])]),e._v(" "),a("td",{staticStyle:{"text-align":"left"}},[a("ul",[a("li",[a("code",[e._v("attributeRankingOrderScore")]),e._v(": Results sorted based on the attribute ranking order")]),a("li",[a("code",[e._v("queryWordDistanceScore")]),e._v(": Documents with attributes containing the query words close to their position in the query will be considered more relevant than documents containing the query words far from their position in the query")])])])]),e._v(" "),a("tr",[a("td",{staticStyle:{"text-align":"left"}},[a("code",[e._v("exactness")])]),e._v(" "),a("td",{staticStyle:{"text-align":"left"}},[a("ul",[a("li",[a("code",[e._v("matchType")]),e._v(": It has one of the following values:"),a("ul",[a("li",[a("code",[e._v("exactMatch")]),e._v(": The query exactly matches the entire value of an attribute")]),a("li",[a("code",[e._v("matchesStart")]),e._v(": The query matches exactly the start of the value of an attribute")]),a("li",[a("code",[e._v("noExactMatch")]),e._v(": The query doesn't exactly match a document ")])])]),a("li",[a("code",[e._v("matchingWords")]),e._v(": for "),a("code",[e._v("matchesStart")]),e._v(", the number of exact words contained in an attribute. The higher the better")]),a("li",[a("code",[e._v("maxMatchingWords")]),e._v(": for "),a("code",[e._v("noExactMatch")]),e._v(", the maximum number of exact words contained in an attribute")])])])])])]),e._v(" "),a("h4",{attrs:{id:"_3-2-3-sort-ranking-rules"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-sort-ranking-rules"}},[e._v("#")]),e._v(" 3.2.3. Sort ranking rules")]),e._v(" "),a("p",[a("code",[e._v("Sort")]),e._v(", "),a("code",[e._v("_geosort")]),e._v(" and (EXPERIMENTAL) "),a("code",[e._v("vectorSort")]),e._v(" ranking rules appear as fields in the score details, but with the following difference:")]),e._v(" "),a("ul",[a("li",[e._v("Their key follows the following format: "),a("code",[e._v("{:attribute-sorted-on}:{:sort-direction}")]),e._v(", with the "),a("code",[e._v(":attribute-sorted-on")]),e._v(" the name of the attribute that is being sorted on, and the "),a("code",[e._v(":sort-direction")]),e._v(" either "),a("code",[e._v("asc")]),e._v(" if the sort is in ascending order, or "),a("code",[e._v("desc")]),e._v(" if the sort is in descending order. For the "),a("code",[e._v("geosort")]),e._v(" ranking rule, it is similarly "),a("code",[e._v("_geoPoint({:lat}, {:lng}):{:sort-direction}")]),e._v(", with the "),a("code",[e._v(":lat")]),e._v(" and "),a("code",[e._v(":lng")]),e._v(" being the latitude and respective longitude of the point that serves as base to sort by distance. (EXPERIMENTAL) For the "),a("code",[e._v("vectorSort")]),e._v(" ranking rule, it is similarly "),a("code",[e._v("vectorSort(:targetVector)")]),e._v(" with the "),a("code",[e._v(":targetVector")]),e._v(" being the searched for vector.")]),e._v(" "),a("li",[e._v("They don't have a "),a("code",[e._v("score")]),e._v(" field, but instead they have a "),a("code",[e._v("value")]),e._v(" field, representing the value used to sort the document. It is typically the value of the sorted attribute for the document, but can sometimes be a subvalue (case where the value is an array of values).")]),e._v(" "),a("li",[e._v("For the "),a("code",[e._v("_geosort")]),e._v(", there is an additional "),a("code",[e._v("distance")]),e._v(" field representing the distance between the target point and the point used in the document to sort the document.")]),e._v(" "),a("li",[e._v("(EXPERIMENTAL) for the "),a("code",[e._v("vectorSort")]),e._v(", there is an additional "),a("code",[e._v("similarity")]),e._v(" field representing the similarity between the target vector and the value vector.")])]),e._v(" "),a("h4",{attrs:{id:"_3-2-4-example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-example"}},[e._v("#")]),e._v(" 3.2.4 Example")]),e._v(" "),a("p",[e._v("The following is an example of a "),a("code",[e._v("_scoreDetails")]),e._v(" returned for a document matching a search query.")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"_rankingScoreDetails"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"words"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"order"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"matchingWords"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"maxMatchingWords"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"score"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"typo"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"order"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"typoCount"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"maxTypoCount"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"score"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"proximity"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"order"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"score"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"attribute"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"order"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("3")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"attributes_ranking_order"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0.8333333333333334")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"attributes_query_word_order"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"score"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0.8333333333333334")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"exactness"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"order"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("4")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"matchType"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"exactMatch"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"score"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"release_date:asc"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"order"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("5")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"value"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1165881600")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("h2",{attrs:{id:"_4-technical-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[e._v("#")]),e._v(" 4. Technical Details")]),e._v(" "),a("h3",{attrs:{id:"_4-1-ranking-score-calculation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-ranking-score-calculation"}},[e._v("#")]),e._v(" 4.1. Ranking score calculation")]),e._v(" "),a("p",[e._v("The ranking score calculation in this section is given for informative purposes and is not normative.")]),e._v(" "),a("p",[e._v("The implementation computes the "),a("a",{attrs:{href:"#31-ranking-score"}},[e._v("ranking score")]),e._v(" from each ranking rule (excluding "),a("code",[e._v("sort")]),e._v(" and "),a("code",[e._v("geosort")]),e._v(") with two bits of data per ranking rule. For the "),a("code",[e._v("k")]),e._v("th applied ranking rule:")]),e._v(" "),a("ul",[a("li",[e._v("The maximum rank "),a("code",[e._v("max_rank_k")]),e._v(" that a document can score with the rule, "),a("a",{attrs:{href:"#312-score-independence"}},[e._v("independently from the other documents in the index")])]),e._v(" "),a("li",[e._v("The rank "),a("code",[e._v("rank_k")]),e._v(" of that document for that rule, with the highest rank being equal to the maximum rank, and the lowest rank being equal to 1.")])]),e._v(" "),a("p",[e._v("The score is given by the following formula, assuming "),a("code",[e._v("n")]),e._v(" ranking rules denoted from "),a("code",[e._v("0")]),e._v(" to "),a("code",[e._v("n-1")]),e._v(":")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("score = sum(i in 0..(n-1), (rank_i - 1) / product(j in 0..=i, max_rank_j)) + (rank_(n-1) / product(i in 0..n, max_rank_i))\n")])])]),a("p",[e._v("The intuition behind this formula is that every document falls in a range for each rule, between "),a("code",[e._v("rank_i / max_rank_i")]),e._v(" and "),a("code",[e._v("(rank_i - 1) / max_rank_i")]),e._v(", and the next ranking rule allows to refine where the document is in this range, with the last ranking rule providing the exact score.")]),e._v(" "),a("h3",{attrs:{id:"_4-2-hidden-ranking-rules"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-hidden-ranking-rules"}},[e._v("#")]),e._v(" 4.2. Hidden ranking rules")]),e._v(" "),a("p",[e._v("If the "),a("RouterLink",{attrs:{to:"/specifications/text/0123-displayed-attributes-setting-api.html"}},[a("code",[e._v("displayedAttributes")])]),e._v(" list is defined, then attributes that are not part of that list, but are used in "),a("code",[e._v("sort")]),e._v(" ranking rules are "),a("strong",[e._v("hidden")]),e._v(".")],1),e._v(" "),a("p",[e._v("Instead of seeing "),a("code",[e._v("{:attribute-sorted-on}:{:sort-direction}")]),e._v(" like described in "),a("a",{attrs:{href:"#323-sort-ranking-rules"}},[e._v("the relevant section")]),e._v(", the name of that field is replaced with "),a("code",[e._v("")]),e._v(", with "),a("code",[e._v("{:number}")]),e._v(" a number that serves to uniquely distinguish between such hidden rules.")]),e._v(" "),a("p",[e._v("Note: that number is not guaranteed to start at 0 nor to be consecutive. The only guarantee is that no hidden ranking rule will have the same number.")]),e._v(" "),a("p",[e._v("Furthermore, the "),a("code",[e._v("value")]),e._v(" that was used to sort the document is also hidden and replaced by "),a("code",[e._v('""')]),e._v(".")]),e._v(" "),a("h3",{attrs:{id:"_4-3-disabled-optimization"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-3-disabled-optimization"}},[e._v("#")]),e._v(" 4.3. Disabled optimization")]),e._v(" "),a("p",[e._v("The engine optimizes search by skipping the application of ranking rules when there's only one remaining document (no tie to break).")]),e._v(" "),a("p",[e._v("To compute an accurate score, however, all ranking rules must be applied, so this optimization is disabled as soon as a score is requested in the search request. When no scores are requested, the optimization is active.")]),e._v(" "),a("h2",{attrs:{id:"_5-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),a("ul",[a("li",[e._v("Extend the "),a("RouterLink",{attrs:{to:"/specifications/text/0192-multi-search-api.html"}},[e._v("multi-search API")]),e._v(" to rerank documents according to their score, providing federated search.")],1)])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/65.cb3ec6ff.js b/docs/assets/js/65.509d9e2e.js similarity index 99% rename from docs/assets/js/65.cb3ec6ff.js rename to docs/assets/js/65.509d9e2e.js index 50dd544c4..9f7d9bf94 100644 --- a/docs/assets/js/65.cb3ec6ff.js +++ b/docs/assets/js/65.509d9e2e.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[65],{489:function(t,e,a){"use strict";a.r(e);var s=a(62),i=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"snapshots-api-and-cli"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#snapshots-api-and-cli"}},[t._v("#")]),t._v(" Snapshots API and CLI")]),t._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),a("p",[t._v("A snapshot is a compressed file containing an export of a MeiliSearch instance. It contains all indexes, documents, settings, tasks, and API keys.")]),t._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),a("p",[t._v("The snapshots exist to start a MeiliSearch instance from a database as fast as possible. It can be a helpful tool for loading a production state on a staging server to make changes and test them before propagating them to production.")]),t._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),a("h3",{attrs:{id:"_3-1-summary-key-points"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-summary-key-points"}},[t._v("#")]),t._v(" 3.1. Summary Key Points")]),t._v(" "),a("ul",[a("li",[t._v("A snapshot creation can be scheduled from the MeiliSearch API using the "),a("code",[t._v("POST - /snapshots")]),t._v(" endpoint.")]),t._v(" "),a("li",[t._v("A snapshot creation status can be tracked using the "),a("code",[t._v("GET - /tasks/:task_uid")]),t._v(" endpoint.")]),t._v(" "),a("li",[t._v("MeiliSearch will autobatch all your snapshots requests into one.")]),t._v(" "),a("li",[t._v("By default, snapshots are created in a folder named "),a("code",[t._v("snapshots")]),t._v(", and can be found in the same directory as the MeiliSearch binary.")]),t._v(" "),a("li",[t._v("The "),a("code",[t._v("snapshots")]),t._v(" directory can be customized using the "),a("code",[t._v("--snapshot-dir")]),t._v(" configuration option. If the snapshot directory does not already exist when the snapshot creation process is called, MeiliSearch will create it.")]),t._v(" "),a("li",[t._v("A "),a("code",[t._v(".snapshot")]),t._v(" file can be imported using the "),a("code",[t._v("--import-snapshot")]),t._v(" command-line flag.")]),t._v(" "),a("li",[t._v("The MeiliSearch server starts when the snapshot is fully imported.")]),t._v(" "),a("li",[t._v("By default, importing a snapshot when a database already exists (a non-empty "),a("code",[t._v("data.ms")]),t._v(" folder in the same directory as the MeiliSearch binary) will stop the process and throw an error.")]),t._v(" "),a("li",[t._v("When using the command-line flag "),a("code",[t._v("--ignore-snapshot-if-db-exists=true")]),t._v(", MeiliSearch will use the existing database to start an instance instead of throwing an error. The snapshot will be ignored.")]),t._v(" "),a("li",[t._v("By default, trying to import a snapshot that does not exist, will stop the process and throw an error.")]),t._v(" "),a("li",[t._v("When using the command-line flag "),a("code",[t._v("--ignore-missing-snapshot")]),t._v(", MeiliSearch will continue its process and not throw an error.")]),t._v(" "),a("li",[t._v("When a snapshot is being imported, the http API is not available. Meilisearch can't receive read or write requests.")]),t._v(" "),a("li",[a("code",[t._v("snapshotCreation")]),t._v(" task takes priority over enqueued "),a("code",[t._v("tasks")]),t._v(". This means that if a "),a("code",[t._v("snapshotCreation")]),t._v(" task is created, it will be directly processed when the current processing task finishes even if other tasks have been enqueued before.")])]),t._v(" "),a("hr"),t._v(" "),a("h3",{attrs:{id:"_3-2-snapshots-api-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-snapshots-api-definition"}},[t._v("#")]),t._v(" 3.2. Snapshots API Definition")]),t._v(" "),a("h4",{attrs:{id:"_3-2-1-post-snapshot"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-post-snapshot"}},[t._v("#")]),t._v(" 3.2.1. POST "),a("code",[t._v("/snapshot")])]),t._v(" "),a("p",[t._v("Create a snapshot")]),t._v(" "),a("h5",{attrs:{id:"_3-2-1-1-body-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-body-payload"}},[t._v("#")]),t._v(" 3.2.1.1. Body Payload")]),t._v(" "),a("p",[t._v("N/A")]),t._v(" "),a("h5",{attrs:{id:"_3-2-1-2-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-2-response-definition"}},[t._v("#")]),t._v(" 3.2.1.2. Response Definition")]),t._v(" "),a("p",[t._v("When the request is successful, Meilisearch returns the HTTP code "),a("code",[t._v("202 Accepted")]),t._v(". The response's content is the summarized representation of the received asynchronous task.")]),t._v(" "),a("p",[t._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[t._v("Summarized "),a("code",[t._v("task")]),t._v(" Object for "),a("code",[t._v("202 Accepted")])]),t._v(".")],1),t._v(" "),a("p",[t._v("The name of the generated snapshot is the database path ("),a("code",[t._v("data.ms")]),t._v(" by default), joined by the "),a("code",[t._v(".snapshot")]),t._v(" extension. By default, it's "),a("code",[t._v("data.ms.snapshot")]),t._v(".")]),t._v(" "),a("h5",{attrs:{id:"_3-2-1-3-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-3-errors"}},[t._v("#")]),t._v(" 3.2.1.3. Errors")]),t._v(" "),a("ul",[a("li",[t._v("🔴 If Meilisearch is secured, accessing this route without the "),a("code",[t._v("Authorization")]),t._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 If Meilisearch is secured, accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),a("hr"),t._v(" "),a("h3",{attrs:{id:"_3-3-cli-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-cli-definition"}},[t._v("#")]),t._v(" 3.3. CLI Definition")]),t._v(" "),a("p",[t._v("You can find the CLI informations about the snapshots "),a("RouterLink",{attrs:{to:"/specifications/text/text/0119-instance-options.html"}},[t._v("here")])],1),t._v(" "),a("h2",{attrs:{id:"_4-technical-aspects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-aspects"}},[t._v("#")]),t._v(" 4. Technical Aspects")]),t._v(" "),a("h3",{attrs:{id:"_4-1-snapshot-creation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-snapshot-creation"}},[t._v("#")]),t._v(" 4.1. Snapshot Creation")]),t._v(" "),a("p",[t._v("When a snapshot is being created, the task queue can receive other future operations to perform.")]),t._v(" "),a("h3",{attrs:{id:"_4-2-importing-a-snapshot"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-importing-a-snapshot"}},[t._v("#")]),t._v(" 4.2. Importing a snapshot")]),t._v(" "),a("p",[t._v("When a snapshot is being imported, the http API is not available. Meilisearch can't receive read or write requests.")]),t._v(" "),a("h3",{attrs:{id:"_4-3-snapshot-creation-task-priority"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-3-snapshot-creation-task-priority"}},[t._v("#")]),t._v(" 4.3. Snapshot Creation Task Priority")]),t._v(" "),a("p",[t._v("Snapshot creation tasks have priority over other task types. If a "),a("code",[t._v("snapshotCreation")]),t._v(" task is enqueued, it will be directly processed when the current processing task finishes even if other tasks have been enqueued before.")]),t._v(" "),a("h2",{attrs:{id:"_5-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[t._v("#")]),t._v(" 5. Future Possibilities")]),t._v(" "),a("ul",[a("li",[t._v("Give information about who created the task (is it scheduled or created on a user demand) in the details.")])])])}),[],!1,null,null,null);e.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[65],{488:function(t,e,a){"use strict";a.r(e);var s=a(62),i=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"snapshots-api-and-cli"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#snapshots-api-and-cli"}},[t._v("#")]),t._v(" Snapshots API and CLI")]),t._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),a("p",[t._v("A snapshot is a compressed file containing an export of a MeiliSearch instance. It contains all indexes, documents, settings, tasks, and API keys.")]),t._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),a("p",[t._v("The snapshots exist to start a MeiliSearch instance from a database as fast as possible. It can be a helpful tool for loading a production state on a staging server to make changes and test them before propagating them to production.")]),t._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),a("h3",{attrs:{id:"_3-1-summary-key-points"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-summary-key-points"}},[t._v("#")]),t._v(" 3.1. Summary Key Points")]),t._v(" "),a("ul",[a("li",[t._v("A snapshot creation can be scheduled from the MeiliSearch API using the "),a("code",[t._v("POST - /snapshots")]),t._v(" endpoint.")]),t._v(" "),a("li",[t._v("A snapshot creation status can be tracked using the "),a("code",[t._v("GET - /tasks/:task_uid")]),t._v(" endpoint.")]),t._v(" "),a("li",[t._v("MeiliSearch will autobatch all your snapshots requests into one.")]),t._v(" "),a("li",[t._v("By default, snapshots are created in a folder named "),a("code",[t._v("snapshots")]),t._v(", and can be found in the same directory as the MeiliSearch binary.")]),t._v(" "),a("li",[t._v("The "),a("code",[t._v("snapshots")]),t._v(" directory can be customized using the "),a("code",[t._v("--snapshot-dir")]),t._v(" configuration option. If the snapshot directory does not already exist when the snapshot creation process is called, MeiliSearch will create it.")]),t._v(" "),a("li",[t._v("A "),a("code",[t._v(".snapshot")]),t._v(" file can be imported using the "),a("code",[t._v("--import-snapshot")]),t._v(" command-line flag.")]),t._v(" "),a("li",[t._v("The MeiliSearch server starts when the snapshot is fully imported.")]),t._v(" "),a("li",[t._v("By default, importing a snapshot when a database already exists (a non-empty "),a("code",[t._v("data.ms")]),t._v(" folder in the same directory as the MeiliSearch binary) will stop the process and throw an error.")]),t._v(" "),a("li",[t._v("When using the command-line flag "),a("code",[t._v("--ignore-snapshot-if-db-exists=true")]),t._v(", MeiliSearch will use the existing database to start an instance instead of throwing an error. The snapshot will be ignored.")]),t._v(" "),a("li",[t._v("By default, trying to import a snapshot that does not exist, will stop the process and throw an error.")]),t._v(" "),a("li",[t._v("When using the command-line flag "),a("code",[t._v("--ignore-missing-snapshot")]),t._v(", MeiliSearch will continue its process and not throw an error.")]),t._v(" "),a("li",[t._v("When a snapshot is being imported, the http API is not available. Meilisearch can't receive read or write requests.")]),t._v(" "),a("li",[a("code",[t._v("snapshotCreation")]),t._v(" task takes priority over enqueued "),a("code",[t._v("tasks")]),t._v(". This means that if a "),a("code",[t._v("snapshotCreation")]),t._v(" task is created, it will be directly processed when the current processing task finishes even if other tasks have been enqueued before.")])]),t._v(" "),a("hr"),t._v(" "),a("h3",{attrs:{id:"_3-2-snapshots-api-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-snapshots-api-definition"}},[t._v("#")]),t._v(" 3.2. Snapshots API Definition")]),t._v(" "),a("h4",{attrs:{id:"_3-2-1-post-snapshot"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-post-snapshot"}},[t._v("#")]),t._v(" 3.2.1. POST "),a("code",[t._v("/snapshot")])]),t._v(" "),a("p",[t._v("Create a snapshot")]),t._v(" "),a("h5",{attrs:{id:"_3-2-1-1-body-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-body-payload"}},[t._v("#")]),t._v(" 3.2.1.1. Body Payload")]),t._v(" "),a("p",[t._v("N/A")]),t._v(" "),a("h5",{attrs:{id:"_3-2-1-2-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-2-response-definition"}},[t._v("#")]),t._v(" 3.2.1.2. Response Definition")]),t._v(" "),a("p",[t._v("When the request is successful, Meilisearch returns the HTTP code "),a("code",[t._v("202 Accepted")]),t._v(". The response's content is the summarized representation of the received asynchronous task.")]),t._v(" "),a("p",[t._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[t._v("Summarized "),a("code",[t._v("task")]),t._v(" Object for "),a("code",[t._v("202 Accepted")])]),t._v(".")],1),t._v(" "),a("p",[t._v("The name of the generated snapshot is the database path ("),a("code",[t._v("data.ms")]),t._v(" by default), joined by the "),a("code",[t._v(".snapshot")]),t._v(" extension. By default, it's "),a("code",[t._v("data.ms.snapshot")]),t._v(".")]),t._v(" "),a("h5",{attrs:{id:"_3-2-1-3-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-3-errors"}},[t._v("#")]),t._v(" 3.2.1.3. Errors")]),t._v(" "),a("ul",[a("li",[t._v("🔴 If Meilisearch is secured, accessing this route without the "),a("code",[t._v("Authorization")]),t._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 If Meilisearch is secured, accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),a("hr"),t._v(" "),a("h3",{attrs:{id:"_3-3-cli-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-cli-definition"}},[t._v("#")]),t._v(" 3.3. CLI Definition")]),t._v(" "),a("p",[t._v("You can find the CLI informations about the snapshots "),a("RouterLink",{attrs:{to:"/specifications/text/text/0119-instance-options.html"}},[t._v("here")])],1),t._v(" "),a("h2",{attrs:{id:"_4-technical-aspects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-aspects"}},[t._v("#")]),t._v(" 4. Technical Aspects")]),t._v(" "),a("h3",{attrs:{id:"_4-1-snapshot-creation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-snapshot-creation"}},[t._v("#")]),t._v(" 4.1. Snapshot Creation")]),t._v(" "),a("p",[t._v("When a snapshot is being created, the task queue can receive other future operations to perform.")]),t._v(" "),a("h3",{attrs:{id:"_4-2-importing-a-snapshot"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-importing-a-snapshot"}},[t._v("#")]),t._v(" 4.2. Importing a snapshot")]),t._v(" "),a("p",[t._v("When a snapshot is being imported, the http API is not available. Meilisearch can't receive read or write requests.")]),t._v(" "),a("h3",{attrs:{id:"_4-3-snapshot-creation-task-priority"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-3-snapshot-creation-task-priority"}},[t._v("#")]),t._v(" 4.3. Snapshot Creation Task Priority")]),t._v(" "),a("p",[t._v("Snapshot creation tasks have priority over other task types. If a "),a("code",[t._v("snapshotCreation")]),t._v(" task is enqueued, it will be directly processed when the current processing task finishes even if other tasks have been enqueued before.")]),t._v(" "),a("h2",{attrs:{id:"_5-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[t._v("#")]),t._v(" 5. Future Possibilities")]),t._v(" "),a("ul",[a("li",[t._v("Give information about who created the task (is it scheduled or created on a user demand) in the details.")])])])}),[],!1,null,null,null);e.default=i.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/67.6322aeae.js b/docs/assets/js/67.408423ca.js similarity index 99% rename from docs/assets/js/67.6322aeae.js rename to docs/assets/js/67.408423ca.js index 3a97abe32..6cc4d5c87 100644 --- a/docs/assets/js/67.6322aeae.js +++ b/docs/assets/js/67.408423ca.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[67],{491:function(e,t,a){"use strict";a.r(t);var s=a(62),r=Object(s.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"faceting-settings-api"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#faceting-settings-api"}},[e._v("#")]),e._v(" Faceting Settings API")]),e._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("This specification describes the customizable options for the faceting settings.")]),e._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[e._v("Despite the default values that work out-of-the-box for most users, some need to go further in customization.")]),e._v(" "),a("p",[e._v("This settings will host the parameters to configure the faceting behavior for an index.")]),e._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("h3",{attrs:{id:"_3-1-faceting-api-resource-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-faceting-api-resource-definition"}},[e._v("#")]),e._v(" 3.1. "),a("code",[e._v("faceting")]),e._v(" API resource definition")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Field")]),e._v(" "),a("th",[e._v("Type")]),e._v(" "),a("th",[e._v("Required")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("a",{attrs:{href:"#311-maxValuesPerFacet"}},[e._v("maxValuesPerFacet")])]),e._v(" "),a("td",[e._v("Integer")]),e._v(" "),a("td",[e._v("False")])]),e._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#312-sortFacetValuesBy"}},[e._v("sortFacetValuesBy")])]),e._v(" "),a("td",[e._v("Object")]),e._v(" "),a("td",[e._v("False")])])])]),e._v(" "),a("h4",{attrs:{id:"_3-1-1-maxvaluesperfacet"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-maxvaluesperfacet"}},[e._v("#")]),e._v(" 3.1.1. "),a("code",[e._v("maxValuesPerFacet")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Integer")]),e._v(" "),a("li",[e._v("Required: False")]),e._v(" "),a("li",[e._v("Default: "),a("code",[e._v("100")])])]),e._v(" "),a("p",[e._v("Define maximum number of value returned for all distributed facets.")]),e._v(" "),a("p",[e._v("e.g. It means that with the default value of "),a("code",[e._v("100")]),e._v(", it is not possible to have "),a("code",[e._v("101")]),e._v(" different colors if the "),a("code",[e._v("color")]),e._v(" field is defined as a facet at search time.")]),e._v(" "),a("p",[e._v("The value of 100 ensures good performance and prevents malicious users from scraping data from a Meilisearch instance.")]),e._v(" "),a("p",[e._v("Increasing this value can degrade performance as well as expose the data of an instance to scrapping.")]),e._v(" "),a("p",[e._v("The facets that are returned are sorted in ascending lexicographical order.")]),e._v(" "),a("h4",{attrs:{id:"_3-1-2-sortfacetvaluesby"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-sortfacetvaluesby"}},[e._v("#")]),e._v(" 3.1.2 "),a("code",[e._v("sortFacetValuesBy")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Object")]),e._v(" "),a("li",[e._v("Required: False")]),e._v(" "),a("li",[e._v("Default:")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"alpha"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("Defines how facet values are sorted. By default, all facets ("),a("code",[e._v("*")]),e._v(") are sorted by name, alphanumerically in ascending order ("),a("code",[e._v("alpha")]),e._v(").")]),e._v(" "),a("p",[e._v("It is possible to sort them by the number of documents containing a facet value in descending order using "),a("code",[e._v("count")]),e._v(".")]),e._v(" "),a("p",[e._v("It is possible to specify a particular order for a facet.")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"alpha"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"genre"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"count"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("In this example, values from facets other than "),a("code",[e._v("genres")]),e._v(" will be displayed sorted by their name in ascending alphanumeric order, while values from the "),a("code",[e._v("genres")]),e._v(" facet will be sorted in descending order by the count of the number of documents containing each value.")]),e._v(" "),a("h2",{attrs:{id:"_3-2-api-endpoints-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2. API Endpoints Definition")]),e._v(" "),a("h3",{attrs:{id:"_3-2-1-global-settings-api-endpoints-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-global-settings-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2.1. Global Settings API Endpoints Definition")]),e._v(" "),a("p",[a("code",[e._v("faceting")]),e._v(" is a sub-resource of "),a("code",[e._v("/indexes/:index_uid/settings")]),e._v(".")]),e._v(" "),a("p",[e._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html"}},[e._v("Settings API")]),e._v(".")],1),e._v(" "),a("h3",{attrs:{id:"_3-2-2-indexes-index-uid-settings-faceting"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-indexes-index-uid-settings-faceting"}},[e._v("#")]),e._v(" 3.2.2. "),a("code",[e._v("indexes/:index_uid/settings/faceting")])]),e._v(" "),a("p",[e._v("Manage the faceting configuration for an index.")]),e._v(" "),a("h4",{attrs:{id:"_3-2-2-1-get-indexes-index-uid-settings-faceting"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-get-indexes-index-uid-settings-faceting"}},[e._v("#")]),e._v(" 3.2.2.1. "),a("code",[e._v("GET")]),e._v(" - "),a("code",[e._v("indexes/:index_uid/settings/faceting")])]),e._v(" "),a("p",[e._v("Allow fetching the current definition of the faceting setting for an index.")]),e._v(" "),a("p",[a("code",[e._v("200")]),e._v(" - Response body")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"maxValuesPerFacet"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("100")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"sortFacetValuesBy"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"alpha"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("All properties must be returned when the resource is retrieved.")]),e._v(" "),a("h5",{attrs:{id:"_3-2-2-1-2-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-2-errors"}},[e._v("#")]),e._v(" 3.2.2.1.2. Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Sending an invalid index uid format for the "),a("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 If the index does not exist, the API returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),a("h4",{attrs:{id:"_3-2-2-2-patch-indexes-index-uid-settings-faceting"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-patch-indexes-index-uid-settings-faceting"}},[e._v("#")]),e._v(" 3.2.2.2. "),a("code",[e._v("PATCH")]),e._v(" - "),a("code",[e._v("indexes/:index_uid/settings/faceting")])]),e._v(" "),a("p",[e._v("Allow customizing partially the settings of an index for faceting.")]),e._v(" "),a("p",[e._v("Request payload")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"maxValuesPerFacet"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("10")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[a("code",[e._v("202 Accepted")]),e._v(" - Example Response")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"uid"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("42")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"indexUid"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"books"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"status"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"enqueued"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"settingsUpdate"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"enqueuedAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2022-03-01T18:39:29.228155Z"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("h5",{attrs:{id:"_3-2-2-2-1-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-1-response-definition"}},[e._v("#")]),e._v(" 3.2.2.2.1. Response Definition")]),e._v(" "),a("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),a("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),a("p",[e._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),a("code",[e._v("task")]),e._v(" Object for "),a("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),a("h5",{attrs:{id:"_3-2-2-2-2-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-2-errors"}},[e._v("#")]),e._v(" 3.2.2.2.2. Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Omitting Content-Type header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an empty Content-Type returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a different Content-Type than "),a("code",[e._v("application/json")]),e._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an empty payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid JSON payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid index uid format for the "),a("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a value different from "),a("code",[e._v("null")]),e._v(" or with a different type than "),a("code",[e._v("Integer")]),e._v(" for the "),a("code",[e._v("maxValuesPerFacet")]),e._v(" field returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_faceting"}},[e._v("invalid_settings_faceting")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a value different from "),a("code",[e._v("null")]),e._v(" or an object with value with a different type than "),a("code",[e._v('"alpha"')]),e._v(" or "),a("code",[e._v('"count"')]),e._v(" for the "),a("code",[e._v("sortFacetValuesBy")]),e._v(" field returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_faceting"}},[e._v("invalid_settings_faceting")]),e._v(" error.")],1)]),e._v(" "),a("h6",{attrs:{id:"_3-2-2-2-2-1-async-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-2-1-async-errors"}},[e._v("#")]),e._v(" 3.2.2.2.2.1. Async Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 When Meilisearch is secured, if the API Key do not have the "),a("code",[e._v("indexes.create")]),e._v(" action defined, the API returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related asynchronous "),a("code",[e._v("task")]),e._v(" resource. See "),a("a",{attrs:{href:"#32221-response-definition"}},[e._v("3.2.2.2.1. Response Definition")]),e._v(".")],1)]),e._v(" "),a("blockquote",[a("p",[e._v("Otherwise, Meilisearch will create the index in a lazy way. See "),a("a",{attrs:{href:"#32223-lazy-index-creation"}},[e._v("3.2.2.2.3. Lazy Index Creation")]),e._v(".")])]),e._v(" "),a("h5",{attrs:{id:"_3-2-2-2-3-lazy-index-creation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-3-lazy-index-creation"}},[e._v("#")]),e._v(" 3.2.2.2.3. Lazy Index Creation")]),e._v(" "),a("p",[e._v("If the requested "),a("code",[e._v("index_uid")]),e._v(" does not exist, and the authorization layer allows it (See "),a("a",{attrs:{href:"#322221-async-errors"}},[e._v("3.2.2.2.2.1. Async Errors")]),e._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),a("a",{attrs:{href:"#32221-response-definition"}},[e._v("3.2.2.2.1. Response Definition")]),e._v(".")]),e._v(" "),a("h4",{attrs:{id:"_3-2-2-3-delete-indexes-index-uid-settings-faceting"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-3-delete-indexes-index-uid-settings-faceting"}},[e._v("#")]),e._v(" 3.2.2.3. "),a("code",[e._v("DELETE")]),e._v("- "),a("code",[e._v("indexes/:index_uid/settings/faceting")])]),e._v(" "),a("p",[e._v("Allow resetting the faceting setting to the default for an index.")]),e._v(" "),a("h5",{attrs:{id:"_3-2-2-3-1-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-3-1-response-definition"}},[e._v("#")]),e._v(" 3.2.2.3.1. Response Definition")]),e._v(" "),a("p",[e._v("When the request is in a successful state, Meilisearch returns the HTTP code "),a("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),a("p",[e._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),a("code",[e._v("task")]),e._v(" Object for "),a("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),a("h5",{attrs:{id:"_3-2-2-3-2-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-3-2-errors"}},[e._v("#")]),e._v(" 3.2.2.3.2. Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Sending an invalid index uid format for the "),a("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1)]),e._v(" "),a("h6",{attrs:{id:"_3-2-2-3-2-1-asynchronous-index-not-found-error"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-3-2-1-asynchronous-index-not-found-error"}},[e._v("#")]),e._v(" 3.2.2.3.2.1. Asynchronous Index Not Found Error")]),e._v(" "),a("ul",[a("li",[e._v("🔴 If the requested "),a("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related async "),a("code",[e._v("task")]),e._v(" resource. See "),a("a",{attrs:{href:"#32231-response-definition"}},[e._v("3.2.2.3.1. Response Definition")]),e._v(".")],1)]),e._v(" "),a("h3",{attrs:{id:"_3-2-3-general-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-general-errors"}},[e._v("#")]),e._v(" 3.2.3. General Errors")]),e._v(" "),a("p",[e._v("These errors apply to all endpoints described here.")]),e._v(" "),a("h4",{attrs:{id:"_3-2-3-1-auth-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-1-auth-errors"}},[e._v("#")]),e._v(" 3.2.3.1. Auth Errors")]),e._v(" "),a("p",[e._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Accessing this route without the "),a("code",[e._v("Authorization")]),e._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),a("h2",{attrs:{id:"_2-technical-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-details"}},[e._v("#")]),e._v(" 2. Technical Details")]),e._v(" "),a("p",[e._v("n/a")]),e._v(" "),a("h2",{attrs:{id:"_3-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[e._v("#")]),e._v(" 3. Future Possibilities")]),e._v(" "),a("p",[e._v("n/a")])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[67],{489:function(e,t,a){"use strict";a.r(t);var s=a(62),r=Object(s.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"faceting-settings-api"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#faceting-settings-api"}},[e._v("#")]),e._v(" Faceting Settings API")]),e._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("This specification describes the customizable options for the faceting settings.")]),e._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[e._v("Despite the default values that work out-of-the-box for most users, some need to go further in customization.")]),e._v(" "),a("p",[e._v("This settings will host the parameters to configure the faceting behavior for an index.")]),e._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("h3",{attrs:{id:"_3-1-faceting-api-resource-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-faceting-api-resource-definition"}},[e._v("#")]),e._v(" 3.1. "),a("code",[e._v("faceting")]),e._v(" API resource definition")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Field")]),e._v(" "),a("th",[e._v("Type")]),e._v(" "),a("th",[e._v("Required")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("a",{attrs:{href:"#311-maxValuesPerFacet"}},[e._v("maxValuesPerFacet")])]),e._v(" "),a("td",[e._v("Integer")]),e._v(" "),a("td",[e._v("False")])]),e._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#312-sortFacetValuesBy"}},[e._v("sortFacetValuesBy")])]),e._v(" "),a("td",[e._v("Object")]),e._v(" "),a("td",[e._v("False")])])])]),e._v(" "),a("h4",{attrs:{id:"_3-1-1-maxvaluesperfacet"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-maxvaluesperfacet"}},[e._v("#")]),e._v(" 3.1.1. "),a("code",[e._v("maxValuesPerFacet")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Integer")]),e._v(" "),a("li",[e._v("Required: False")]),e._v(" "),a("li",[e._v("Default: "),a("code",[e._v("100")])])]),e._v(" "),a("p",[e._v("Define maximum number of value returned for all distributed facets.")]),e._v(" "),a("p",[e._v("e.g. It means that with the default value of "),a("code",[e._v("100")]),e._v(", it is not possible to have "),a("code",[e._v("101")]),e._v(" different colors if the "),a("code",[e._v("color")]),e._v(" field is defined as a facet at search time.")]),e._v(" "),a("p",[e._v("The value of 100 ensures good performance and prevents malicious users from scraping data from a Meilisearch instance.")]),e._v(" "),a("p",[e._v("Increasing this value can degrade performance as well as expose the data of an instance to scrapping.")]),e._v(" "),a("p",[e._v("The facets that are returned are sorted in ascending lexicographical order.")]),e._v(" "),a("h4",{attrs:{id:"_3-1-2-sortfacetvaluesby"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-sortfacetvaluesby"}},[e._v("#")]),e._v(" 3.1.2 "),a("code",[e._v("sortFacetValuesBy")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Object")]),e._v(" "),a("li",[e._v("Required: False")]),e._v(" "),a("li",[e._v("Default:")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"alpha"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("Defines how facet values are sorted. By default, all facets ("),a("code",[e._v("*")]),e._v(") are sorted by name, alphanumerically in ascending order ("),a("code",[e._v("alpha")]),e._v(").")]),e._v(" "),a("p",[e._v("It is possible to sort them by the number of documents containing a facet value in descending order using "),a("code",[e._v("count")]),e._v(".")]),e._v(" "),a("p",[e._v("It is possible to specify a particular order for a facet.")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"alpha"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"genre"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"count"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("In this example, values from facets other than "),a("code",[e._v("genres")]),e._v(" will be displayed sorted by their name in ascending alphanumeric order, while values from the "),a("code",[e._v("genres")]),e._v(" facet will be sorted in descending order by the count of the number of documents containing each value.")]),e._v(" "),a("h2",{attrs:{id:"_3-2-api-endpoints-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2. API Endpoints Definition")]),e._v(" "),a("h3",{attrs:{id:"_3-2-1-global-settings-api-endpoints-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-global-settings-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2.1. Global Settings API Endpoints Definition")]),e._v(" "),a("p",[a("code",[e._v("faceting")]),e._v(" is a sub-resource of "),a("code",[e._v("/indexes/:index_uid/settings")]),e._v(".")]),e._v(" "),a("p",[e._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html"}},[e._v("Settings API")]),e._v(".")],1),e._v(" "),a("h3",{attrs:{id:"_3-2-2-indexes-index-uid-settings-faceting"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-indexes-index-uid-settings-faceting"}},[e._v("#")]),e._v(" 3.2.2. "),a("code",[e._v("indexes/:index_uid/settings/faceting")])]),e._v(" "),a("p",[e._v("Manage the faceting configuration for an index.")]),e._v(" "),a("h4",{attrs:{id:"_3-2-2-1-get-indexes-index-uid-settings-faceting"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-get-indexes-index-uid-settings-faceting"}},[e._v("#")]),e._v(" 3.2.2.1. "),a("code",[e._v("GET")]),e._v(" - "),a("code",[e._v("indexes/:index_uid/settings/faceting")])]),e._v(" "),a("p",[e._v("Allow fetching the current definition of the faceting setting for an index.")]),e._v(" "),a("p",[a("code",[e._v("200")]),e._v(" - Response body")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"maxValuesPerFacet"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("100")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"sortFacetValuesBy"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"alpha"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("All properties must be returned when the resource is retrieved.")]),e._v(" "),a("h5",{attrs:{id:"_3-2-2-1-2-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-2-errors"}},[e._v("#")]),e._v(" 3.2.2.1.2. Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Sending an invalid index uid format for the "),a("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 If the index does not exist, the API returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),a("h4",{attrs:{id:"_3-2-2-2-patch-indexes-index-uid-settings-faceting"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-patch-indexes-index-uid-settings-faceting"}},[e._v("#")]),e._v(" 3.2.2.2. "),a("code",[e._v("PATCH")]),e._v(" - "),a("code",[e._v("indexes/:index_uid/settings/faceting")])]),e._v(" "),a("p",[e._v("Allow customizing partially the settings of an index for faceting.")]),e._v(" "),a("p",[e._v("Request payload")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"maxValuesPerFacet"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("10")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[a("code",[e._v("202 Accepted")]),e._v(" - Example Response")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"uid"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("42")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"indexUid"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"books"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"status"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"enqueued"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"settingsUpdate"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"enqueuedAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2022-03-01T18:39:29.228155Z"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("h5",{attrs:{id:"_3-2-2-2-1-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-1-response-definition"}},[e._v("#")]),e._v(" 3.2.2.2.1. Response Definition")]),e._v(" "),a("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),a("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),a("p",[e._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),a("code",[e._v("task")]),e._v(" Object for "),a("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),a("h5",{attrs:{id:"_3-2-2-2-2-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-2-errors"}},[e._v("#")]),e._v(" 3.2.2.2.2. Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Omitting Content-Type header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an empty Content-Type returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a different Content-Type than "),a("code",[e._v("application/json")]),e._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an empty payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid JSON payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid index uid format for the "),a("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a value different from "),a("code",[e._v("null")]),e._v(" or with a different type than "),a("code",[e._v("Integer")]),e._v(" for the "),a("code",[e._v("maxValuesPerFacet")]),e._v(" field returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_faceting"}},[e._v("invalid_settings_faceting")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a value different from "),a("code",[e._v("null")]),e._v(" or an object with value with a different type than "),a("code",[e._v('"alpha"')]),e._v(" or "),a("code",[e._v('"count"')]),e._v(" for the "),a("code",[e._v("sortFacetValuesBy")]),e._v(" field returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_faceting"}},[e._v("invalid_settings_faceting")]),e._v(" error.")],1)]),e._v(" "),a("h6",{attrs:{id:"_3-2-2-2-2-1-async-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-2-1-async-errors"}},[e._v("#")]),e._v(" 3.2.2.2.2.1. Async Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 When Meilisearch is secured, if the API Key do not have the "),a("code",[e._v("indexes.create")]),e._v(" action defined, the API returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related asynchronous "),a("code",[e._v("task")]),e._v(" resource. See "),a("a",{attrs:{href:"#32221-response-definition"}},[e._v("3.2.2.2.1. Response Definition")]),e._v(".")],1)]),e._v(" "),a("blockquote",[a("p",[e._v("Otherwise, Meilisearch will create the index in a lazy way. See "),a("a",{attrs:{href:"#32223-lazy-index-creation"}},[e._v("3.2.2.2.3. Lazy Index Creation")]),e._v(".")])]),e._v(" "),a("h5",{attrs:{id:"_3-2-2-2-3-lazy-index-creation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-3-lazy-index-creation"}},[e._v("#")]),e._v(" 3.2.2.2.3. Lazy Index Creation")]),e._v(" "),a("p",[e._v("If the requested "),a("code",[e._v("index_uid")]),e._v(" does not exist, and the authorization layer allows it (See "),a("a",{attrs:{href:"#322221-async-errors"}},[e._v("3.2.2.2.2.1. Async Errors")]),e._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),a("a",{attrs:{href:"#32221-response-definition"}},[e._v("3.2.2.2.1. Response Definition")]),e._v(".")]),e._v(" "),a("h4",{attrs:{id:"_3-2-2-3-delete-indexes-index-uid-settings-faceting"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-3-delete-indexes-index-uid-settings-faceting"}},[e._v("#")]),e._v(" 3.2.2.3. "),a("code",[e._v("DELETE")]),e._v("- "),a("code",[e._v("indexes/:index_uid/settings/faceting")])]),e._v(" "),a("p",[e._v("Allow resetting the faceting setting to the default for an index.")]),e._v(" "),a("h5",{attrs:{id:"_3-2-2-3-1-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-3-1-response-definition"}},[e._v("#")]),e._v(" 3.2.2.3.1. Response Definition")]),e._v(" "),a("p",[e._v("When the request is in a successful state, Meilisearch returns the HTTP code "),a("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),a("p",[e._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),a("code",[e._v("task")]),e._v(" Object for "),a("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),a("h5",{attrs:{id:"_3-2-2-3-2-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-3-2-errors"}},[e._v("#")]),e._v(" 3.2.2.3.2. Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Sending an invalid index uid format for the "),a("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1)]),e._v(" "),a("h6",{attrs:{id:"_3-2-2-3-2-1-asynchronous-index-not-found-error"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-3-2-1-asynchronous-index-not-found-error"}},[e._v("#")]),e._v(" 3.2.2.3.2.1. Asynchronous Index Not Found Error")]),e._v(" "),a("ul",[a("li",[e._v("🔴 If the requested "),a("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related async "),a("code",[e._v("task")]),e._v(" resource. See "),a("a",{attrs:{href:"#32231-response-definition"}},[e._v("3.2.2.3.1. Response Definition")]),e._v(".")],1)]),e._v(" "),a("h3",{attrs:{id:"_3-2-3-general-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-general-errors"}},[e._v("#")]),e._v(" 3.2.3. General Errors")]),e._v(" "),a("p",[e._v("These errors apply to all endpoints described here.")]),e._v(" "),a("h4",{attrs:{id:"_3-2-3-1-auth-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-1-auth-errors"}},[e._v("#")]),e._v(" 3.2.3.1. Auth Errors")]),e._v(" "),a("p",[e._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Accessing this route without the "),a("code",[e._v("Authorization")]),e._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),a("h2",{attrs:{id:"_2-technical-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-details"}},[e._v("#")]),e._v(" 2. Technical Details")]),e._v(" "),a("p",[e._v("n/a")]),e._v(" "),a("h2",{attrs:{id:"_3-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[e._v("#")]),e._v(" 3. Future Possibilities")]),e._v(" "),a("p",[e._v("n/a")])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/app.d296da56.js b/docs/assets/js/app.49dbf5bb.js similarity index 79% rename from docs/assets/js/app.d296da56.js rename to docs/assets/js/app.49dbf5bb.js index f6e07839c..9e8c2c0d0 100644 --- a/docs/assets/js/app.d296da56.js +++ b/docs/assets/js/app.49dbf5bb.js @@ -1,4 +1,4 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[]]);!function(t){function e(e){for(var i,a,l=e[0],s=e[1],u=e[2],f=0,p=[];f=n.length?{value:void 0,done:!0}:(t=i(n,r),e.index+=t.length,{value:t,done:!1})}))},function(t,e,n){var i=n(8),r=n(12),o=n(35);t.exports=i?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var i=n(0),r=n(4),o=n(50),a=i.TypeError;t.exports=function(t){if(r(t))return t;throw a(o(t)+" is not a function")}},function(t,e,n){var i=n(168),r="object"==typeof self&&self&&self.Object===Object&&self,o=i||r||Function("return this")();t.exports=o},function(t,e,n){var i=n(3),r=i({}.toString),o=i("".slice);t.exports=function(t){return o(r(t),8,-1)}},function(t,e,n){var i,r=n(11),o=n(126),a=n(101),l=n(51),s=n(136),u=n(68),c=n(73),f=c("IE_PROTO"),p=function(){},v=function(t){return" + diff --git a/docs/specifications/LICENSE.html b/docs/specifications/LICENSE.html index 8971c777f..df72eb466 100644 --- a/docs/specifications/LICENSE.html +++ b/docs/specifications/LICENSE.html @@ -8,7 +8,7 @@ - + @@ -29,6 +29,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

- + diff --git a/docs/specifications/index.html b/docs/specifications/index.html index be864b55f..adb086011 100644 --- a/docs/specifications/index.html +++ b/docs/specifications/index.html @@ -8,7 +8,7 @@ - + @@ -18,6 +18,6 @@ Specification

# Specifications Workflow

This repository manages the specifications of the Meilisearch API. Specifications are meant to describe the expected behavior on a high level and point out identified corner cases.

# Draft State: Create a new PR

To start a new specification, a new branch must start

If a new specification file needs to be introduced, you must create a new file in this folder (opens new window) following the pattern: PR_number-feature-name.md. e.g. if PR number 12 is about facetting, the newly introduced specification file will be named 0012-facetting.md.

Note that a pull request not strictly dealing about a specification conception will be tagged as Not A Spec. e.g. A pull-request updating this file will be tagged with the Not A Spec label.

The pull-request template must be filled in when the pull-request is created.

# Review State

It's up to the maintainers of this repository to decide when the PR is ready to be reviewed and which persons should review it.

The PR must be tagged as Ready For Review to enter this stage.

To be validated, it must be reviewed and approved by peers, ideally:

# Merge State

To be merged, a specification pull-request should follow the given rules:


# Release Worfklow

The following steps should happen the day a Meilisearch release is shipped:


# Specification File Format

Meilisearch's feature specifications are made up of five sections, described below.

# 1. Summary

Summarize the specification with a short paragraph.

# 2. Motivation

Explain which use cases are supported.

# 3. Functional Specification

This section gives a high level overview of the feature. It should avoid technical language so that it can be understood by a general audience (think user-level).

# 4. Technical Details (Optional)

When needed, we recommend describing practical aspects of implementation, e.g. specific algorithmic choices. If none, fill the section body with "n/a".

# 5. Future Possibilities (Optional)

This last section includes any related topics or features which are not currently in Meilisearch and will not be added now, but which may be explored in the future. If none, fill the section body with "n/a".

- + diff --git a/docs/specifications/pull_request_template.html b/docs/specifications/pull_request_template.html index 7ba39de83..60462d1f3 100644 --- a/docs/specifications/pull_request_template.html +++ b/docs/specifications/pull_request_template.html @@ -8,7 +8,7 @@ - + @@ -17,6 +17,6 @@

🤖 API Diff Put the link of the GitHub comment generated by bump.sh if generated; Apply the OpenApi label


# Summary

Explain with a few sentences the goal of the specification


# Changes

Explain in a clear way the changes bring by the specification; Bullet points FTW;

# Out Of Scope

Explain in clear way subjects that are out of scope and shouldn't be discussed by the reviewers


# Attention To Reviewers

Explain clearly what reviewers should specifically look for to facilitate the review phase. Also, mention the sections that will not necessarily be taken into account if reviewed.


# Misc

- + diff --git a/docs/specifications/text/0000-specification-template.html b/docs/specifications/text/0000-specification-template.html index 74830ebb2..9dac1ad80 100644 --- a/docs/specifications/text/0000-specification-template.html +++ b/docs/specifications/text/0000-specification-template.html @@ -8,7 +8,7 @@ - + @@ -21,6 +21,6 @@ →

- + diff --git a/docs/specifications/text/0001-frontend-disable-prod.html b/docs/specifications/text/0001-frontend-disable-prod.html index 4ef65e3c9..d9995d989 100644 --- a/docs/specifications/text/0001-frontend-disable-prod.html +++ b/docs/specifications/text/0001-frontend-disable-prod.html @@ -8,7 +8,7 @@ - + @@ -25,6 +25,6 @@ →

- + diff --git a/docs/specifications/text/0001-script-based-tokenizer.html b/docs/specifications/text/0001-script-based-tokenizer.html index 0b1fefe93..a6fd54b0f 100644 --- a/docs/specifications/text/0001-script-based-tokenizer.html +++ b/docs/specifications/text/0001-script-based-tokenizer.html @@ -8,7 +8,7 @@ - + @@ -120,6 +120,6 @@ →

- + diff --git a/docs/specifications/text/0028-indexing-csv.html b/docs/specifications/text/0028-indexing-csv.html index 0ead5edc3..328209080 100644 --- a/docs/specifications/text/0028-indexing-csv.html +++ b/docs/specifications/text/0028-indexing-csv.html @@ -8,7 +8,7 @@ - + @@ -104,6 +104,6 @@ →

- + diff --git a/docs/specifications/text/0029-indexing-ndjson.html b/docs/specifications/text/0029-indexing-ndjson.html index 8f7cd87cb..65c1f3b6f 100644 --- a/docs/specifications/text/0029-indexing-ndjson.html +++ b/docs/specifications/text/0029-indexing-ndjson.html @@ -8,7 +8,7 @@ - + @@ -89,6 +89,6 @@ →

- + diff --git a/docs/specifications/text/0032-distinct-attribute.html b/docs/specifications/text/0032-distinct-attribute.html index e6fe4e321..bf300ee90 100644 --- a/docs/specifications/text/0032-distinct-attribute.html +++ b/docs/specifications/text/0032-distinct-attribute.html @@ -8,7 +8,7 @@ - + @@ -102,6 +102,6 @@ →

- + diff --git a/docs/specifications/text/0033-logging.html b/docs/specifications/text/0033-logging.html index 24a9cb42c..0c0de8604 100644 --- a/docs/specifications/text/0033-logging.html +++ b/docs/specifications/text/0033-logging.html @@ -8,7 +8,7 @@ - + @@ -38,6 +38,6 @@ →

- + diff --git a/docs/specifications/text/0034-telemetry-policies.html b/docs/specifications/text/0034-telemetry-policies.html index d91ff9ded..b5470f0d9 100644 --- a/docs/specifications/text/0034-telemetry-policies.html +++ b/docs/specifications/text/0034-telemetry-policies.html @@ -8,7 +8,7 @@ - + @@ -26,6 +26,6 @@ →

- + diff --git a/docs/specifications/text/0038-rename-attributes-for-faceting.html b/docs/specifications/text/0038-rename-attributes-for-faceting.html index dc586818d..ff5c5e46d 100644 --- a/docs/specifications/text/0038-rename-attributes-for-faceting.html +++ b/docs/specifications/text/0038-rename-attributes-for-faceting.html @@ -8,7 +8,7 @@ - + @@ -25,6 +25,6 @@ →

- + diff --git a/docs/specifications/text/0043-phrase-query.html b/docs/specifications/text/0043-phrase-query.html index ffbde61c1..35463aa23 100644 --- a/docs/specifications/text/0043-phrase-query.html +++ b/docs/specifications/text/0043-phrase-query.html @@ -8,7 +8,7 @@ - + @@ -108,6 +108,6 @@ →

- + diff --git a/docs/specifications/text/0047-reset-stop-words-synonyms-settings-with-null.html b/docs/specifications/text/0047-reset-stop-words-synonyms-settings-with-null.html index 58fcc824e..f66150f45 100644 --- a/docs/specifications/text/0047-reset-stop-words-synonyms-settings-with-null.html +++ b/docs/specifications/text/0047-reset-stop-words-synonyms-settings-with-null.html @@ -8,7 +8,7 @@ - + @@ -31,6 +31,6 @@ →

- + diff --git a/docs/specifications/text/0048-rename-max-mdb-size-var.html b/docs/specifications/text/0048-rename-max-mdb-size-var.html index 4258ff0c7..3129f1287 100644 --- a/docs/specifications/text/0048-rename-max-mdb-size-var.html +++ b/docs/specifications/text/0048-rename-max-mdb-size-var.html @@ -8,7 +8,7 @@ - + @@ -25,6 +25,6 @@ →

- + diff --git a/docs/specifications/text/0055-sort.html b/docs/specifications/text/0055-sort.html index 1d5d0688b..05ee0b018 100644 --- a/docs/specifications/text/0055-sort.html +++ b/docs/specifications/text/0055-sort.html @@ -8,7 +8,7 @@ - + @@ -223,6 +223,6 @@ →

- + diff --git a/docs/specifications/text/0059-geo-search.html b/docs/specifications/text/0059-geo-search.html index 3b3a4ae75..495f6cf44 100644 --- a/docs/specifications/text/0059-geo-search.html +++ b/docs/specifications/text/0059-geo-search.html @@ -8,7 +8,7 @@ - + @@ -65,6 +65,6 @@ →

- + diff --git a/docs/specifications/text/0060-tasks-api.html b/docs/specifications/text/0060-tasks-api.html index 7fb0b426e..865d485a5 100644 --- a/docs/specifications/text/0060-tasks-api.html +++ b/docs/specifications/text/0060-tasks-api.html @@ -8,7 +8,7 @@ - + @@ -395,6 +395,6 @@ →

- + diff --git a/docs/specifications/text/0061-error-format-and-definitions.html b/docs/specifications/text/0061-error-format-and-definitions.html index 96ebb6a52..e2ad378cf 100644 --- a/docs/specifications/text/0061-error-format-and-definitions.html +++ b/docs/specifications/text/0061-error-format-and-definitions.html @@ -8,7 +8,7 @@ - + @@ -846,6 +846,6 @@ →

- + diff --git a/docs/specifications/text/0077-words-position-limit.html b/docs/specifications/text/0077-words-position-limit.html index d978d687f..07217946d 100644 --- a/docs/specifications/text/0077-words-position-limit.html +++ b/docs/specifications/text/0077-words-position-limit.html @@ -8,7 +8,7 @@ - + @@ -25,6 +25,6 @@ →

- + diff --git a/docs/specifications/text/0085-api-keys.html b/docs/specifications/text/0085-api-keys.html index 83461229b..c2383cfed 100644 --- a/docs/specifications/text/0085-api-keys.html +++ b/docs/specifications/text/0085-api-keys.html @@ -8,7 +8,7 @@ - + @@ -109,6 +109,6 @@ →

- + diff --git a/docs/specifications/text/0089-tenant-tokens.html b/docs/specifications/text/0089-tenant-tokens.html index 095f505bc..1310a947c 100644 --- a/docs/specifications/text/0089-tenant-tokens.html +++ b/docs/specifications/text/0089-tenant-tokens.html @@ -8,7 +8,7 @@ - + @@ -98,6 +98,6 @@ →

- + diff --git a/docs/specifications/text/0096-auto-batching.html b/docs/specifications/text/0096-auto-batching.html index 1dff6e058..b65917e05 100644 --- a/docs/specifications/text/0096-auto-batching.html +++ b/docs/specifications/text/0096-auto-batching.html @@ -8,7 +8,7 @@ - + @@ -25,6 +25,6 @@ →

- + diff --git a/docs/specifications/text/0105-dumps-api.html b/docs/specifications/text/0105-dumps-api.html index af8b2d9a2..cf1eae679 100644 --- a/docs/specifications/text/0105-dumps-api.html +++ b/docs/specifications/text/0105-dumps-api.html @@ -8,7 +8,7 @@ - + @@ -28,6 +28,6 @@ →

- + diff --git a/docs/specifications/text/0117-typo-tolerance-setting-api.html b/docs/specifications/text/0117-typo-tolerance-setting-api.html index e71e1499c..34339c705 100644 --- a/docs/specifications/text/0117-typo-tolerance-setting-api.html +++ b/docs/specifications/text/0117-typo-tolerance-setting-api.html @@ -8,7 +8,7 @@ - + @@ -64,6 +64,6 @@ →

- + diff --git a/docs/specifications/text/0118-search-api.html b/docs/specifications/text/0118-search-api.html index 3add755ec..f06c5741d 100644 --- a/docs/specifications/text/0118-search-api.html +++ b/docs/specifications/text/0118-search-api.html @@ -8,7 +8,7 @@ - + @@ -332,6 +332,6 @@ →

- + diff --git a/docs/specifications/text/0119-instance-options.html b/docs/specifications/text/0119-instance-options.html index eb6e4e3dd..b683ee25d 100644 --- a/docs/specifications/text/0119-instance-options.html +++ b/docs/specifications/text/0119-instance-options.html @@ -8,7 +8,7 @@ - + @@ -75,6 +75,6 @@ →

- + diff --git a/docs/specifications/text/0121-data-types.html b/docs/specifications/text/0121-data-types.html index 93c91d2c4..e1d3808ba 100644 --- a/docs/specifications/text/0121-data-types.html +++ b/docs/specifications/text/0121-data-types.html @@ -8,7 +8,7 @@ - + @@ -174,6 +174,6 @@ →

- + diff --git a/docs/specifications/text/0123-displayed-attributes-setting-api.html b/docs/specifications/text/0123-displayed-attributes-setting-api.html index 870a84652..80055a5e7 100644 --- a/docs/specifications/text/0123-displayed-attributes-setting-api.html +++ b/docs/specifications/text/0123-displayed-attributes-setting-api.html @@ -8,7 +8,7 @@ - + @@ -26,6 +26,6 @@ →

- + diff --git a/docs/specifications/text/0123-distinct-attribute-setting-api.html b/docs/specifications/text/0123-distinct-attribute-setting-api.html index 6539fe5af..842f9b49c 100644 --- a/docs/specifications/text/0123-distinct-attribute-setting-api.html +++ b/docs/specifications/text/0123-distinct-attribute-setting-api.html @@ -8,7 +8,7 @@ - + @@ -59,6 +59,6 @@ →

- + diff --git a/docs/specifications/text/0123-filterable-attributes-setting-api.html b/docs/specifications/text/0123-filterable-attributes-setting-api.html index 9d9a99ac4..95e550152 100644 --- a/docs/specifications/text/0123-filterable-attributes-setting-api.html +++ b/docs/specifications/text/0123-filterable-attributes-setting-api.html @@ -8,7 +8,7 @@ - + @@ -25,6 +25,6 @@ →

- + diff --git a/docs/specifications/text/0123-proximity-precision.html b/docs/specifications/text/0123-proximity-precision.html index ed17b6b19..f20826d1c 100644 --- a/docs/specifications/text/0123-proximity-precision.html +++ b/docs/specifications/text/0123-proximity-precision.html @@ -8,7 +8,7 @@ - + @@ -29,6 +29,6 @@ →

- + diff --git a/docs/specifications/text/0123-ranking-rules-setting-api.html b/docs/specifications/text/0123-ranking-rules-setting-api.html index 558a1ef39..a7cc5dd13 100644 --- a/docs/specifications/text/0123-ranking-rules-setting-api.html +++ b/docs/specifications/text/0123-ranking-rules-setting-api.html @@ -8,7 +8,7 @@ - + @@ -33,6 +33,6 @@ →

- + diff --git a/docs/specifications/text/0123-searchable-attributes-setting-api.html b/docs/specifications/text/0123-searchable-attributes-setting-api.html index 49d89bddc..9db4cf131 100644 --- a/docs/specifications/text/0123-searchable-attributes-setting-api.html +++ b/docs/specifications/text/0123-searchable-attributes-setting-api.html @@ -8,7 +8,7 @@ - + @@ -27,6 +27,6 @@ →

- + diff --git a/docs/specifications/text/0123-separators-settings-api.html b/docs/specifications/text/0123-separators-settings-api.html index adfaa1de8..d1236c046 100644 --- a/docs/specifications/text/0123-separators-settings-api.html +++ b/docs/specifications/text/0123-separators-settings-api.html @@ -8,7 +8,7 @@ - + @@ -27,6 +27,6 @@ →

- + diff --git a/docs/specifications/text/0123-settings-api.html b/docs/specifications/text/0123-settings-api.html index 98ef0fb2f..219d0e2fe 100644 --- a/docs/specifications/text/0123-settings-api.html +++ b/docs/specifications/text/0123-settings-api.html @@ -8,7 +8,7 @@ - + @@ -25,6 +25,6 @@ →

- + diff --git a/docs/specifications/text/0123-sortable-attributes-setting-api.html b/docs/specifications/text/0123-sortable-attributes-setting-api.html index c8b47436f..564bf3ae6 100644 --- a/docs/specifications/text/0123-sortable-attributes-setting-api.html +++ b/docs/specifications/text/0123-sortable-attributes-setting-api.html @@ -8,7 +8,7 @@ - + @@ -25,6 +25,6 @@ →

- + diff --git a/docs/specifications/text/0123-stop-words-setting-api.html b/docs/specifications/text/0123-stop-words-setting-api.html index a626adec3..ab9935bdb 100644 --- a/docs/specifications/text/0123-stop-words-setting-api.html +++ b/docs/specifications/text/0123-stop-words-setting-api.html @@ -8,7 +8,7 @@ - + @@ -26,6 +26,6 @@ →

- + diff --git a/docs/specifications/text/0123-synonyms-setting-api.html b/docs/specifications/text/0123-synonyms-setting-api.html index c19bae3a8..3b86d5712 100644 --- a/docs/specifications/text/0123-synonyms-setting-api.html +++ b/docs/specifications/text/0123-synonyms-setting-api.html @@ -8,7 +8,7 @@ - + @@ -68,6 +68,6 @@ →

- + diff --git a/docs/specifications/text/0123-user-dictionary-settings-api.html b/docs/specifications/text/0123-user-dictionary-settings-api.html index 070877f4f..ee8e064ee 100644 --- a/docs/specifications/text/0123-user-dictionary-settings-api.html +++ b/docs/specifications/text/0123-user-dictionary-settings-api.html @@ -8,7 +8,7 @@ - + @@ -32,6 +32,6 @@ →

- + diff --git a/docs/specifications/text/0124-documents-api.html b/docs/specifications/text/0124-documents-api.html index 4064e157b..7f4c2dcfb 100644 --- a/docs/specifications/text/0124-documents-api.html +++ b/docs/specifications/text/0124-documents-api.html @@ -8,7 +8,7 @@ - + @@ -54,6 +54,6 @@ →

- + diff --git a/docs/specifications/text/0132-indexes-api.html b/docs/specifications/text/0132-indexes-api.html index b22ae0e6d..89ce48095 100644 --- a/docs/specifications/text/0132-indexes-api.html +++ b/docs/specifications/text/0132-indexes-api.html @@ -8,7 +8,7 @@ - + @@ -25,6 +25,6 @@ →

- + diff --git a/docs/specifications/text/0134-stats-api.html b/docs/specifications/text/0134-stats-api.html index 39543ba43..8aead4b26 100644 --- a/docs/specifications/text/0134-stats-api.html +++ b/docs/specifications/text/0134-stats-api.html @@ -8,7 +8,7 @@ - + @@ -42,6 +42,6 @@ →

- + diff --git a/docs/specifications/text/0135-indexing-json.html b/docs/specifications/text/0135-indexing-json.html index 5675a4d9e..c7a6bd79c 100644 --- a/docs/specifications/text/0135-indexing-json.html +++ b/docs/specifications/text/0135-indexing-json.html @@ -8,7 +8,7 @@ - + @@ -92,6 +92,6 @@ →

- + diff --git a/docs/specifications/text/0136-documents-soft-deletion.html b/docs/specifications/text/0136-documents-soft-deletion.html index c55631564..75817c2ce 100644 --- a/docs/specifications/text/0136-documents-soft-deletion.html +++ b/docs/specifications/text/0136-documents-soft-deletion.html @@ -8,7 +8,7 @@ - + @@ -29,6 +29,6 @@ →

- + diff --git a/docs/specifications/text/0171-version-api.html b/docs/specifications/text/0171-version-api.html index b53f3e5df..af0a70dee 100644 --- a/docs/specifications/text/0171-version-api.html +++ b/docs/specifications/text/0171-version-api.html @@ -8,7 +8,7 @@ - + @@ -30,6 +30,6 @@ →

- + diff --git a/docs/specifications/text/0172-health-api.html b/docs/specifications/text/0172-health-api.html index c01af65c6..21bd6b822 100644 --- a/docs/specifications/text/0172-health-api.html +++ b/docs/specifications/text/0172-health-api.html @@ -8,7 +8,7 @@ - + @@ -28,6 +28,6 @@ →

- + diff --git a/docs/specifications/text/0174-metrics-api.html b/docs/specifications/text/0174-metrics-api.html index 6c7f323df..74f4986e6 100644 --- a/docs/specifications/text/0174-metrics-api.html +++ b/docs/specifications/text/0174-metrics-api.html @@ -8,7 +8,7 @@ - + @@ -81,6 +81,6 @@ →

- + diff --git a/docs/specifications/text/0178-compression-headers.html b/docs/specifications/text/0178-compression-headers.html index 6e2046fba..e6e405607 100644 --- a/docs/specifications/text/0178-compression-headers.html +++ b/docs/specifications/text/0178-compression-headers.html @@ -8,7 +8,7 @@ - + @@ -25,6 +25,6 @@ →

- + diff --git a/docs/specifications/text/0185-configuration-file.html b/docs/specifications/text/0185-configuration-file.html index adf2adc16..8707c4022 100644 --- a/docs/specifications/text/0185-configuration-file.html +++ b/docs/specifications/text/0185-configuration-file.html @@ -8,7 +8,7 @@ - + @@ -38,6 +38,6 @@ →

- + diff --git a/docs/specifications/text/0191-swap-indexes-api.html b/docs/specifications/text/0191-swap-indexes-api.html index 3407128d1..a0b0240f7 100644 --- a/docs/specifications/text/0191-swap-indexes-api.html +++ b/docs/specifications/text/0191-swap-indexes-api.html @@ -8,7 +8,7 @@ - + @@ -41,6 +41,6 @@ →

- + diff --git a/docs/specifications/text/0192-multi-search-api.html b/docs/specifications/text/0192-multi-search-api.html index ccc2e8dce..13027c2e4 100644 --- a/docs/specifications/text/0192-multi-search-api.html +++ b/docs/specifications/text/0192-multi-search-api.html @@ -8,7 +8,7 @@ - + @@ -43,6 +43,6 @@ →

- + diff --git a/docs/specifications/text/0193-experimental-features.html b/docs/specifications/text/0193-experimental-features.html index d6e662996..3e78d37c2 100644 --- a/docs/specifications/text/0193-experimental-features.html +++ b/docs/specifications/text/0193-experimental-features.html @@ -8,7 +8,7 @@ - + @@ -31,6 +31,6 @@ →

- + diff --git a/docs/specifications/text/0194-experimental-feature-api.html b/docs/specifications/text/0194-experimental-feature-api.html index 742a69fce..7c0a2be41 100644 --- a/docs/specifications/text/0194-experimental-feature-api.html +++ b/docs/specifications/text/0194-experimental-feature-api.html @@ -8,7 +8,7 @@ - + @@ -25,6 +25,6 @@ →

- + diff --git a/docs/specifications/text/0195-ranking-score.html b/docs/specifications/text/0195-ranking-score.html index 8bdd57d80..bd565e880 100644 --- a/docs/specifications/text/0195-ranking-score.html +++ b/docs/specifications/text/0195-ranking-score.html @@ -8,7 +8,7 @@ - + @@ -60,6 +60,6 @@ →

- + diff --git a/docs/specifications/text/0246-facet-search-api.html b/docs/specifications/text/0246-facet-search-api.html index 8d0f4b1e6..6704d2044 100644 --- a/docs/specifications/text/0246-facet-search-api.html +++ b/docs/specifications/text/0246-facet-search-api.html @@ -8,7 +8,7 @@ - + @@ -27,6 +27,6 @@ →

- + diff --git a/docs/specifications/text/0258-snapshots-api.html b/docs/specifications/text/0258-snapshots-api.html index a9679bcfe..7175321a6 100644 --- a/docs/specifications/text/0258-snapshots-api.html +++ b/docs/specifications/text/0258-snapshots-api.html @@ -8,7 +8,7 @@ - + @@ -25,6 +25,6 @@ →

- + diff --git a/docs/specifications/text/0262-task-queue-webhook.html b/docs/specifications/text/0262-task-queue-webhook.html index 11a2b96dc..50fb90bad 100644 --- a/docs/specifications/text/0262-task-queue-webhook.html +++ b/docs/specifications/text/0262-task-queue-webhook.html @@ -8,7 +8,7 @@ - + @@ -38,6 +38,6 @@ →

- + diff --git a/docs/specifications/text/157-faceting-setting-api.html b/docs/specifications/text/157-faceting-setting-api.html index 3087d6d41..702d3d495 100644 --- a/docs/specifications/text/157-faceting-setting-api.html +++ b/docs/specifications/text/157-faceting-setting-api.html @@ -8,7 +8,7 @@ - + @@ -48,6 +48,6 @@ →

- + diff --git a/docs/specifications/text/157-pagination-setting-api.html b/docs/specifications/text/157-pagination-setting-api.html index 9fc45015b..b570262e4 100644 --- a/docs/specifications/text/157-pagination-setting-api.html +++ b/docs/specifications/text/157-pagination-setting-api.html @@ -8,7 +8,7 @@ - + @@ -35,6 +35,6 @@

- +