diff --git a/docs/404.html b/docs/404.html index 2ddbdd689..c85c4dda5 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.15aff203.js b/docs/assets/js/10.4bb9eeac.js similarity index 99% rename from docs/assets/js/10.15aff203.js rename to docs/assets/js/10.4bb9eeac.js index b5c7c3429..503b653b1 100644 --- a/docs/assets/js/10.15aff203.js +++ b/docs/assets/js/10.4bb9eeac.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{433: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],{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 diff --git a/docs/assets/js/11.b7de9b10.js b/docs/assets/js/11.72b45679.js similarity index 97% rename from docs/assets/js/11.b7de9b10.js rename to docs/assets/js/11.72b45679.js index 59482a936..5a45949ba 100644 --- a/docs/assets/js/11.b7de9b10.js +++ b/docs/assets/js/11.72b45679.js @@ -1 +1 @@ -(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 +(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{435: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/12.31781feb.js b/docs/assets/js/12.2af66f08.js similarity index 94% rename from docs/assets/js/12.31781feb.js rename to docs/assets/js/12.2af66f08.js index a70174535..85910b65b 100644 --- a/docs/assets/js/12.31781feb.js +++ b/docs/assets/js/12.2af66f08.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{435:function(t,a,i){"use strict";i.r(a);var s=i(62),e=Object(s.a)({},(function(){var t=this,a=t.$createElement,i=t._self._c||a;return i("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[i("h1",{attrs:{id:"title"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#title"}},[t._v("#")]),t._v(" Title")]),t._v(" "),i("h2",{attrs:{id:"_1-summary"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),i("h2",{attrs:{id:"_2-motivation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),i("h2",{attrs:{id:"_3-functional-specification"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),i("h2",{attrs:{id:"_4-technical-details"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[t._v("#")]),t._v(" 4. Technical Details")]),t._v(" "),i("h2",{attrs:{id:"_5-future-possibilities"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[t._v("#")]),t._v(" 5. Future Possibilities")])])}),[],!1,null,null,null);a.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{436:function(t,a,i){"use strict";i.r(a);var s=i(62),e=Object(s.a)({},(function(){var t=this,a=t.$createElement,i=t._self._c||a;return i("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[i("h1",{attrs:{id:"title"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#title"}},[t._v("#")]),t._v(" Title")]),t._v(" "),i("h2",{attrs:{id:"_1-summary"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),i("h2",{attrs:{id:"_2-motivation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),i("h2",{attrs:{id:"_3-functional-specification"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),i("h2",{attrs:{id:"_4-technical-details"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[t._v("#")]),t._v(" 4. Technical Details")]),t._v(" "),i("h2",{attrs:{id:"_5-future-possibilities"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[t._v("#")]),t._v(" 5. Future Possibilities")])])}),[],!1,null,null,null);a.default=e.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/14.9305fa09.js b/docs/assets/js/14.dda8b7ef.js similarity index 99% rename from docs/assets/js/14.9305fa09.js rename to docs/assets/js/14.dda8b7ef.js index 98e1ae9ca..2fc51c0db 100644 --- a/docs/assets/js/14.9305fa09.js +++ b/docs/assets/js/14.dda8b7ef.js @@ -1 +1 @@ -(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 +(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{440: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/15.095125b3.js b/docs/assets/js/15.3f1414b9.js similarity index 99% rename from docs/assets/js/15.095125b3.js rename to docs/assets/js/15.3f1414b9.js index 6deb3d61a..4716ba4e4 100644 --- a/docs/assets/js/15.095125b3.js +++ b/docs/assets/js/15.3f1414b9.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{439: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("ul",[a("li",[e._v("Title: Indexing CSV")]),e._v(" "),a("li",[e._v("Start Date: 2021-04-9")]),e._v(" "),a("li",[e._v("Specification PR: "),a("a",{attrs:{href:"https://github.com/Meilisearch/specifications/pull/28",target:"_blank",rel:"noopener noreferrer"}},[e._v("PR-#28"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Discovery Issue: n/a")])]),e._v(" "),a("h1",{attrs:{id:"indexing-csv"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#indexing-csv"}},[e._v("#")]),e._v(" Indexing CSV")]),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("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.")]),e._v(" "),a("p",[e._v("A "),a("a",{attrs:{href:"https://en.wikipedia.org/wiki/Comma-separated_values",target:"_blank",rel:"noopener noreferrer"}},[e._v("CSV"),a("OutboundLink")],1),e._v(" data format is broadly used to store and exchange data in a simple format.")]),e._v(" "),a("p",[e._v("Also, in order to boost write performance CSV data format is more suited than JSON for consequent datasets, as keys are not duplicated for every document.")]),e._v(" "),a("h4",{attrs:{id:"summary-key-points"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#summary-key-points"}},[e._v("#")]),e._v(" Summary Key Points")]),e._v(" "),a("ul",[a("li",[e._v("The header of the csv payload allows to name the attributes and type them.")]),e._v(" "),a("li",[a("code",[e._v("text/csv")]),e._v(" Content-Type header is now supported.")]),e._v(" "),a("li",[e._v("A new query parameter, "),a("code",[e._v("csvDelimiter")]),e._v(", has been introduced to customize the csv delimiter used in the document. It can change between two "),a("code",[e._v("documentAddition")]),e._v(".")]),e._v(" "),a("li",[e._v("The error cases have been strengthened and completed. See Errors part.")])]),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("We want to provide our users with an always improved usage experience. Currently, the engine only accepts JSON format as a data source. We want to give users the possibility of another simple data format, well known, to use. Thus, give them more versatility at the data source choices for the indexing (add and update) step.")]),e._v(" "),a("p",[e._v("Since most SQL engines or SQL clients can easily dump data as CSV, it will facilitate Meilisearch adoption by extending the indexing step on a wider range of customer cases than before.")]),e._v(" "),a("p",[e._v("Writing performance is also considered as a motivation since CSV parsing is less CPU and memory intensive than parsing Json due to the streamable capability of the CSV format.")]),e._v(" "),a("h3",{attrs:{id:"iii-explanation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#iii-explanation"}},[e._v("#")]),e._v(" III.Explanation")]),e._v(" "),a("h4",{attrs:{id:"csv-formatting-rules"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#csv-formatting-rules"}},[e._v("#")]),e._v(" CSV Formatting Rules")]),e._v(" "),a("p",[e._v("While there's "),a("a",{attrs:{href:"https://tools.ietf.org/html/rfc4180",target:"_blank",rel:"noopener noreferrer"}},[e._v("RFC 4180"),a("OutboundLink")],1),e._v(" as a try to add a specification for CSV format, we will find a lot of variations from that. Meilisearch features capabilities requires CSV data to be formatted the proper way to be parsable by the engine.")]),e._v(" "),a("ul",[a("li",[e._v("CSV data format needs to contain a first line representing the list of attributes with the optionally chosen type separated from the attribute name by "),a("code",[e._v(":")]),e._v(" character. The type is case insensitive.")])]),e._v(" "),a("blockquote",[a("p",[e._v("An attribute can be specificed with three types: "),a("code",[e._v("string")]),e._v(", "),a("code",[e._v("boolean")]),e._v(" or "),a("code",[e._v("number")]),e._v(". A missing type will be interpreted as a "),a("code",[e._v("string")]),e._v(" by default.")]),e._v(" "),a("p",[e._v('Valid headline example: "id:number","title:string","author","price:number","cute:boolean"')])]),e._v(" "),a("ul",[a("li",[e._v("The following CSV lines will represent a document for Meilisearch.")]),e._v(" "),a("li",[e._v("A "),a("code",[e._v(",")]),e._v(" character must separate each cell.")]),e._v(" "),a("li",[e._v("A CSV value should be enclosed in double-quotes when it contains the delimiter character or a newline to escape it.")]),e._v(" "),a("li",[e._v("Using double-quotes to enclose fields, then a double-quote appearing inside a field must be escaped by preceding it with another double quote as mentioned in "),a("a",{attrs:{href:"https://tools.ietf.org/html/rfc4180",target:"_blank",rel:"noopener noreferrer"}},[e._v("RFC 4180"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("li",[e._v("Float value should be written with a "),a("code",[e._v(".")]),e._v(" character, like "),a("code",[e._v("3.14")]),e._v(".")]),e._v(" "),a("li",[e._v("CSV text should be encoded in UTF8.")]),e._v(" "),a("li",[e._v("The format can't handle array cell values. We are providing "),a("code",[e._v("nd-json")]),e._v(" format to deal with theses types of attribute in a easier way.")]),e._v(" "),a("li",[e._v("A "),a("code",[e._v("csvDelimiter")]),e._v(" query parameter is available to customize the delimiter used in the documents.\n"),a("ul",[a("li",[e._v("This "),a("code",[e._v("csvDelimiter")]),e._v(" is optional. By default, the "),a("code",[e._v(",")]),e._v(" character is used.")]),e._v(" "),a("li",[e._v("The separator must be one "),a("a",{attrs:{href:"https://www.rfc-editor.org/rfc/rfc20",target:"_blank",rel:"noopener noreferrer"}},[e._v("ascii char"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("li",[e._v("The separator can't be used with another Content-Type, or else it'll throw an error.")])])])]),e._v(" "),a("h5",{attrs:{id:"null-value"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#null-value"}},[e._v("#")]),e._v(" "),a("code",[e._v("null")]),e._v(" value")]),e._v(" "),a("ul",[a("li",[e._v("If a field is of type "),a("code",[e._v("string")]),e._v(", then an empty cell is considered as a "),a("code",[e._v("null")]),e._v(" value (e.g. "),a("code",[e._v(",,")]),e._v("), anything else is turned into a string value (e.g. "),a("code",[e._v(", ,")]),e._v(" is a single whitespace string)")]),e._v(" "),a("li",[e._v("If a field is of type "),a("code",[e._v("number")]),e._v(", when the trimmed field is empty, it's considered as a "),a("code",[e._v("null")]),e._v(" value (e.g. "),a("code",[e._v(",,")]),e._v(" "),a("code",[e._v(", ,")]),e._v("); otherwise, Meilisearch tries to parse the number.")]),e._v(" "),a("li",[e._v("If a field is of type "),a("code",[e._v("boolean")]),e._v(", when the trimmed field is empty, it's considered as a "),a("code",[e._v("null")]),e._v(" value (e.g. "),a("code",[e._v(",,")]),e._v(" "),a("code",[e._v(", ,")]),e._v("); otherwise, Meilisearch tries to parse the boolean as either "),a("code",[e._v("true")]),e._v(" or "),a("code",[e._v("false")]),e._v(".")])]),e._v(" "),a("h5",{attrs:{id:"example-with-a-comma-inside-a-cell"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-with-a-comma-inside-a-cell"}},[e._v("#")]),e._v(" Example with a comma inside a cell")]),e._v(" "),a("p",[e._v("Given the CSV payload")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('"id:number","label","price:number","colors","description","contains_a_dog_picture:boolean"\n"1","t-shirt","4.99","red","Thus, you will rock at summer time.","false"\n')])])]),a("p",[e._v("the search result should be displayed as")]),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('"hits"')]),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('"id"')]),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('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"t-shirt"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"price"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("4.99")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"red"')]),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('"Thus, you will rock at summer time."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"contains_a_dog_picture"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[e._v("false")]),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 ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("h5",{attrs:{id:"example-with-a-double-quote-inside-a-cell"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-with-a-double-quote-inside-a-cell"}},[e._v("#")]),e._v(" Example with a double quote inside a cell")]),e._v(" "),a("p",[e._v("Given the CSV payload")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('"id:number","label","price","colors","description"\n"1","t-shirt","4.99","red","Hey, you will ""rock"" at summer time."\n')])])]),a("p",[e._v("the search result should be displayed as")]),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('"hits"')]),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('"id"')]),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('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"t-shirt"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"price"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"4.99"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"red"')]),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('"Hey, you will rock at summer time."')]),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("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("blockquote",[a("p",[e._v("Note that the price attribute was not typed as a number. By default, Meilisearch type it as a string.")])]),e._v(" "),a("h5",{attrs:{id:"example-with-an-empty-cell"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-with-an-empty-cell"}},[e._v("#")]),e._v(" Example with an empty cell")]),e._v(" "),a("p",[e._v("Given the CSV payload")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("id:number,label,price:number,colors\n1,t-shirt,,red\n")])])]),a("p",[e._v("the search result should be displayed as")]),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('"hits"')]),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('"id"')]),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('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"t-shirt"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"price"')]),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('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"red"')]),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 ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("h4",{attrs:{id:"api-endpoints"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#api-endpoints"}},[e._v("#")]),e._v(" API Endpoints")]),e._v(" "),a("blockquote",[a("p",[e._v("Each API endpoints mentioned above will now require a "),a("code",[e._v("text/csv")]),e._v(" as "),a("code",[e._v("Content-Type")]),e._v(" header to be processed as CSV data.")])]),e._v(" "),a("p",[a("strong",[e._v("As a developer, I want to upload a CSV payload of documents so that end-user can search them")])]),e._v(" "),a("p",[a("strong",[e._v("POST documents")]),e._v(" "),a("code",[e._v("/indexes/:indexUid/documents")])]),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 function"}},[e._v("curl")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n -X POST "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v("'http://localhost:7700/indexes/movies/documents'")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n -H "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v("'Content-Type: text/csv'")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n --data--binary "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('\'\n "id","label","price:number","colors","description"\\n\n "1","hoodie","19.99","purple","Hey, you will rock at summer time."\n \'')]),e._v("\n")])])]),a("blockquote",[a("p",[e._v("202 Accepted - Response")])]),e._v(" "),a("p",[a("strong",[e._v("PUT documents")]),e._v(" "),a("code",[e._v("/indexes/:indexUid/documents")])]),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 function"}},[e._v("curl")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n -X PUT "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v("'http://localhost:7700/indexes/movies/documents'")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n -H "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v("'Content-Type: text/csv'")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n --data-binary "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('\'\n "id","label","price:number","colors","description"\\n\n "1","hoodie","19.99","purple","Hey, you will rock at summer time."\n \'')]),e._v("\n")])])]),a("blockquote",[a("p",[e._v("202 Accepted - Response")])]),e._v(" "),a("h5",{attrs:{id:"errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#errors"}},[e._v("#")]),e._v(" Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Omitted "),a("code",[e._v("Content-Type")]),e._v(" header will lead to a 415 Unsupported Media Type - "),a("strong",[e._v("missing_content_type")]),e._v(" error code.")]),e._v(" "),a("li",[e._v("🔴 Sending an empty "),a("code",[e._v("Content-Type")]),e._v(" will lead to a 415 Unsupported Media Type - "),a("strong",[e._v("invalid_content_type")]),e._v(" error code.")]),e._v(" "),a("li",[e._v("🔴 Sending a different "),a("code",[e._v("Content-Type")]),e._v(" than "),a("code",[e._v("application/json")]),e._v(", "),a("code",[e._v("application/x-ndjson")]),e._v(" or "),a("code",[e._v("text/csv")]),e._v(" will lead to 415 Unsupported Media Type "),a("strong",[e._v("invalid_content_type")]),e._v(" error code.")]),e._v(" "),a("li",[e._v("🔴 Sending an empty payload will lead to a 400 Bad Request - "),a("strong",[e._v("missing_payload")]),e._v(" error code.")]),e._v(" "),a("li",[e._v("🔴 Sending a different payload type than the "),a("code",[e._v("Content-Type")]),e._v(" header should return a 400 Bad Request - "),a("strong",[e._v("malformed_payload")]),e._v(" error code.")]),e._v(" "),a("li",[e._v("🔴 Sending a payload excessing the limit will lead to a 413 Payload Too Large - "),a("strong",[e._v("payload_too_large")]),e._v(" error code.")]),e._v(" "),a("li",[e._v("🔴 Sending an invalid CSV format will lead to a 400 bad_request - "),a("strong",[e._v("malformed_payload")]),e._v(" error code.")]),e._v(" "),a("li",[e._v("🔴 Sending a CSV header that does not conform to the specification will lead to a 400 bad_request - "),a("strong",[e._v("malformed_payload")]),e._v(" error code.")]),e._v(" "),a("li",[e._v("🔴 Sending an invalid csv delimiter: not exactly one ASCII char. This will lead to a 400 bad_request - "),a("strong",[e._v("invalid_document_csv_delimiter")]),e._v(" error code.")]),e._v(" "),a("li",[e._v("🔴 Sending a CSV cell with the type "),a("code",[e._v("number")]),e._v(" or "),a("code",[e._v("boolean")]),e._v(" that can't be parsed will lead to a 400 bad_request - "),a("strong",[e._v("malformed_payload")]),e._v(" error code.")])]),e._v(" "),a("h5",{attrs:{id:"errors-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#errors-definition"}},[e._v("#")]),e._v(" Errors Definition")]),e._v(" "),a("h2",{attrs:{id:"missing-content-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-content-type"}},[e._v("#")]),e._v(" missing_content_type")]),e._v(" "),a("h3",{attrs:{id:"context"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context"}},[e._v("#")]),e._v(" Context")]),e._v(" "),a("p",[e._v("This error occurs when the Content-Type header is missing.")]),e._v(" "),a("h3",{attrs:{id:"error-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition"}},[e._v("#")]),e._v(" Error Definition")]),e._v(" "),a("p",[e._v("HTTP Code: "),a("code",[e._v("415 Unsupported Media Type")])]),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('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"A Content-Type header is missing. Accepted values for Content-Type are: :contentTypeList"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"missing_content_type"')]),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('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"https://docs.meilisearch.com/errors#missing_content_type"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("ul",[a("li",[e._v("The "),a("code",[e._v(":contentTypeList")]),e._v(" is inferred when the message is generated. The values are separated by a "),a("code",[e._v(",")]),e._v(" char. e.g. "),a("code",[e._v("application/json")]),e._v(", "),a("code",[e._v("text/csv")]),e._v(".")])]),e._v(" "),a("hr"),e._v(" "),a("h2",{attrs:{id:"invalid-content-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-content-type"}},[e._v("#")]),e._v(" invalid_content_type")]),e._v(" "),a("h3",{attrs:{id:"context-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-2"}},[e._v("#")]),e._v(" Context")]),e._v(" "),a("p",[e._v("This error occurs when the provided content-type is not handled by the API method.")]),e._v(" "),a("h3",{attrs:{id:"error-definition-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-2"}},[e._v("#")]),e._v(" Error Definition")]),e._v(" "),a("p",[e._v("HTTP Code: "),a("code",[e._v("415 Unsupported Media Type")])]),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('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"The Content-Type :contentType is invalid. Accepted values for Content-Type are: :contentTypeList"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"invalid_content_type"')]),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('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"https://docs.meilisearch.com/errors#invalid_content_type"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("ul",[a("li",[e._v("The "),a("code",[e._v(":contentTypeList")]),e._v(" is inferred when the message is generated. The values are separated by a "),a("code",[e._v(",")]),e._v(" char. e.g. "),a("code",[e._v("application/json")]),e._v(", "),a("code",[e._v("text/csv")]),e._v(".")])]),e._v(" "),a("hr"),e._v(" "),a("h2",{attrs:{id:"missing-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-payload"}},[e._v("#")]),e._v(" missing_payload")]),e._v(" "),a("h3",{attrs:{id:"context-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-3"}},[e._v("#")]),e._v(" Context")]),e._v(" "),a("p",[e._v("This error occurs when the client does not provide a mandatory payload to the request.")]),e._v(" "),a("h3",{attrs:{id:"error-definition-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-3"}},[e._v("#")]),e._v(" Error Definition")]),e._v(" "),a("p",[e._v("HTTP Code: "),a("code",[e._v("400 Bad Request")])]),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('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"A :payloadType payload is missing."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"missing_payload"')]),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('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"https://docs.meilisearch.com/errors#missing_payload"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("ul",[a("li",[e._v("The "),a("code",[e._v(":payloadType")]),e._v(" is inferred when the message is generated. e.g. "),a("code",[e._v("json")]),e._v(", "),a("code",[e._v("ndjson")]),e._v(", "),a("code",[e._v("csv")])])]),e._v(" "),a("hr"),e._v(" "),a("h2",{attrs:{id:"malformed-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#malformed-payload"}},[e._v("#")]),e._v(" malformed_payload")]),e._v(" "),a("h3",{attrs:{id:"context-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-4"}},[e._v("#")]),e._v(" Context")]),e._v(" "),a("p",[e._v("This error occurs when the format sent in the payload is malformed. The payload contains a syntax error.")]),e._v(" "),a("h3",{attrs:{id:"error-definition-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-4"}},[e._v("#")]),e._v(" Error Definition")]),e._v(" "),a("p",[e._v("HTTP Code: "),a("code",[e._v("400 Bad Request")])]),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 property"}},[e._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"The :payloadType payload provided is malformed. :syntaxErrorHelper."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"malformed_payload"')]),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('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"https://docs.meilisearch.com/errors#malformed_payload"')]),e._v("\n")])])]),a("ul",[a("li",[e._v("The "),a("code",[e._v(":payloadType")]),e._v(" is inferred when the message is generated. e.g. "),a("code",[e._v("json")]),e._v(", "),a("code",[e._v("ndjson")]),e._v(", "),a("code",[e._v("csv")])]),e._v(" "),a("li",[e._v("The "),a("code",[e._v(":syntaxErrorHelper")]),e._v(" is inferred when the message is generated.")])]),e._v(" "),a("hr"),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("ul",[a("li",[e._v("Provide an interface in the future dashboard to upload CSV data into an index and optionally provide the headers types.")]),e._v(" "),a("li",[e._v("Set a payload limit directly related to the type of data format. Currently, the payload size is equivalent to "),a("a",{attrs:{href:"https://docs.meilisearch.com/reference/features/configuration.html#payload-limit-size",target:"_blank",rel:"noopener noreferrer"}},[e._v("JSON payload size"),a("OutboundLink")],1),e._v(". Metrics on feature usage and configuration update should help to choose a better suited value for this type of data format.")])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{438: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("ul",[a("li",[e._v("Title: Indexing CSV")]),e._v(" "),a("li",[e._v("Start Date: 2021-04-9")]),e._v(" "),a("li",[e._v("Specification PR: "),a("a",{attrs:{href:"https://github.com/Meilisearch/specifications/pull/28",target:"_blank",rel:"noopener noreferrer"}},[e._v("PR-#28"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Discovery Issue: n/a")])]),e._v(" "),a("h1",{attrs:{id:"indexing-csv"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#indexing-csv"}},[e._v("#")]),e._v(" Indexing CSV")]),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("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.")]),e._v(" "),a("p",[e._v("A "),a("a",{attrs:{href:"https://en.wikipedia.org/wiki/Comma-separated_values",target:"_blank",rel:"noopener noreferrer"}},[e._v("CSV"),a("OutboundLink")],1),e._v(" data format is broadly used to store and exchange data in a simple format.")]),e._v(" "),a("p",[e._v("Also, in order to boost write performance CSV data format is more suited than JSON for consequent datasets, as keys are not duplicated for every document.")]),e._v(" "),a("h4",{attrs:{id:"summary-key-points"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#summary-key-points"}},[e._v("#")]),e._v(" Summary Key Points")]),e._v(" "),a("ul",[a("li",[e._v("The header of the csv payload allows to name the attributes and type them.")]),e._v(" "),a("li",[a("code",[e._v("text/csv")]),e._v(" Content-Type header is now supported.")]),e._v(" "),a("li",[e._v("A new query parameter, "),a("code",[e._v("csvDelimiter")]),e._v(", has been introduced to customize the csv delimiter used in the document. It can change between two "),a("code",[e._v("documentAddition")]),e._v(".")]),e._v(" "),a("li",[e._v("The error cases have been strengthened and completed. See Errors part.")])]),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("We want to provide our users with an always improved usage experience. Currently, the engine only accepts JSON format as a data source. We want to give users the possibility of another simple data format, well known, to use. Thus, give them more versatility at the data source choices for the indexing (add and update) step.")]),e._v(" "),a("p",[e._v("Since most SQL engines or SQL clients can easily dump data as CSV, it will facilitate Meilisearch adoption by extending the indexing step on a wider range of customer cases than before.")]),e._v(" "),a("p",[e._v("Writing performance is also considered as a motivation since CSV parsing is less CPU and memory intensive than parsing Json due to the streamable capability of the CSV format.")]),e._v(" "),a("h3",{attrs:{id:"iii-explanation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#iii-explanation"}},[e._v("#")]),e._v(" III.Explanation")]),e._v(" "),a("h4",{attrs:{id:"csv-formatting-rules"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#csv-formatting-rules"}},[e._v("#")]),e._v(" CSV Formatting Rules")]),e._v(" "),a("p",[e._v("While there's "),a("a",{attrs:{href:"https://tools.ietf.org/html/rfc4180",target:"_blank",rel:"noopener noreferrer"}},[e._v("RFC 4180"),a("OutboundLink")],1),e._v(" as a try to add a specification for CSV format, we will find a lot of variations from that. Meilisearch features capabilities requires CSV data to be formatted the proper way to be parsable by the engine.")]),e._v(" "),a("ul",[a("li",[e._v("CSV data format needs to contain a first line representing the list of attributes with the optionally chosen type separated from the attribute name by "),a("code",[e._v(":")]),e._v(" character. The type is case insensitive.")])]),e._v(" "),a("blockquote",[a("p",[e._v("An attribute can be specificed with three types: "),a("code",[e._v("string")]),e._v(", "),a("code",[e._v("boolean")]),e._v(" or "),a("code",[e._v("number")]),e._v(". A missing type will be interpreted as a "),a("code",[e._v("string")]),e._v(" by default.")]),e._v(" "),a("p",[e._v('Valid headline example: "id:number","title:string","author","price:number","cute:boolean"')])]),e._v(" "),a("ul",[a("li",[e._v("The following CSV lines will represent a document for Meilisearch.")]),e._v(" "),a("li",[e._v("A "),a("code",[e._v(",")]),e._v(" character must separate each cell.")]),e._v(" "),a("li",[e._v("A CSV value should be enclosed in double-quotes when it contains the delimiter character or a newline to escape it.")]),e._v(" "),a("li",[e._v("Using double-quotes to enclose fields, then a double-quote appearing inside a field must be escaped by preceding it with another double quote as mentioned in "),a("a",{attrs:{href:"https://tools.ietf.org/html/rfc4180",target:"_blank",rel:"noopener noreferrer"}},[e._v("RFC 4180"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("li",[e._v("Float value should be written with a "),a("code",[e._v(".")]),e._v(" character, like "),a("code",[e._v("3.14")]),e._v(".")]),e._v(" "),a("li",[e._v("CSV text should be encoded in UTF8.")]),e._v(" "),a("li",[e._v("The format can't handle array cell values. We are providing "),a("code",[e._v("nd-json")]),e._v(" format to deal with theses types of attribute in a easier way.")]),e._v(" "),a("li",[e._v("A "),a("code",[e._v("csvDelimiter")]),e._v(" query parameter is available to customize the delimiter used in the documents.\n"),a("ul",[a("li",[e._v("This "),a("code",[e._v("csvDelimiter")]),e._v(" is optional. By default, the "),a("code",[e._v(",")]),e._v(" character is used.")]),e._v(" "),a("li",[e._v("The separator must be one "),a("a",{attrs:{href:"https://www.rfc-editor.org/rfc/rfc20",target:"_blank",rel:"noopener noreferrer"}},[e._v("ascii char"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("li",[e._v("The separator can't be used with another Content-Type, or else it'll throw an error.")])])])]),e._v(" "),a("h5",{attrs:{id:"null-value"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#null-value"}},[e._v("#")]),e._v(" "),a("code",[e._v("null")]),e._v(" value")]),e._v(" "),a("ul",[a("li",[e._v("If a field is of type "),a("code",[e._v("string")]),e._v(", then an empty cell is considered as a "),a("code",[e._v("null")]),e._v(" value (e.g. "),a("code",[e._v(",,")]),e._v("), anything else is turned into a string value (e.g. "),a("code",[e._v(", ,")]),e._v(" is a single whitespace string)")]),e._v(" "),a("li",[e._v("If a field is of type "),a("code",[e._v("number")]),e._v(", when the trimmed field is empty, it's considered as a "),a("code",[e._v("null")]),e._v(" value (e.g. "),a("code",[e._v(",,")]),e._v(" "),a("code",[e._v(", ,")]),e._v("); otherwise, Meilisearch tries to parse the number.")]),e._v(" "),a("li",[e._v("If a field is of type "),a("code",[e._v("boolean")]),e._v(", when the trimmed field is empty, it's considered as a "),a("code",[e._v("null")]),e._v(" value (e.g. "),a("code",[e._v(",,")]),e._v(" "),a("code",[e._v(", ,")]),e._v("); otherwise, Meilisearch tries to parse the boolean as either "),a("code",[e._v("true")]),e._v(" or "),a("code",[e._v("false")]),e._v(".")])]),e._v(" "),a("h5",{attrs:{id:"example-with-a-comma-inside-a-cell"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-with-a-comma-inside-a-cell"}},[e._v("#")]),e._v(" Example with a comma inside a cell")]),e._v(" "),a("p",[e._v("Given the CSV payload")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('"id:number","label","price:number","colors","description","contains_a_dog_picture:boolean"\n"1","t-shirt","4.99","red","Thus, you will rock at summer time.","false"\n')])])]),a("p",[e._v("the search result should be displayed as")]),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('"hits"')]),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('"id"')]),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('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"t-shirt"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"price"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("4.99")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"red"')]),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('"Thus, you will rock at summer time."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"contains_a_dog_picture"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[e._v("false")]),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 ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("h5",{attrs:{id:"example-with-a-double-quote-inside-a-cell"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-with-a-double-quote-inside-a-cell"}},[e._v("#")]),e._v(" Example with a double quote inside a cell")]),e._v(" "),a("p",[e._v("Given the CSV payload")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('"id:number","label","price","colors","description"\n"1","t-shirt","4.99","red","Hey, you will ""rock"" at summer time."\n')])])]),a("p",[e._v("the search result should be displayed as")]),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('"hits"')]),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('"id"')]),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('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"t-shirt"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"price"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"4.99"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"red"')]),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('"Hey, you will rock at summer time."')]),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("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("blockquote",[a("p",[e._v("Note that the price attribute was not typed as a number. By default, Meilisearch type it as a string.")])]),e._v(" "),a("h5",{attrs:{id:"example-with-an-empty-cell"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-with-an-empty-cell"}},[e._v("#")]),e._v(" Example with an empty cell")]),e._v(" "),a("p",[e._v("Given the CSV payload")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("id:number,label,price:number,colors\n1,t-shirt,,red\n")])])]),a("p",[e._v("the search result should be displayed as")]),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('"hits"')]),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('"id"')]),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('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"t-shirt"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"price"')]),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('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"red"')]),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 ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("h4",{attrs:{id:"api-endpoints"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#api-endpoints"}},[e._v("#")]),e._v(" API Endpoints")]),e._v(" "),a("blockquote",[a("p",[e._v("Each API endpoints mentioned above will now require a "),a("code",[e._v("text/csv")]),e._v(" as "),a("code",[e._v("Content-Type")]),e._v(" header to be processed as CSV data.")])]),e._v(" "),a("p",[a("strong",[e._v("As a developer, I want to upload a CSV payload of documents so that end-user can search them")])]),e._v(" "),a("p",[a("strong",[e._v("POST documents")]),e._v(" "),a("code",[e._v("/indexes/:indexUid/documents")])]),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 function"}},[e._v("curl")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n -X POST "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v("'http://localhost:7700/indexes/movies/documents'")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n -H "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v("'Content-Type: text/csv'")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n --data--binary "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('\'\n "id","label","price:number","colors","description"\\n\n "1","hoodie","19.99","purple","Hey, you will rock at summer time."\n \'')]),e._v("\n")])])]),a("blockquote",[a("p",[e._v("202 Accepted - Response")])]),e._v(" "),a("p",[a("strong",[e._v("PUT documents")]),e._v(" "),a("code",[e._v("/indexes/:indexUid/documents")])]),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 function"}},[e._v("curl")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n -X PUT "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v("'http://localhost:7700/indexes/movies/documents'")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n -H "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v("'Content-Type: text/csv'")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n --data-binary "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('\'\n "id","label","price:number","colors","description"\\n\n "1","hoodie","19.99","purple","Hey, you will rock at summer time."\n \'')]),e._v("\n")])])]),a("blockquote",[a("p",[e._v("202 Accepted - Response")])]),e._v(" "),a("h5",{attrs:{id:"errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#errors"}},[e._v("#")]),e._v(" Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Omitted "),a("code",[e._v("Content-Type")]),e._v(" header will lead to a 415 Unsupported Media Type - "),a("strong",[e._v("missing_content_type")]),e._v(" error code.")]),e._v(" "),a("li",[e._v("🔴 Sending an empty "),a("code",[e._v("Content-Type")]),e._v(" will lead to a 415 Unsupported Media Type - "),a("strong",[e._v("invalid_content_type")]),e._v(" error code.")]),e._v(" "),a("li",[e._v("🔴 Sending a different "),a("code",[e._v("Content-Type")]),e._v(" than "),a("code",[e._v("application/json")]),e._v(", "),a("code",[e._v("application/x-ndjson")]),e._v(" or "),a("code",[e._v("text/csv")]),e._v(" will lead to 415 Unsupported Media Type "),a("strong",[e._v("invalid_content_type")]),e._v(" error code.")]),e._v(" "),a("li",[e._v("🔴 Sending an empty payload will lead to a 400 Bad Request - "),a("strong",[e._v("missing_payload")]),e._v(" error code.")]),e._v(" "),a("li",[e._v("🔴 Sending a different payload type than the "),a("code",[e._v("Content-Type")]),e._v(" header should return a 400 Bad Request - "),a("strong",[e._v("malformed_payload")]),e._v(" error code.")]),e._v(" "),a("li",[e._v("🔴 Sending a payload excessing the limit will lead to a 413 Payload Too Large - "),a("strong",[e._v("payload_too_large")]),e._v(" error code.")]),e._v(" "),a("li",[e._v("🔴 Sending an invalid CSV format will lead to a 400 bad_request - "),a("strong",[e._v("malformed_payload")]),e._v(" error code.")]),e._v(" "),a("li",[e._v("🔴 Sending a CSV header that does not conform to the specification will lead to a 400 bad_request - "),a("strong",[e._v("malformed_payload")]),e._v(" error code.")]),e._v(" "),a("li",[e._v("🔴 Sending an invalid csv delimiter: not exactly one ASCII char. This will lead to a 400 bad_request - "),a("strong",[e._v("invalid_document_csv_delimiter")]),e._v(" error code.")]),e._v(" "),a("li",[e._v("🔴 Sending a CSV cell with the type "),a("code",[e._v("number")]),e._v(" or "),a("code",[e._v("boolean")]),e._v(" that can't be parsed will lead to a 400 bad_request - "),a("strong",[e._v("malformed_payload")]),e._v(" error code.")])]),e._v(" "),a("h5",{attrs:{id:"errors-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#errors-definition"}},[e._v("#")]),e._v(" Errors Definition")]),e._v(" "),a("h2",{attrs:{id:"missing-content-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-content-type"}},[e._v("#")]),e._v(" missing_content_type")]),e._v(" "),a("h3",{attrs:{id:"context"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context"}},[e._v("#")]),e._v(" Context")]),e._v(" "),a("p",[e._v("This error occurs when the Content-Type header is missing.")]),e._v(" "),a("h3",{attrs:{id:"error-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition"}},[e._v("#")]),e._v(" Error Definition")]),e._v(" "),a("p",[e._v("HTTP Code: "),a("code",[e._v("415 Unsupported Media Type")])]),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('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"A Content-Type header is missing. Accepted values for Content-Type are: :contentTypeList"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"missing_content_type"')]),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('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"https://docs.meilisearch.com/errors#missing_content_type"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("ul",[a("li",[e._v("The "),a("code",[e._v(":contentTypeList")]),e._v(" is inferred when the message is generated. The values are separated by a "),a("code",[e._v(",")]),e._v(" char. e.g. "),a("code",[e._v("application/json")]),e._v(", "),a("code",[e._v("text/csv")]),e._v(".")])]),e._v(" "),a("hr"),e._v(" "),a("h2",{attrs:{id:"invalid-content-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-content-type"}},[e._v("#")]),e._v(" invalid_content_type")]),e._v(" "),a("h3",{attrs:{id:"context-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-2"}},[e._v("#")]),e._v(" Context")]),e._v(" "),a("p",[e._v("This error occurs when the provided content-type is not handled by the API method.")]),e._v(" "),a("h3",{attrs:{id:"error-definition-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-2"}},[e._v("#")]),e._v(" Error Definition")]),e._v(" "),a("p",[e._v("HTTP Code: "),a("code",[e._v("415 Unsupported Media Type")])]),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('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"The Content-Type :contentType is invalid. Accepted values for Content-Type are: :contentTypeList"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"invalid_content_type"')]),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('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"https://docs.meilisearch.com/errors#invalid_content_type"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("ul",[a("li",[e._v("The "),a("code",[e._v(":contentTypeList")]),e._v(" is inferred when the message is generated. The values are separated by a "),a("code",[e._v(",")]),e._v(" char. e.g. "),a("code",[e._v("application/json")]),e._v(", "),a("code",[e._v("text/csv")]),e._v(".")])]),e._v(" "),a("hr"),e._v(" "),a("h2",{attrs:{id:"missing-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-payload"}},[e._v("#")]),e._v(" missing_payload")]),e._v(" "),a("h3",{attrs:{id:"context-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-3"}},[e._v("#")]),e._v(" Context")]),e._v(" "),a("p",[e._v("This error occurs when the client does not provide a mandatory payload to the request.")]),e._v(" "),a("h3",{attrs:{id:"error-definition-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-3"}},[e._v("#")]),e._v(" Error Definition")]),e._v(" "),a("p",[e._v("HTTP Code: "),a("code",[e._v("400 Bad Request")])]),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('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"A :payloadType payload is missing."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"missing_payload"')]),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('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"https://docs.meilisearch.com/errors#missing_payload"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("ul",[a("li",[e._v("The "),a("code",[e._v(":payloadType")]),e._v(" is inferred when the message is generated. e.g. "),a("code",[e._v("json")]),e._v(", "),a("code",[e._v("ndjson")]),e._v(", "),a("code",[e._v("csv")])])]),e._v(" "),a("hr"),e._v(" "),a("h2",{attrs:{id:"malformed-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#malformed-payload"}},[e._v("#")]),e._v(" malformed_payload")]),e._v(" "),a("h3",{attrs:{id:"context-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-4"}},[e._v("#")]),e._v(" Context")]),e._v(" "),a("p",[e._v("This error occurs when the format sent in the payload is malformed. The payload contains a syntax error.")]),e._v(" "),a("h3",{attrs:{id:"error-definition-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-4"}},[e._v("#")]),e._v(" Error Definition")]),e._v(" "),a("p",[e._v("HTTP Code: "),a("code",[e._v("400 Bad Request")])]),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 property"}},[e._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"The :payloadType payload provided is malformed. :syntaxErrorHelper."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"malformed_payload"')]),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('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"https://docs.meilisearch.com/errors#malformed_payload"')]),e._v("\n")])])]),a("ul",[a("li",[e._v("The "),a("code",[e._v(":payloadType")]),e._v(" is inferred when the message is generated. e.g. "),a("code",[e._v("json")]),e._v(", "),a("code",[e._v("ndjson")]),e._v(", "),a("code",[e._v("csv")])]),e._v(" "),a("li",[e._v("The "),a("code",[e._v(":syntaxErrorHelper")]),e._v(" is inferred when the message is generated.")])]),e._v(" "),a("hr"),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("ul",[a("li",[e._v("Provide an interface in the future dashboard to upload CSV data into an index and optionally provide the headers types.")]),e._v(" "),a("li",[e._v("Set a payload limit directly related to the type of data format. Currently, the payload size is equivalent to "),a("a",{attrs:{href:"https://docs.meilisearch.com/reference/features/configuration.html#payload-limit-size",target:"_blank",rel:"noopener noreferrer"}},[e._v("JSON payload size"),a("OutboundLink")],1),e._v(". Metrics on feature usage and configuration update should help to choose a better suited value for this type of data format.")])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/16.166f3cec.js b/docs/assets/js/16.a7c6842a.js similarity index 99% rename from docs/assets/js/16.166f3cec.js rename to docs/assets/js/16.a7c6842a.js index b89f939a9..bcf8e466e 100644 --- a/docs/assets/js/16.166f3cec.js +++ b/docs/assets/js/16.a7c6842a.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{440:function(t,e,a){"use strict";a.r(e);var s=a(62),n=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("ul",[a("li",[t._v("Title: Indexing NDJSON")]),t._v(" "),a("li",[t._v("Start Date: 2021-04-12")]),t._v(" "),a("li",[t._v("Specification PR: "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/29",target:"_blank",rel:"noopener noreferrer"}},[t._v("PR-#29"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("Discovery Issue: n/a")])]),t._v(" "),a("h1",{attrs:{id:"indexing-ndjson"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#indexing-ndjson"}},[t._v("#")]),t._v(" Indexing NDJSON")]),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("An "),a("a",{attrs:{href:"http://ndjson.org/",target:"_blank",rel:"noopener noreferrer"}},[t._v("NDJSON"),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.")]),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/x-ndjson")]),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-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ii-motivation"}},[t._v("#")]),t._v(" II. Motivation")]),t._v(" "),a("p",[t._v("Currently, the engine only accepts JSON format as a data source. We want to give users the possibility of another simple data format to use. Thus, give them more versatility at the data source choices for the indexing step.")]),t._v(" "),a("p",[t._v("Writing performance is also a motivation since JSON Lines data parsing is less CPU and memory-intensive than parsing standard JSON. When new lines represent separate entries it makes the NDJSON data streamable, thus, more suited for indexing a consequent data set.")]),t._v(" "),a("p",[t._v("While we give the ability to Meilisearch to ingest CSV data for indexing in this "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/28",target:"_blank",rel:"noopener noreferrer"}},[t._v("specification"),a("OutboundLink")],1),t._v(", we are aware of the limitations of CSV so we also want to provide a format that is easy to validate. Handling the validity of a CSV can be frustrating and difficult. Only strings can be managed within a CSV. In addition, there is no official specification except "),a("a",{attrs:{href:"https://tools.ietf.org/html/rfc4180",target:"_blank",rel:"noopener noreferrer"}},[t._v("RFC 4180"),a("OutboundLink")],1),t._v(" which is not sufficient for all data scheme.")]),t._v(" "),a("p",[t._v("Representing nested structures in a JSON object is easy and convenient.")]),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("p",[t._v("Newline-delimited JSON ("),a("code",[t._v("ndjson")]),t._v("), line-delimited JSON ("),a("code",[t._v("ldjson")]),t._v("), JSON lines ("),a("code",[t._v("jsonl")]),t._v(") are three terms expressing the same formats primarily intended for JSON streaming.")]),t._v(" "),a("p",[t._v("As of now, we will use "),a("code",[t._v("ndjson")]),t._v(" in the next parts to refer to a data format that represents JSON entries separated by a new line character.")]),t._v(" "),a("ul",[a("li",[t._v("Each entries will represent a document for MeiliSearch.")]),t._v(" "),a("li",[t._v("Each entries should be a valid JSON object.")]),t._v(" "),a("li",[t._v("The data should be encoded in UTF-8.")])]),t._v(" "),a("h4",{attrs:{id:"example-of-a-valid-njson"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-of-a-valid-njson"}},[t._v("#")]),t._v(" Example of a valid NJSON")]),t._v(" "),a("p",[t._v('Given the NDJSON payload\n\'\'\'\n{"id":1, "label": "t-shirt", "price": 4.99, "colors": ["red", "green", "blue"]}\n{"id":499, "label": "hoodie", "price": 19.99, "colors": ["purple"]}\n\'\'\'\nthe search result should be displayed as')]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("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('"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('"price"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("4.99")]),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("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),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("}")]),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("499")]),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('"hoodie"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"price"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("19.99")]),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("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"purple"')]),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 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("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/x-ndjson")]),t._v(" as "),a("code",[t._v("Content-Type")]),t._v(" header to be processed as NDJSON data.")])]),t._v(" "),a("p",[a("strong",[t._v("As a developer, I want to upload a NDJSON 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/x-ndjson'")]),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"]}\\n\n {"id":499, "label": "hoodie", "price": 19.99, "colors": ["purple"]}\n \'')]),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/x-ndjson'")]),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"]}\\n\n {"id":499, "label": "hoodie", "price": 19.99, "colors": ["purple"]}\n \'')]),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 ndjson 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."')]),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("Provide an interface in the future dashboard to upload NDJSON data into an index.")]),t._v(" "),a("li",[t._v("Set a payload limit directly related to the type of data format. Currently, the payload size is equivalent to "),a("a",{attrs:{href:"https://docs.meilisearch.com/reference/features/configuration.html#payload-limit-size",target:"_blank",rel:"noopener noreferrer"}},[t._v("JSON payload size"),a("OutboundLink")],1),t._v(". Metrics on feature usage and configuration update should help to choose a better suited value for this type of data.")])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{439:function(t,e,a){"use strict";a.r(e);var s=a(62),n=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("ul",[a("li",[t._v("Title: Indexing NDJSON")]),t._v(" "),a("li",[t._v("Start Date: 2021-04-12")]),t._v(" "),a("li",[t._v("Specification PR: "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/29",target:"_blank",rel:"noopener noreferrer"}},[t._v("PR-#29"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("Discovery Issue: n/a")])]),t._v(" "),a("h1",{attrs:{id:"indexing-ndjson"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#indexing-ndjson"}},[t._v("#")]),t._v(" Indexing NDJSON")]),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("An "),a("a",{attrs:{href:"http://ndjson.org/",target:"_blank",rel:"noopener noreferrer"}},[t._v("NDJSON"),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.")]),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/x-ndjson")]),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-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ii-motivation"}},[t._v("#")]),t._v(" II. Motivation")]),t._v(" "),a("p",[t._v("Currently, the engine only accepts JSON format as a data source. We want to give users the possibility of another simple data format to use. Thus, give them more versatility at the data source choices for the indexing step.")]),t._v(" "),a("p",[t._v("Writing performance is also a motivation since JSON Lines data parsing is less CPU and memory-intensive than parsing standard JSON. When new lines represent separate entries it makes the NDJSON data streamable, thus, more suited for indexing a consequent data set.")]),t._v(" "),a("p",[t._v("While we give the ability to Meilisearch to ingest CSV data for indexing in this "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/28",target:"_blank",rel:"noopener noreferrer"}},[t._v("specification"),a("OutboundLink")],1),t._v(", we are aware of the limitations of CSV so we also want to provide a format that is easy to validate. Handling the validity of a CSV can be frustrating and difficult. Only strings can be managed within a CSV. In addition, there is no official specification except "),a("a",{attrs:{href:"https://tools.ietf.org/html/rfc4180",target:"_blank",rel:"noopener noreferrer"}},[t._v("RFC 4180"),a("OutboundLink")],1),t._v(" which is not sufficient for all data scheme.")]),t._v(" "),a("p",[t._v("Representing nested structures in a JSON object is easy and convenient.")]),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("p",[t._v("Newline-delimited JSON ("),a("code",[t._v("ndjson")]),t._v("), line-delimited JSON ("),a("code",[t._v("ldjson")]),t._v("), JSON lines ("),a("code",[t._v("jsonl")]),t._v(") are three terms expressing the same formats primarily intended for JSON streaming.")]),t._v(" "),a("p",[t._v("As of now, we will use "),a("code",[t._v("ndjson")]),t._v(" in the next parts to refer to a data format that represents JSON entries separated by a new line character.")]),t._v(" "),a("ul",[a("li",[t._v("Each entries will represent a document for MeiliSearch.")]),t._v(" "),a("li",[t._v("Each entries should be a valid JSON object.")]),t._v(" "),a("li",[t._v("The data should be encoded in UTF-8.")])]),t._v(" "),a("h4",{attrs:{id:"example-of-a-valid-njson"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-of-a-valid-njson"}},[t._v("#")]),t._v(" Example of a valid NJSON")]),t._v(" "),a("p",[t._v('Given the NDJSON payload\n\'\'\'\n{"id":1, "label": "t-shirt", "price": 4.99, "colors": ["red", "green", "blue"]}\n{"id":499, "label": "hoodie", "price": 19.99, "colors": ["purple"]}\n\'\'\'\nthe search result should be displayed as')]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("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('"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('"price"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("4.99")]),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("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),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("}")]),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("499")]),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('"hoodie"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"price"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("19.99")]),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("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"purple"')]),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 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("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/x-ndjson")]),t._v(" as "),a("code",[t._v("Content-Type")]),t._v(" header to be processed as NDJSON data.")])]),t._v(" "),a("p",[a("strong",[t._v("As a developer, I want to upload a NDJSON 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/x-ndjson'")]),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"]}\\n\n {"id":499, "label": "hoodie", "price": 19.99, "colors": ["purple"]}\n \'')]),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/x-ndjson'")]),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"]}\\n\n {"id":499, "label": "hoodie", "price": 19.99, "colors": ["purple"]}\n \'')]),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 ndjson 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."')]),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("Provide an interface in the future dashboard to upload NDJSON data into an index.")]),t._v(" "),a("li",[t._v("Set a payload limit directly related to the type of data format. Currently, the payload size is equivalent to "),a("a",{attrs:{href:"https://docs.meilisearch.com/reference/features/configuration.html#payload-limit-size",target:"_blank",rel:"noopener noreferrer"}},[t._v("JSON payload size"),a("OutboundLink")],1),t._v(". Metrics on feature usage and configuration update should help to choose a better suited value for this type of data.")])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/17.052e3dd6.js b/docs/assets/js/17.e4dc4ad5.js similarity index 99% rename from docs/assets/js/17.052e3dd6.js rename to docs/assets/js/17.e4dc4ad5.js index 36eff06c2..33c1d834d 100644 --- a/docs/assets/js/17.052e3dd6.js +++ b/docs/assets/js/17.e4dc4ad5.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{441: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("ul",[a("li",[t._v("Title: Distinct Attribute")]),t._v(" "),a("li",[t._v("Start Date: 2021-04-16")]),t._v(" "),a("li",[t._v("Specification PR: "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/32",target:"_blank",rel:"noopener noreferrer"}},[t._v("#32"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("MeiliSearch Tracking-Issues: "),a("a",{attrs:{href:"https://github.com/meilisearch/milli/issues/168",target:"_blank",rel:"noopener noreferrer"}},[t._v("milli#168"),a("OutboundLink")],1)])]),t._v(" "),a("h1",{attrs:{id:"distinct-attribute"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#distinct-attribute"}},[t._v("#")]),t._v(" Distinct Attribute")]),t._v(" "),a("h2",{attrs:{id:"_1-feature-description-and-interaction"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-feature-description-and-interaction"}},[t._v("#")]),t._v(" 1. Feature Description and Interaction")]),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("The distinct attribute is usefull to discard other occurences of document having the same value as the field setted as a distinct attribute.")]),t._v(" "),a("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(" "),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 new search engine called Milli no longer processes the distinct attribute as the current MeilliSearch. The specification aims to make Milli as backward compatible as possible with the current release (v.0.20.0). Including both the API usage and the expected search results.")]),t._v(" "),a("h3",{attrs:{id:"iii-additional-materials"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#iii-additional-materials"}},[t._v("#")]),t._v(" III. Additional Materials")]),t._v(" "),a("h4",{attrs:{id:"algolia"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#algolia"}},[t._v("#")]),t._v(" Algolia")]),t._v(" "),a("p",[t._v("Algolia distinct feature is based on one attribute, as defined in "),a("code",[t._v("attributeForDistinct")]),t._v(".\nAdding an attribute to this setting will make that all search results have a different value in the given attributes field. This is done at indexing time.")]),t._v(" "),a("p",[t._v("Algolia distinct functionality enables deduplication and aggregation by allowing a numeric value for the defined distinct attribute.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Behavior")]),t._v(" "),a("th",[t._v("Distinct value")]),t._v(" "),a("th",[t._v("Description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("de-duplication")]),t._v(" "),a("td",[t._v("N = 1")]),t._v(" "),a("td",[t._v("Used to remove similar records from the search result. Only the most relevant record is returned.")])]),t._v(" "),a("tr",[a("td",[t._v("grouping")]),t._v(" "),a("td",[t._v("N > 1")]),t._v(" "),a("td",[t._v("N records containing the same value for the distinct attribute will be returned.")])])])]),t._v(" "),a("blockquote",[a("p",[a("code",[t._v("distinct")]),t._v(" is silently ignored at query time if "),a("code",[t._v("attibuteForDistinct")]),t._v(" is not defined. It is not mandatory but possible to set "),a("code",[t._v("distinct")]),t._v(" at indexing time via the index settings endpoint.")]),t._v(" "),a("p",[t._v("It is possible to disable distinct feature at query time, by giving a falsy value ("),a("code",[t._v("false")]),t._v(" or "),a("code",[t._v("O")]),t._v(") for the distinct parameter. Giving "),a("code",[t._v("true")]),t._v(" is equivalent to "),a("code",[t._v("1")]),t._v(".")])]),t._v(" "),a("h4",{attrs:{id:"typesense"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#typesense"}},[t._v("#")]),t._v(" TypeSense")]),t._v(" "),a("p",[t._v("TypeSense distinct feature uses "),a("code",[t._v("group_by")]),t._v(" and "),a("code",[t._v("group_limit")]),t._v(" to achieve de-duplication and grouping at query time.")]),t._v(" "),a("blockquote",[a("p",[t._v("A field that is setted as a parameter of group_by must be previously faceted.")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Parameter")]),t._v(" "),a("th",[t._v("Description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("group_by")]),t._v(" "),a("td",[t._v("It is possible to aggregate records into groups by setting multiple fields separated by a comma. E.g. group_by=country,company_name")])]),t._v(" "),a("tr",[a("td",[t._v("group_limit")]),t._v(" "),a("td",[t._v("Control the maximum number of top records returned for groups. By default, TypeSense "),a("code",[t._v("group_limit")]),t._v(" parameter is set to 3.")])])])]),t._v(" "),a("p",[t._v("Using group_by add a nested structure in the search result. Buckets are returned in "),a("code",[t._v("grouped_hits")]),t._v(" field.")]),t._v(" "),a("h4",{attrs:{id:"elasticsearch"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#elasticsearch"}},[t._v("#")]),t._v(" ElasticSearch")]),t._v(" "),a("p",[t._v("Elasticsearch does not provide this functionality directly. Nor a keyword or an operator exists to get de-duplicated or grouped results.")]),t._v(" "),a("p",[t._v("It is difficult to find the information in the official documentation. A lot of people are asking about the distinct feature on StackOverflow or ElasticSearch forums.")]),t._v(" "),a("p",[t._v("By specifying the search with terms or composite aggregations it is possible to have buckets fed by documents that have the same values on a specified field.")]),t._v(" "),a("p",[t._v("E.g Terms aggregation")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"aggs"')]),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('"distinct_colors"')]),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('"terms"')]),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('"field"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"color"')]),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("1000")]),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("The size parameter can be set to define how many term buckets should be returned out of the overall terms list. Term aggregations by default return 10 buckets only.")]),t._v(" "),a("p",[t._v("Composite aggregation allows to paginate over buckets containing a lot of values.")]),t._v(" "),a("blockquote",[a("p",[t._v("Cardinality aggregation can calculates the count of distinct values for a field.")])]),t._v(" "),a("p",[t._v("It is also possible to use the keyword "),a("code",[t._v("DISTINCT")]),t._v(" from the SQL access feature from X-Pack. However the functionality only allows to return tabular data.")]),t._v(" "),a("h3",{attrs:{id:"iv-explanation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#iv-explanation"}},[t._v("#")]),t._v(" IV.Explanation")]),t._v(" "),a("p",[t._v("Let's say that we have 2 documents with the same "),a("code",[t._v("product_id")]),t._v(". Each document exists to materialize the color variation.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("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('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),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("\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('"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('"product_id"')]),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('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"black"')]),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('"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('"product_id"')]),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("}")]),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 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('"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('"nbHits"')]),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('"exhaustiveNbHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"processingTimeMs"')]),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('"query"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t-shirt"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Without setting "),a("code",[t._v("product_id")]),t._v(" as a distinct attribute, a search with "),a("code",[t._v("t-shirt")]),t._v(" as a query will return the two documents.")]),t._v(" "),a("p",[t._v("It can be useful to display one product per color variation as a search result for example. But as your number of products variations grows over time, you might want to display only one result as a top search result, mostly for UI concerns.")]),t._v(" "),a("p",[t._v("It's in this case that the distinct attribute finds all its interest.")]),t._v(" "),a("p",[t._v("Setting "),a("code",[t._v("product_id")]),t._v(" as a distinct attribute will discard all others documents having the same value for "),a("code",[t._v("product_id")]),t._v(" from the search result.")]),t._v(" "),a("h4",{attrs:{id:"distinct-attribute-in-v0-20"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#distinct-attribute-in-v0-20"}},[t._v("#")]),t._v(" Distinct Attribute in v0.20")]),t._v(" "),a("blockquote",[a("p",[t._v("MeiliSearch accepts only one value which is the document attribute that needs to be de-duplicated from the other document sharing the same attribute value.")])]),t._v(" "),a("p",[t._v("It is possible to configure the distinct attribute using two endpoints. "),a("a",{attrs:{href:"https://docs.meilisearch.com/reference/api/settings.html#update-settings",target:"_blank",rel:"noopener noreferrer"}},[t._v("Update All Settings"),a("OutboundLink")],1),t._v(" and the "),a("a",{attrs:{href:"https://docs.meilisearch.com/reference/api/distinct_attribute.html#update-distinct-attribute",target:"_blank",rel:"noopener noreferrer"}},[t._v("distinct attribute"),a("OutboundLink")],1),t._v(" endpoint.")]),t._v(" "),a("p",[t._v("Given this setting :")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"distinctAttribute"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"product_id"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("MeiliSearch will return de-duplicated hits by "),a("code",[t._v("product_id")]),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('"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('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),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("\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('"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('"product_id"')]),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("}")]),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 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('"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('"nbHits"')]),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('"exhaustiveNbHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"processingTimeMs"')]),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('"query"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"\\"t-shirt\\""')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("It returns the top most relevant document by discarding all the others.")]),t._v(" "),a("p",[t._v("For a search with "),a("code",[t._v('"q": "black"')]),t._v(" as parameter, MeiliSearch returns:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("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('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"black"')]),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('"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('"product_id"')]),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("}")]),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 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('"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('"nbHits"')]),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('"exhaustiveNbHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"processingTimeMs"')]),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('"query"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"\\"black\\""')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"distinct-attribute-in-0-21-milli"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#distinct-attribute-in-0-21-milli"}},[t._v("#")]),t._v(" Distinct Attribute in 0.21 (Milli)")]),t._v(" "),a("p",[t._v("Milli shoud be identical as v.0.20 concerning API endpoints and returned results.")]),t._v(" "),a("h3",{attrs:{id:"v-impact-on-documentation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#v-impact-on-documentation"}},[t._v("#")]),t._v(" V. Impact on documentation")]),t._v(" "),a("p",[t._v("N/A")]),t._v(" "),a("h3",{attrs:{id:"vi-impact-on-sdks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#vi-impact-on-sdks"}},[t._v("#")]),t._v(" VI. Impact on SDKs")]),t._v(" "),a("p",[t._v("N/A")]),t._v(" "),a("h2",{attrs:{id:"_2-technical-aspects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-aspects"}},[t._v("#")]),t._v(" 2. Technical Aspects")]),t._v(" "),a("h3",{attrs:{id:"abstract"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#abstract"}},[t._v("#")]),t._v(" Abstract")]),t._v(" "),a("p",[t._v("To apply the distinct behavior, the search engine needs to create a database. This database is the same as we create to apply facets and filters on an attribute. However, the users will not pass the attribute into "),a("code",[t._v("attributesForFaceting")]),t._v(" when setting a distinct attribute. It means the search engine must create this database for the related attribute.")]),t._v(" "),a("p",[t._v("Following this example, it also means the search engine would be technically able to apply filters and facet distribution on the distinct attribute, however, we should prevent this. To avoid confusion, the search engine should prevent the users to execute a filter or get facet distribution on the distinct attribute. Only the distinct capability should be available for this field.")]),t._v(" "),a("p",[t._v("If the user wants to filter on that attribute, he will have to add it in "),a("code",[t._v("attributesForFaceting")]),t._v(" as well.")]),t._v(" "),a("p",[t._v("Using this new data structure allows interesting future possibilities.")]),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("blockquote",[a("p",[t._v("These ideas will be materialized as feature-proposals in the product team backlog. Keep in mind that this specification is related to v0.21.")])]),t._v(" "),a("h3",{attrs:{id:"grouping"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#grouping"}},[t._v("#")]),t._v(" Grouping")]),t._v(" "),a("h4",{attrs:{id:"distinct-count-to-enable-grouping-feature"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#distinct-count-to-enable-grouping-feature"}},[t._v("#")]),t._v(" Distinct count to enable grouping feature")]),t._v(" "),a("p",[t._v("Since MeiliSearch can only de-duplicate documents matching the distinct attribute, it would be interesting to be able to set the number of topmost relevant documents before discarding the others.")]),t._v(" "),a("p",[a("code",[t._v("groupLimit")]),t._v(" could be applied at search time to fit users needs.")]),t._v(" "),a("h4",{attrs:{id:"distinct-on-multiple-fields"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#distinct-on-multiple-fields"}},[t._v("#")]),t._v(" Distinct on multiple fields")]),t._v(" "),a("blockquote",[a("p",[t._v("It probably require to add a nested structure to return hits for each groups with clarity.")])]),t._v(" "),a("h5",{attrs:{id:"indexing-time"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#indexing-time"}},[t._v("#")]),t._v(" Indexing time")]),t._v(" "),a("p",[t._v("Given this distinct setting:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"distinctAttributes"')]),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('"colors"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"size"')]),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("h5",{attrs:{id:"search-time"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#search-time"}},[t._v("#")]),t._v(" Search time")]),t._v(" "),a("p",[t._v("We could add a "),a("code",[t._v("groupBy")]),t._v(" like parameter to let the user choose a specific grouping behavior:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"groupBy"')]),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('"colors"')]),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")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"groupBy"')]),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('"size"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"colors"')]),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("blockquote",[a("p",[t._v("It can be used in combination with groupLimit to define the topmost relevant documents before discarding the others for each group.")])])])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{442: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("ul",[a("li",[t._v("Title: Distinct Attribute")]),t._v(" "),a("li",[t._v("Start Date: 2021-04-16")]),t._v(" "),a("li",[t._v("Specification PR: "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/32",target:"_blank",rel:"noopener noreferrer"}},[t._v("#32"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("MeiliSearch Tracking-Issues: "),a("a",{attrs:{href:"https://github.com/meilisearch/milli/issues/168",target:"_blank",rel:"noopener noreferrer"}},[t._v("milli#168"),a("OutboundLink")],1)])]),t._v(" "),a("h1",{attrs:{id:"distinct-attribute"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#distinct-attribute"}},[t._v("#")]),t._v(" Distinct Attribute")]),t._v(" "),a("h2",{attrs:{id:"_1-feature-description-and-interaction"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-feature-description-and-interaction"}},[t._v("#")]),t._v(" 1. Feature Description and Interaction")]),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("The distinct attribute is usefull to discard other occurences of document having the same value as the field setted as a distinct attribute.")]),t._v(" "),a("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(" "),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 new search engine called Milli no longer processes the distinct attribute as the current MeilliSearch. The specification aims to make Milli as backward compatible as possible with the current release (v.0.20.0). Including both the API usage and the expected search results.")]),t._v(" "),a("h3",{attrs:{id:"iii-additional-materials"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#iii-additional-materials"}},[t._v("#")]),t._v(" III. Additional Materials")]),t._v(" "),a("h4",{attrs:{id:"algolia"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#algolia"}},[t._v("#")]),t._v(" Algolia")]),t._v(" "),a("p",[t._v("Algolia distinct feature is based on one attribute, as defined in "),a("code",[t._v("attributeForDistinct")]),t._v(".\nAdding an attribute to this setting will make that all search results have a different value in the given attributes field. This is done at indexing time.")]),t._v(" "),a("p",[t._v("Algolia distinct functionality enables deduplication and aggregation by allowing a numeric value for the defined distinct attribute.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Behavior")]),t._v(" "),a("th",[t._v("Distinct value")]),t._v(" "),a("th",[t._v("Description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("de-duplication")]),t._v(" "),a("td",[t._v("N = 1")]),t._v(" "),a("td",[t._v("Used to remove similar records from the search result. Only the most relevant record is returned.")])]),t._v(" "),a("tr",[a("td",[t._v("grouping")]),t._v(" "),a("td",[t._v("N > 1")]),t._v(" "),a("td",[t._v("N records containing the same value for the distinct attribute will be returned.")])])])]),t._v(" "),a("blockquote",[a("p",[a("code",[t._v("distinct")]),t._v(" is silently ignored at query time if "),a("code",[t._v("attibuteForDistinct")]),t._v(" is not defined. It is not mandatory but possible to set "),a("code",[t._v("distinct")]),t._v(" at indexing time via the index settings endpoint.")]),t._v(" "),a("p",[t._v("It is possible to disable distinct feature at query time, by giving a falsy value ("),a("code",[t._v("false")]),t._v(" or "),a("code",[t._v("O")]),t._v(") for the distinct parameter. Giving "),a("code",[t._v("true")]),t._v(" is equivalent to "),a("code",[t._v("1")]),t._v(".")])]),t._v(" "),a("h4",{attrs:{id:"typesense"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#typesense"}},[t._v("#")]),t._v(" TypeSense")]),t._v(" "),a("p",[t._v("TypeSense distinct feature uses "),a("code",[t._v("group_by")]),t._v(" and "),a("code",[t._v("group_limit")]),t._v(" to achieve de-duplication and grouping at query time.")]),t._v(" "),a("blockquote",[a("p",[t._v("A field that is setted as a parameter of group_by must be previously faceted.")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Parameter")]),t._v(" "),a("th",[t._v("Description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("group_by")]),t._v(" "),a("td",[t._v("It is possible to aggregate records into groups by setting multiple fields separated by a comma. E.g. group_by=country,company_name")])]),t._v(" "),a("tr",[a("td",[t._v("group_limit")]),t._v(" "),a("td",[t._v("Control the maximum number of top records returned for groups. By default, TypeSense "),a("code",[t._v("group_limit")]),t._v(" parameter is set to 3.")])])])]),t._v(" "),a("p",[t._v("Using group_by add a nested structure in the search result. Buckets are returned in "),a("code",[t._v("grouped_hits")]),t._v(" field.")]),t._v(" "),a("h4",{attrs:{id:"elasticsearch"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#elasticsearch"}},[t._v("#")]),t._v(" ElasticSearch")]),t._v(" "),a("p",[t._v("Elasticsearch does not provide this functionality directly. Nor a keyword or an operator exists to get de-duplicated or grouped results.")]),t._v(" "),a("p",[t._v("It is difficult to find the information in the official documentation. A lot of people are asking about the distinct feature on StackOverflow or ElasticSearch forums.")]),t._v(" "),a("p",[t._v("By specifying the search with terms or composite aggregations it is possible to have buckets fed by documents that have the same values on a specified field.")]),t._v(" "),a("p",[t._v("E.g Terms aggregation")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"aggs"')]),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('"distinct_colors"')]),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('"terms"')]),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('"field"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"color"')]),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("1000")]),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("The size parameter can be set to define how many term buckets should be returned out of the overall terms list. Term aggregations by default return 10 buckets only.")]),t._v(" "),a("p",[t._v("Composite aggregation allows to paginate over buckets containing a lot of values.")]),t._v(" "),a("blockquote",[a("p",[t._v("Cardinality aggregation can calculates the count of distinct values for a field.")])]),t._v(" "),a("p",[t._v("It is also possible to use the keyword "),a("code",[t._v("DISTINCT")]),t._v(" from the SQL access feature from X-Pack. However the functionality only allows to return tabular data.")]),t._v(" "),a("h3",{attrs:{id:"iv-explanation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#iv-explanation"}},[t._v("#")]),t._v(" IV.Explanation")]),t._v(" "),a("p",[t._v("Let's say that we have 2 documents with the same "),a("code",[t._v("product_id")]),t._v(". Each document exists to materialize the color variation.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("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('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),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("\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('"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('"product_id"')]),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('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"black"')]),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('"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('"product_id"')]),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("}")]),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 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('"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('"nbHits"')]),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('"exhaustiveNbHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"processingTimeMs"')]),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('"query"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t-shirt"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Without setting "),a("code",[t._v("product_id")]),t._v(" as a distinct attribute, a search with "),a("code",[t._v("t-shirt")]),t._v(" as a query will return the two documents.")]),t._v(" "),a("p",[t._v("It can be useful to display one product per color variation as a search result for example. But as your number of products variations grows over time, you might want to display only one result as a top search result, mostly for UI concerns.")]),t._v(" "),a("p",[t._v("It's in this case that the distinct attribute finds all its interest.")]),t._v(" "),a("p",[t._v("Setting "),a("code",[t._v("product_id")]),t._v(" as a distinct attribute will discard all others documents having the same value for "),a("code",[t._v("product_id")]),t._v(" from the search result.")]),t._v(" "),a("h4",{attrs:{id:"distinct-attribute-in-v0-20"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#distinct-attribute-in-v0-20"}},[t._v("#")]),t._v(" Distinct Attribute in v0.20")]),t._v(" "),a("blockquote",[a("p",[t._v("MeiliSearch accepts only one value which is the document attribute that needs to be de-duplicated from the other document sharing the same attribute value.")])]),t._v(" "),a("p",[t._v("It is possible to configure the distinct attribute using two endpoints. "),a("a",{attrs:{href:"https://docs.meilisearch.com/reference/api/settings.html#update-settings",target:"_blank",rel:"noopener noreferrer"}},[t._v("Update All Settings"),a("OutboundLink")],1),t._v(" and the "),a("a",{attrs:{href:"https://docs.meilisearch.com/reference/api/distinct_attribute.html#update-distinct-attribute",target:"_blank",rel:"noopener noreferrer"}},[t._v("distinct attribute"),a("OutboundLink")],1),t._v(" endpoint.")]),t._v(" "),a("p",[t._v("Given this setting :")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"distinctAttribute"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"product_id"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("MeiliSearch will return de-duplicated hits by "),a("code",[t._v("product_id")]),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('"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('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),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("\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('"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('"product_id"')]),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("}")]),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 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('"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('"nbHits"')]),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('"exhaustiveNbHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"processingTimeMs"')]),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('"query"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"\\"t-shirt\\""')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("It returns the top most relevant document by discarding all the others.")]),t._v(" "),a("p",[t._v("For a search with "),a("code",[t._v('"q": "black"')]),t._v(" as parameter, MeiliSearch returns:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("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('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"black"')]),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('"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('"product_id"')]),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("}")]),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 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('"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('"nbHits"')]),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('"exhaustiveNbHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"processingTimeMs"')]),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('"query"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"\\"black\\""')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"distinct-attribute-in-0-21-milli"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#distinct-attribute-in-0-21-milli"}},[t._v("#")]),t._v(" Distinct Attribute in 0.21 (Milli)")]),t._v(" "),a("p",[t._v("Milli shoud be identical as v.0.20 concerning API endpoints and returned results.")]),t._v(" "),a("h3",{attrs:{id:"v-impact-on-documentation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#v-impact-on-documentation"}},[t._v("#")]),t._v(" V. Impact on documentation")]),t._v(" "),a("p",[t._v("N/A")]),t._v(" "),a("h3",{attrs:{id:"vi-impact-on-sdks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#vi-impact-on-sdks"}},[t._v("#")]),t._v(" VI. Impact on SDKs")]),t._v(" "),a("p",[t._v("N/A")]),t._v(" "),a("h2",{attrs:{id:"_2-technical-aspects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-aspects"}},[t._v("#")]),t._v(" 2. Technical Aspects")]),t._v(" "),a("h3",{attrs:{id:"abstract"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#abstract"}},[t._v("#")]),t._v(" Abstract")]),t._v(" "),a("p",[t._v("To apply the distinct behavior, the search engine needs to create a database. This database is the same as we create to apply facets and filters on an attribute. However, the users will not pass the attribute into "),a("code",[t._v("attributesForFaceting")]),t._v(" when setting a distinct attribute. It means the search engine must create this database for the related attribute.")]),t._v(" "),a("p",[t._v("Following this example, it also means the search engine would be technically able to apply filters and facet distribution on the distinct attribute, however, we should prevent this. To avoid confusion, the search engine should prevent the users to execute a filter or get facet distribution on the distinct attribute. Only the distinct capability should be available for this field.")]),t._v(" "),a("p",[t._v("If the user wants to filter on that attribute, he will have to add it in "),a("code",[t._v("attributesForFaceting")]),t._v(" as well.")]),t._v(" "),a("p",[t._v("Using this new data structure allows interesting future possibilities.")]),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("blockquote",[a("p",[t._v("These ideas will be materialized as feature-proposals in the product team backlog. Keep in mind that this specification is related to v0.21.")])]),t._v(" "),a("h3",{attrs:{id:"grouping"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#grouping"}},[t._v("#")]),t._v(" Grouping")]),t._v(" "),a("h4",{attrs:{id:"distinct-count-to-enable-grouping-feature"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#distinct-count-to-enable-grouping-feature"}},[t._v("#")]),t._v(" Distinct count to enable grouping feature")]),t._v(" "),a("p",[t._v("Since MeiliSearch can only de-duplicate documents matching the distinct attribute, it would be interesting to be able to set the number of topmost relevant documents before discarding the others.")]),t._v(" "),a("p",[a("code",[t._v("groupLimit")]),t._v(" could be applied at search time to fit users needs.")]),t._v(" "),a("h4",{attrs:{id:"distinct-on-multiple-fields"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#distinct-on-multiple-fields"}},[t._v("#")]),t._v(" Distinct on multiple fields")]),t._v(" "),a("blockquote",[a("p",[t._v("It probably require to add a nested structure to return hits for each groups with clarity.")])]),t._v(" "),a("h5",{attrs:{id:"indexing-time"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#indexing-time"}},[t._v("#")]),t._v(" Indexing time")]),t._v(" "),a("p",[t._v("Given this distinct setting:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"distinctAttributes"')]),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('"colors"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"size"')]),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("h5",{attrs:{id:"search-time"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#search-time"}},[t._v("#")]),t._v(" Search time")]),t._v(" "),a("p",[t._v("We could add a "),a("code",[t._v("groupBy")]),t._v(" like parameter to let the user choose a specific grouping behavior:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"groupBy"')]),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('"colors"')]),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")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"groupBy"')]),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('"size"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"colors"')]),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("blockquote",[a("p",[t._v("It can be used in combination with groupLimit to define the topmost relevant documents before discarding the others for each group.")])])])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/18.145cf324.js b/docs/assets/js/18.bee2a3a1.js similarity index 99% rename from docs/assets/js/18.145cf324.js rename to docs/assets/js/18.bee2a3a1.js index fbb4ddd5a..ce6ba40da 100644 --- a/docs/assets/js/18.145cf324.js +++ b/docs/assets/js/18.bee2a3a1.js @@ -1 +1 @@ -(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 +(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{441: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/20.fe442e43.js b/docs/assets/js/20.63096511.js similarity index 99% rename from docs/assets/js/20.fe442e43.js rename to docs/assets/js/20.63096511.js index bab7328c4..f622bd9b5 100644 --- a/docs/assets/js/20.fe442e43.js +++ b/docs/assets/js/20.63096511.js @@ -1 +1 @@ -(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 +(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{446: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/21.01b56736.js b/docs/assets/js/21.5d4e271d.js similarity index 99% rename from docs/assets/js/21.01b56736.js rename to docs/assets/js/21.5d4e271d.js index 6b3d5575d..a691dfec2 100644 --- a/docs/assets/js/21.01b56736.js +++ b/docs/assets/js/21.5d4e271d.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{445: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("ul",[a("li",[e._v("Title: Phrase Query")]),e._v(" "),a("li",[e._v("Start Date: 2021-06-02")]),e._v(" "),a("li",[e._v("Specification PR: "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/43",target:"_blank",rel:"noopener noreferrer"}},[e._v("#43"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("MeiliSearch Tracking-Issues: "),a("a",{attrs:{href:"https://github.com/meilisearch/transplant/issues/198",target:"_blank",rel:"noopener noreferrer"}},[e._v("transplant/#198"),a("OutboundLink")],1)])]),e._v(" "),a("h1",{attrs:{id:"phrase-query"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#phrase-query"}},[e._v("#")]),e._v(" Phrase Query")]),e._v(" "),a("h2",{attrs:{id:"_1-feature-description-and-interaction"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-feature-description-and-interaction"}},[e._v("#")]),e._v(" 1. Feature Description and Interaction")]),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("MeiliSearch does not allow users a way to write a strict query in order to ask the engine to be more strict in its selection of candidates for search results. The Phrase Query feature adds a simple syntax available to users to require the engine to select documents that strictly match some phrase, indicated by quotation marks. That is, without typography, n-gram, wordsplit, prefix, synonym, and, proximity. In addition, the expression of a Phrase Query is case insensitive.")]),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("This feature is driven by the user's needs. Indeed, let's take some examples recently brought up in our community Slack.")]),e._v(" "),a("h4",{attrs:{id:"example-1"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-1"}},[e._v("#")]),e._v(" Example 1")]),e._v(" "),a("p",[e._v("The user wants to have a way to ensure that the words of his search are exactly contained in the order of the terms in the documents returned by MeiliSearch.")]),e._v(" "),a("h4",{attrs:{id:"example-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-2"}},[e._v("#")]),e._v(" Example 2")]),e._v(" "),a("p",[e._v("The user in question would like to be able to retrieve specifically the document containing the unique ISBN identifier and only that one. In a UX context of type as you search, this is impossible today without impacting the UI/UX or finding a workaround.")]),e._v(" "),a("ul",[a("li",[a("p",[e._v("It could have had a specific search field only dedicated to this ISBN field in order to make it a filter and using the "),a("code",[e._v("=")]),e._v(" operator. Not great for the UX.")])]),e._v(" "),a("li",[a("p",[e._v("It could also have kept a single search field and detected that an ISBN was entered in the search field using a regex to inject that filter at that point. Not great for the developper experience, moreover, what happens when a pattern cannot be specifically determined?")])])]),e._v(" "),a("p",[e._v("The Phrase Query feature will easily solve the last case but will also adapt to the needs of the user performing the search.")]),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 allows the use of Phrase Query syntax as long as the "),a("code",[e._v("advancedSyntax")]),e._v(" parameter is set to true in the settings.")]),e._v(" "),a("p",[e._v('As Algolia documentation said, a phrase query represents a specific sequence of terms that must be matched next to one another and in the given order. A phrase query needs to be surrounded by double quotes ("). For example, the query "search engine" only returns a record if it contains “search engine” exactly in at least one attribute.')]),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 provides a "),a("code",[e._v("match_phrase")]),e._v(" field to perform this type of search.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('GET /_search\n{\n "query": {\n "match_phrase": {\n "message": "this is a test"\n }\n }\n}\n')])])]),a("h3",{attrs:{id:"iv-explanation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#iv-explanation"}},[e._v("#")]),e._v(" IV. Explanation")]),e._v(" "),a("p",[e._v("Let's say I want to search for a specific book with a title strictly containing "),a("code",[e._v("Plays and Playwrights 2002")]),e._v(".")]),e._v(" "),a("p",[e._v("Using the standard query parameter syntax as "),a("code",[e._v("q")]),e._v(" equals to "),a("code",[e._v("Plays and Playwrights 2002")]),e._v(", will lead to have multiple search results because of the ranking rules criterions.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('{\n "hits": [\n {\n "title": "Plays and Playwrights 2002",\n "author": "Martin Denton"\n },\n {\n "title": "Plays and Playwrights 2009",\n "author": "Martin Denton"\n },\n {\n "title": "Plays and Playwrights 2008",\n "author": "Robert Attweiler"\n },\n ...\n {\n "title": "The Best American Short Plays 2006-2007",\n "author": "Barbara Parisi"\n },\n {\n "title": "New Playwrights: The Best Plays of 2000",\n "author": "D. L. Lepidus"\n },\n {\n "title": "Women Heroes: Six Short Plays from the Women\'s Project",\n "author": "Julia Miles"\n }\n ],\n "nbHits": 31,\n "exhaustiveNbHits": false,\n "query": "Plays and Playwrights 2002",\n "limit": 20,\n "offset": 0,\n "processingTimeMs": 7\n}\n')])])]),a("h4",{attrs:{id:"phrase-query-usage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#phrase-query-usage"}},[e._v("#")]),e._v(" Phrase Query usage")]),e._v(" "),a("p",[e._v("To use the Phrase Query syntax, simply surround the contiguous search terms with the characters "),a("code",[e._v('"')]),e._v(".")]),e._v(" "),a("p",[e._v("Using the Phrase Query syntax this way, with "),a("code",[e._v("q")]),e._v(" equals to "),a("code",[e._v('"Plays and Playwrights 2002"')]),e._v(", will lead to have only one result because the title is written exactly like that.")]),e._v(" "),a("blockquote",[a("p",[e._v("Note that it's case insensitive. So, if I search with "),a("code",[e._v('"plays and playwrights 2002"')]),e._v(", this will lead to the same result.")])]),e._v(" "),a("p",[e._v("The value between the "),a("code",[e._v('"')]),e._v(" operators will be searched without:")]),e._v(" "),a("ul",[a("li",[e._v("typography")]),e._v(" "),a("li",[e._v("n-gram")]),e._v(" "),a("li",[e._v("wordsplit")]),e._v(" "),a("li",[e._v("prefix")]),e._v(" "),a("li",[e._v("synonym")]),e._v(" "),a("li",[e._v("proximity")])]),e._v(" "),a("p",[e._v("Moreover, it ensures that all matching documents contain the words in the given order in the Phrase.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('{\n "hits": [\n {\n "title": "Plays and Playwrights 2002",\n "author": "Martin Denton"\n }\n ],\n "nbHits": 1,\n "exhaustiveNbHits": false,\n "query": "\\"Plays and Playwrights 2002\\"",\n "limit": 20,\n "offset": 0,\n "processingTimeMs": 0\n}\n')])])]),a("p",[e._v("So now let's say that I want to search for a title that strictly includes the phrase "),a("code",[e._v('"African American"')]),e._v(" but speaking about poetry. The Phrase Query syntax can be used in conjunction with the basic syntax.")]),e._v(" "),a("p",[e._v("The query can be expressed like this: "),a("code",[e._v('"African American" poem')])]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('{\n "hits": [\n {\n "title": "100 Best African American Poems with CD",\n "author": "Nikki Giovanni"\n },\n {\n "title": "The African American Experience: Black History and Culture Through Speeches, Letters, Editorials, Poems, Songs, and Stories",\n "author": "Kai Wright"\n },\n {\n "title": "African American Literature (Penguin Academics Series)",\n "author": "Keith Gilyard"\n },\n {\n "title": "African-American Poetry: An Anthology, 1773-1930",\n "author": "Joan R. Sherman"\n },\n {\n "title": "African-American Literature: A Brief Introduction and Anthology",\n "author": "Al Young"\n },\n {\n "title": "Early African American Classics (Barnes & Noble Classics Series)",\n "author": "Barnes & Noble"\n },\n')])])]),a("p",[e._v("As you can see in the results, the presence or absence of one or more soft separators such as "),a("code",[e._v("-")]),e._v(", "),a("code",[e._v("_")]),e._v(", "),a("code",[e._v("\\")]),e._v(", "),a("code",[e._v(":")]),e._v(", "),a("code",[e._v("/")]),e._v(", "),a("code",[e._v("\\\\")]),e._v(", "),a("code",[e._v("@")]),e._v(", "),a("code",[e._v('"')]),e._v(", "),a("code",[e._v("+")]),e._v(", "),a("code",[e._v("~")]),e._v(", "),a("code",[e._v("=")]),e._v(", "),a("code",[e._v("^")]),e._v(", "),a("code",[e._v("*")]),e._v(", "),a("code",[e._v("#")]),e._v(" between two words does not affect the query match of the phrase and the document.")]),e._v(" "),a("h4",{attrs:{id:"multiple-phrase-query-usage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#multiple-phrase-query-usage"}},[e._v("#")]),e._v(" Multiple Phrase Query usage")]),e._v(" "),a("p",[e._v("It is possible to use multiple phrase queries within a search.")]),e._v(" "),a("p",[e._v("E.g. "),a("code",[e._v('"African American" "Anthology"')])]),e._v(" "),a("p",[e._v("With this expression, the returned documents will contain exactly the existence of both phrase queries.")]),e._v(" "),a("h4",{attrs:{id:"know-limitations"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#know-limitations"}},[e._v("#")]),e._v(" Know limitations")]),e._v(" "),a("h5",{attrs:{id:"case-sensivity"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#case-sensivity"}},[e._v("#")]),e._v(" Case Sensivity")]),e._v(" "),a("p",[e._v("The Phrase Query syntax is case insensitive.")]),e._v(" "),a("h5",{attrs:{id:"multiple-hard-separator-case"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#multiple-hard-separator-case"}},[e._v("#")]),e._v(" Multiple hard separator case")]),e._v(" "),a("p",[e._v("Given a document containing "),a("code",[e._v("David.- .- .- .- .-Bowie")]),e._v(" as value for an attribute.")]),e._v(" "),a("p",[e._v("This document can be matched using a phrase query such as "),a("code",[e._v('"David" "Bowie"')]),e._v(" or "),a("code",[e._v('"David.Bowie"')]),e._v(". At the engine level, this is the same query. The latter is translated into the former phrase because the "),a("code",[e._v(".")]),e._v(" character is a hard separator. This behavior comes from the default tokenizer, hard separators are seen as a marker for a different context or phrase.")]),e._v(" "),a("p",[e._v("Here is the list of hard separators in the default tokenizer: "),a("code",[e._v(".")]),e._v(", "),a("code",[e._v(";")]),e._v(", "),a("code",[e._v(",")]),e._v(", "),a("code",[e._v("!")]),e._v(", "),a("code",[e._v("?")]),e._v(", "),a("code",[e._v("(")]),e._v(", "),a("code",[e._v(")")]),e._v(", "),a("code",[e._v("[")]),e._v(", "),a("code",[e._v("]")]),e._v(", "),a("code",[e._v("{")]),e._v(", "),a("code",[e._v("}")]),e._v(", "),a("code",[e._v("|")])]),e._v(" "),a("p",[e._v("Multiple hard separator are treaten the same as if they were one. So "),a("code",[e._v('"David.-.-.-.Bowie"')]),e._v(" will not work to match the document.")]),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("ul",[a("li",[e._v("Mention that new Phrase Query syntax in the documentation. Can it be on a dedicated page or on "),a("a",{attrs:{href:"https://docs.meilisearch.com/reference/features/search_parameters.html#query-q",target:"_blank",rel:"noopener noreferrer"}},[e._v("the q search parameter"),a("OutboundLink")],1),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("p",[e._v("N/A")])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{444: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("ul",[a("li",[e._v("Title: Phrase Query")]),e._v(" "),a("li",[e._v("Start Date: 2021-06-02")]),e._v(" "),a("li",[e._v("Specification PR: "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/43",target:"_blank",rel:"noopener noreferrer"}},[e._v("#43"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("MeiliSearch Tracking-Issues: "),a("a",{attrs:{href:"https://github.com/meilisearch/transplant/issues/198",target:"_blank",rel:"noopener noreferrer"}},[e._v("transplant/#198"),a("OutboundLink")],1)])]),e._v(" "),a("h1",{attrs:{id:"phrase-query"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#phrase-query"}},[e._v("#")]),e._v(" Phrase Query")]),e._v(" "),a("h2",{attrs:{id:"_1-feature-description-and-interaction"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-feature-description-and-interaction"}},[e._v("#")]),e._v(" 1. Feature Description and Interaction")]),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("MeiliSearch does not allow users a way to write a strict query in order to ask the engine to be more strict in its selection of candidates for search results. The Phrase Query feature adds a simple syntax available to users to require the engine to select documents that strictly match some phrase, indicated by quotation marks. That is, without typography, n-gram, wordsplit, prefix, synonym, and, proximity. In addition, the expression of a Phrase Query is case insensitive.")]),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("This feature is driven by the user's needs. Indeed, let's take some examples recently brought up in our community Slack.")]),e._v(" "),a("h4",{attrs:{id:"example-1"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-1"}},[e._v("#")]),e._v(" Example 1")]),e._v(" "),a("p",[e._v("The user wants to have a way to ensure that the words of his search are exactly contained in the order of the terms in the documents returned by MeiliSearch.")]),e._v(" "),a("h4",{attrs:{id:"example-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-2"}},[e._v("#")]),e._v(" Example 2")]),e._v(" "),a("p",[e._v("The user in question would like to be able to retrieve specifically the document containing the unique ISBN identifier and only that one. In a UX context of type as you search, this is impossible today without impacting the UI/UX or finding a workaround.")]),e._v(" "),a("ul",[a("li",[a("p",[e._v("It could have had a specific search field only dedicated to this ISBN field in order to make it a filter and using the "),a("code",[e._v("=")]),e._v(" operator. Not great for the UX.")])]),e._v(" "),a("li",[a("p",[e._v("It could also have kept a single search field and detected that an ISBN was entered in the search field using a regex to inject that filter at that point. Not great for the developper experience, moreover, what happens when a pattern cannot be specifically determined?")])])]),e._v(" "),a("p",[e._v("The Phrase Query feature will easily solve the last case but will also adapt to the needs of the user performing the search.")]),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 allows the use of Phrase Query syntax as long as the "),a("code",[e._v("advancedSyntax")]),e._v(" parameter is set to true in the settings.")]),e._v(" "),a("p",[e._v('As Algolia documentation said, a phrase query represents a specific sequence of terms that must be matched next to one another and in the given order. A phrase query needs to be surrounded by double quotes ("). For example, the query "search engine" only returns a record if it contains “search engine” exactly in at least one attribute.')]),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 provides a "),a("code",[e._v("match_phrase")]),e._v(" field to perform this type of search.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('GET /_search\n{\n "query": {\n "match_phrase": {\n "message": "this is a test"\n }\n }\n}\n')])])]),a("h3",{attrs:{id:"iv-explanation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#iv-explanation"}},[e._v("#")]),e._v(" IV. Explanation")]),e._v(" "),a("p",[e._v("Let's say I want to search for a specific book with a title strictly containing "),a("code",[e._v("Plays and Playwrights 2002")]),e._v(".")]),e._v(" "),a("p",[e._v("Using the standard query parameter syntax as "),a("code",[e._v("q")]),e._v(" equals to "),a("code",[e._v("Plays and Playwrights 2002")]),e._v(", will lead to have multiple search results because of the ranking rules criterions.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('{\n "hits": [\n {\n "title": "Plays and Playwrights 2002",\n "author": "Martin Denton"\n },\n {\n "title": "Plays and Playwrights 2009",\n "author": "Martin Denton"\n },\n {\n "title": "Plays and Playwrights 2008",\n "author": "Robert Attweiler"\n },\n ...\n {\n "title": "The Best American Short Plays 2006-2007",\n "author": "Barbara Parisi"\n },\n {\n "title": "New Playwrights: The Best Plays of 2000",\n "author": "D. L. Lepidus"\n },\n {\n "title": "Women Heroes: Six Short Plays from the Women\'s Project",\n "author": "Julia Miles"\n }\n ],\n "nbHits": 31,\n "exhaustiveNbHits": false,\n "query": "Plays and Playwrights 2002",\n "limit": 20,\n "offset": 0,\n "processingTimeMs": 7\n}\n')])])]),a("h4",{attrs:{id:"phrase-query-usage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#phrase-query-usage"}},[e._v("#")]),e._v(" Phrase Query usage")]),e._v(" "),a("p",[e._v("To use the Phrase Query syntax, simply surround the contiguous search terms with the characters "),a("code",[e._v('"')]),e._v(".")]),e._v(" "),a("p",[e._v("Using the Phrase Query syntax this way, with "),a("code",[e._v("q")]),e._v(" equals to "),a("code",[e._v('"Plays and Playwrights 2002"')]),e._v(", will lead to have only one result because the title is written exactly like that.")]),e._v(" "),a("blockquote",[a("p",[e._v("Note that it's case insensitive. So, if I search with "),a("code",[e._v('"plays and playwrights 2002"')]),e._v(", this will lead to the same result.")])]),e._v(" "),a("p",[e._v("The value between the "),a("code",[e._v('"')]),e._v(" operators will be searched without:")]),e._v(" "),a("ul",[a("li",[e._v("typography")]),e._v(" "),a("li",[e._v("n-gram")]),e._v(" "),a("li",[e._v("wordsplit")]),e._v(" "),a("li",[e._v("prefix")]),e._v(" "),a("li",[e._v("synonym")]),e._v(" "),a("li",[e._v("proximity")])]),e._v(" "),a("p",[e._v("Moreover, it ensures that all matching documents contain the words in the given order in the Phrase.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('{\n "hits": [\n {\n "title": "Plays and Playwrights 2002",\n "author": "Martin Denton"\n }\n ],\n "nbHits": 1,\n "exhaustiveNbHits": false,\n "query": "\\"Plays and Playwrights 2002\\"",\n "limit": 20,\n "offset": 0,\n "processingTimeMs": 0\n}\n')])])]),a("p",[e._v("So now let's say that I want to search for a title that strictly includes the phrase "),a("code",[e._v('"African American"')]),e._v(" but speaking about poetry. The Phrase Query syntax can be used in conjunction with the basic syntax.")]),e._v(" "),a("p",[e._v("The query can be expressed like this: "),a("code",[e._v('"African American" poem')])]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('{\n "hits": [\n {\n "title": "100 Best African American Poems with CD",\n "author": "Nikki Giovanni"\n },\n {\n "title": "The African American Experience: Black History and Culture Through Speeches, Letters, Editorials, Poems, Songs, and Stories",\n "author": "Kai Wright"\n },\n {\n "title": "African American Literature (Penguin Academics Series)",\n "author": "Keith Gilyard"\n },\n {\n "title": "African-American Poetry: An Anthology, 1773-1930",\n "author": "Joan R. Sherman"\n },\n {\n "title": "African-American Literature: A Brief Introduction and Anthology",\n "author": "Al Young"\n },\n {\n "title": "Early African American Classics (Barnes & Noble Classics Series)",\n "author": "Barnes & Noble"\n },\n')])])]),a("p",[e._v("As you can see in the results, the presence or absence of one or more soft separators such as "),a("code",[e._v("-")]),e._v(", "),a("code",[e._v("_")]),e._v(", "),a("code",[e._v("\\")]),e._v(", "),a("code",[e._v(":")]),e._v(", "),a("code",[e._v("/")]),e._v(", "),a("code",[e._v("\\\\")]),e._v(", "),a("code",[e._v("@")]),e._v(", "),a("code",[e._v('"')]),e._v(", "),a("code",[e._v("+")]),e._v(", "),a("code",[e._v("~")]),e._v(", "),a("code",[e._v("=")]),e._v(", "),a("code",[e._v("^")]),e._v(", "),a("code",[e._v("*")]),e._v(", "),a("code",[e._v("#")]),e._v(" between two words does not affect the query match of the phrase and the document.")]),e._v(" "),a("h4",{attrs:{id:"multiple-phrase-query-usage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#multiple-phrase-query-usage"}},[e._v("#")]),e._v(" Multiple Phrase Query usage")]),e._v(" "),a("p",[e._v("It is possible to use multiple phrase queries within a search.")]),e._v(" "),a("p",[e._v("E.g. "),a("code",[e._v('"African American" "Anthology"')])]),e._v(" "),a("p",[e._v("With this expression, the returned documents will contain exactly the existence of both phrase queries.")]),e._v(" "),a("h4",{attrs:{id:"know-limitations"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#know-limitations"}},[e._v("#")]),e._v(" Know limitations")]),e._v(" "),a("h5",{attrs:{id:"case-sensivity"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#case-sensivity"}},[e._v("#")]),e._v(" Case Sensivity")]),e._v(" "),a("p",[e._v("The Phrase Query syntax is case insensitive.")]),e._v(" "),a("h5",{attrs:{id:"multiple-hard-separator-case"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#multiple-hard-separator-case"}},[e._v("#")]),e._v(" Multiple hard separator case")]),e._v(" "),a("p",[e._v("Given a document containing "),a("code",[e._v("David.- .- .- .- .-Bowie")]),e._v(" as value for an attribute.")]),e._v(" "),a("p",[e._v("This document can be matched using a phrase query such as "),a("code",[e._v('"David" "Bowie"')]),e._v(" or "),a("code",[e._v('"David.Bowie"')]),e._v(". At the engine level, this is the same query. The latter is translated into the former phrase because the "),a("code",[e._v(".")]),e._v(" character is a hard separator. This behavior comes from the default tokenizer, hard separators are seen as a marker for a different context or phrase.")]),e._v(" "),a("p",[e._v("Here is the list of hard separators in the default tokenizer: "),a("code",[e._v(".")]),e._v(", "),a("code",[e._v(";")]),e._v(", "),a("code",[e._v(",")]),e._v(", "),a("code",[e._v("!")]),e._v(", "),a("code",[e._v("?")]),e._v(", "),a("code",[e._v("(")]),e._v(", "),a("code",[e._v(")")]),e._v(", "),a("code",[e._v("[")]),e._v(", "),a("code",[e._v("]")]),e._v(", "),a("code",[e._v("{")]),e._v(", "),a("code",[e._v("}")]),e._v(", "),a("code",[e._v("|")])]),e._v(" "),a("p",[e._v("Multiple hard separator are treaten the same as if they were one. So "),a("code",[e._v('"David.-.-.-.Bowie"')]),e._v(" will not work to match the document.")]),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("ul",[a("li",[e._v("Mention that new Phrase Query syntax in the documentation. Can it be on a dedicated page or on "),a("a",{attrs:{href:"https://docs.meilisearch.com/reference/features/search_parameters.html#query-q",target:"_blank",rel:"noopener noreferrer"}},[e._v("the q search parameter"),a("OutboundLink")],1),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("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/22.9d7baf38.js b/docs/assets/js/22.9d537523.js similarity index 98% rename from docs/assets/js/22.9d7baf38.js rename to docs/assets/js/22.9d537523.js index d579d4247..4361f4738 100644 --- a/docs/assets/js/22.9d7baf38.js +++ b/docs/assets/js/22.9d537523.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{446:function(t,e,a){"use strict";a.r(e);var s=a(62),n=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("ul",[a("li",[t._v("Title: Reset Stop-words and Synonyms settings with null value")]),t._v(" "),a("li",[t._v("Start Date: 2021-06-08")]),t._v(" "),a("li",[t._v("Specification PR: "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/47",target:"_blank",rel:"noopener noreferrer"}},[t._v("#47"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("MeiliSearch Tracking-issues: "),a("a",{attrs:{href:"https://github.com/meilisearch/transplant/issues/217",target:"_blank",rel:"noopener noreferrer"}},[t._v("transplant/#217"),a("OutboundLink")],1)])]),t._v(" "),a("h1",{attrs:{id:"reset-stop-words-and-synonyms-settings-with-a-null-value"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#reset-stop-words-and-synonyms-settings-with-a-null-value"}},[t._v("#")]),t._v(" Reset Stop-words and Synonyms settings with a null value.")]),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("All Sub Settings "),a("code",[t._v("POST")]),t._v(" endpoint accepts a null value in the http request body to reset the engine configuration to the default values. This is not the case for "),a("a",{attrs:{href:"https://docs.meilisearch.com/reference/api/stop_words.html#update-stop-words",target:"_blank",rel:"noopener noreferrer"}},[t._v("Stop-words"),a("OutboundLink")],1),t._v(" and "),a("a",{attrs:{href:"https://docs.meilisearch.com/reference/api/synonyms.html#update-synonyms",target:"_blank",rel:"noopener noreferrer"}},[t._v("Synonyms"),a("OutboundLink")],1),t._v(" settings endpoints.")]),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("This specification is written to make the above mentioned routes consistent with the others.")]),t._v(" "),a("h3",{attrs:{id:"iii-additional-materials"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#iii-additional-materials"}},[t._v("#")]),t._v(" III. Additional Materials")]),t._v(" "),a("p",[t._v("N/A")]),t._v(" "),a("h3",{attrs:{id:"iv-explanation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#iv-explanation"}},[t._v("#")]),t._v(" IV. Explanation")]),t._v(" "),a("h4",{attrs:{id:"example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example"}},[t._v("#")]),t._v(" Example")]),t._v(" "),a("p",[t._v("E.g. Reset Stop-Words setting with a null value on "),a("a",{attrs:{href:"https://docs.meilisearch.com/reference/api/stop_words.html#update-stop-words",target:"_blank",rel:"noopener noreferrer"}},[t._v("POST Stop-Words Endpoint"),a("OutboundLink")],1)]),t._v(" "),a("p",[t._v("Given this stop-words configuration")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('[\n "of",\n "the"\n]\n')])])]),a("p",[t._v("As a User I send")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("null\n")])])]),a("p",[t._v("To Expect")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("[]\n")])])]),a("h4",{attrs:{id:"post-stop-words-endpoint"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#post-stop-words-endpoint"}},[t._v("#")]),t._v(" "),a("a",{attrs:{href:"https://docs.meilisearch.com/reference/api/stop_words.html#update-stop-words",target:"_blank",rel:"noopener noreferrer"}},[t._v("POST Stop-Words Endpoint"),a("OutboundLink")],1)]),t._v(" "),a("p",[t._v("Sending a "),a("code",[t._v("null")]),t._v(" value in the request body like the given request body above should reset the "),a("code",[t._v("Stop-Words")]),t._v(" setting to the engine default values.")]),t._v(" "),a("p",[t._v("The default value for "),a("code",[t._v("Stop-Words")]),t._v(" is an empty array.")]),t._v(" "),a("h4",{attrs:{id:"post-synonyms-endpoint"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#post-synonyms-endpoint"}},[t._v("#")]),t._v(" "),a("a",{attrs:{href:"https://docs.meilisearch.com/reference/api/synonyms.html#update-synonyms",target:"_blank",rel:"noopener noreferrer"}},[t._v("POST Synonyms Endpoint"),a("OutboundLink")],1)]),t._v(" "),a("p",[t._v("Sending a "),a("code",[t._v("null")]),t._v(" value in the request body like the given request body above should reset the "),a("code",[t._v("Synonyms")]),t._v(" setting to the engine default values.")]),t._v(" "),a("p",[t._v("The default value for "),a("code",[t._v("Synonyms")]),t._v(" is an empty object.")]),t._v(" "),a("h3",{attrs:{id:"v-impact-on-documentation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#v-impact-on-documentation"}},[t._v("#")]),t._v(" V. Impact on Documentation")]),t._v(" "),a("p",[t._v("N/A")]),t._v(" "),a("h3",{attrs:{id:"vi-impact-on-sdks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#vi-impact-on-sdks"}},[t._v("#")]),t._v(" VI. Impact on SDKs")]),t._v(" "),a("p",[t._v("The SDKs must allow the "),a("code",[t._v("null")]),t._v(" value for every setting.")]),t._v(" "),a("h2",{attrs:{id:"_2-technical-aspects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-aspects"}},[t._v("#")]),t._v(" 2. Technical Aspects")]),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")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{445:function(t,e,a){"use strict";a.r(e);var s=a(62),n=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("ul",[a("li",[t._v("Title: Reset Stop-words and Synonyms settings with null value")]),t._v(" "),a("li",[t._v("Start Date: 2021-06-08")]),t._v(" "),a("li",[t._v("Specification PR: "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/47",target:"_blank",rel:"noopener noreferrer"}},[t._v("#47"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("MeiliSearch Tracking-issues: "),a("a",{attrs:{href:"https://github.com/meilisearch/transplant/issues/217",target:"_blank",rel:"noopener noreferrer"}},[t._v("transplant/#217"),a("OutboundLink")],1)])]),t._v(" "),a("h1",{attrs:{id:"reset-stop-words-and-synonyms-settings-with-a-null-value"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#reset-stop-words-and-synonyms-settings-with-a-null-value"}},[t._v("#")]),t._v(" Reset Stop-words and Synonyms settings with a null value.")]),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("All Sub Settings "),a("code",[t._v("POST")]),t._v(" endpoint accepts a null value in the http request body to reset the engine configuration to the default values. This is not the case for "),a("a",{attrs:{href:"https://docs.meilisearch.com/reference/api/stop_words.html#update-stop-words",target:"_blank",rel:"noopener noreferrer"}},[t._v("Stop-words"),a("OutboundLink")],1),t._v(" and "),a("a",{attrs:{href:"https://docs.meilisearch.com/reference/api/synonyms.html#update-synonyms",target:"_blank",rel:"noopener noreferrer"}},[t._v("Synonyms"),a("OutboundLink")],1),t._v(" settings endpoints.")]),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("This specification is written to make the above mentioned routes consistent with the others.")]),t._v(" "),a("h3",{attrs:{id:"iii-additional-materials"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#iii-additional-materials"}},[t._v("#")]),t._v(" III. Additional Materials")]),t._v(" "),a("p",[t._v("N/A")]),t._v(" "),a("h3",{attrs:{id:"iv-explanation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#iv-explanation"}},[t._v("#")]),t._v(" IV. Explanation")]),t._v(" "),a("h4",{attrs:{id:"example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example"}},[t._v("#")]),t._v(" Example")]),t._v(" "),a("p",[t._v("E.g. Reset Stop-Words setting with a null value on "),a("a",{attrs:{href:"https://docs.meilisearch.com/reference/api/stop_words.html#update-stop-words",target:"_blank",rel:"noopener noreferrer"}},[t._v("POST Stop-Words Endpoint"),a("OutboundLink")],1)]),t._v(" "),a("p",[t._v("Given this stop-words configuration")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('[\n "of",\n "the"\n]\n')])])]),a("p",[t._v("As a User I send")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("null\n")])])]),a("p",[t._v("To Expect")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("[]\n")])])]),a("h4",{attrs:{id:"post-stop-words-endpoint"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#post-stop-words-endpoint"}},[t._v("#")]),t._v(" "),a("a",{attrs:{href:"https://docs.meilisearch.com/reference/api/stop_words.html#update-stop-words",target:"_blank",rel:"noopener noreferrer"}},[t._v("POST Stop-Words Endpoint"),a("OutboundLink")],1)]),t._v(" "),a("p",[t._v("Sending a "),a("code",[t._v("null")]),t._v(" value in the request body like the given request body above should reset the "),a("code",[t._v("Stop-Words")]),t._v(" setting to the engine default values.")]),t._v(" "),a("p",[t._v("The default value for "),a("code",[t._v("Stop-Words")]),t._v(" is an empty array.")]),t._v(" "),a("h4",{attrs:{id:"post-synonyms-endpoint"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#post-synonyms-endpoint"}},[t._v("#")]),t._v(" "),a("a",{attrs:{href:"https://docs.meilisearch.com/reference/api/synonyms.html#update-synonyms",target:"_blank",rel:"noopener noreferrer"}},[t._v("POST Synonyms Endpoint"),a("OutboundLink")],1)]),t._v(" "),a("p",[t._v("Sending a "),a("code",[t._v("null")]),t._v(" value in the request body like the given request body above should reset the "),a("code",[t._v("Synonyms")]),t._v(" setting to the engine default values.")]),t._v(" "),a("p",[t._v("The default value for "),a("code",[t._v("Synonyms")]),t._v(" is an empty object.")]),t._v(" "),a("h3",{attrs:{id:"v-impact-on-documentation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#v-impact-on-documentation"}},[t._v("#")]),t._v(" V. Impact on Documentation")]),t._v(" "),a("p",[t._v("N/A")]),t._v(" "),a("h3",{attrs:{id:"vi-impact-on-sdks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#vi-impact-on-sdks"}},[t._v("#")]),t._v(" VI. Impact on SDKs")]),t._v(" "),a("p",[t._v("The SDKs must allow the "),a("code",[t._v("null")]),t._v(" value for every setting.")]),t._v(" "),a("h2",{attrs:{id:"_2-technical-aspects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-aspects"}},[t._v("#")]),t._v(" 2. Technical Aspects")]),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")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/24.fde5f06a.js b/docs/assets/js/24.71bff866.js similarity index 99% rename from docs/assets/js/24.fde5f06a.js rename to docs/assets/js/24.71bff866.js index 8058fef89..92b11c416 100644 --- a/docs/assets/js/24.fde5f06a.js +++ b/docs/assets/js/24.71bff866.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{450: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],{448: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/25.96849fe5.js b/docs/assets/js/25.759f5cae.js similarity index 99% rename from docs/assets/js/25.96849fe5.js rename to docs/assets/js/25.759f5cae.js index 34fcd818a..f21b53625 100644 --- a/docs/assets/js/25.96849fe5.js +++ b/docs/assets/js/25.759f5cae.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[25],{448: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("ul",[a("li",[e._v("Title: Geosearch")]),e._v(" "),a("li",[e._v("Start Date: 2021-08-02")]),e._v(" "),a("li",[e._v("Specification PR: "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/59",target:"_blank",rel:"noopener noreferrer"}},[e._v("#59"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Discovery Issue: "),a("a",{attrs:{href:"https://github.com/meilisearch/product/issues/42",target:"_blank",rel:"noopener noreferrer"}},[e._v("#42"),a("OutboundLink")],1)])]),e._v(" "),a("h1",{attrs:{id:"geosearch"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#geosearch"}},[e._v("#")]),e._v(" Geosearch")]),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("The purpose of this specification is to add a first iteration of the "),a("strong",[e._v("geosearch")]),e._v(" feature to give geo-filtering and geosorting capabilities at search time.")]),e._v(" "),a("h4",{attrs:{id:"summary-key-points"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#summary-key-points"}},[e._v("#")]),e._v(" Summary Key points")]),e._v(" "),a("ul",[a("li",[e._v("Documents MUST have a "),a("code",[e._v("_geo")]),e._v(" reserved object to be geosearchable.")]),e._v(" "),a("li",[e._v("Filter documents by a given geo radius using the built-in filter "),a("code",[e._v("_geoRadius({lat}, {lng}, {distance_in_meters})")]),e._v(".")]),e._v(" "),a("li",[e._v("Filter documents by a given geo bounding box using the built-in filter "),a("code",[e._v("_geoBoundingBox([{lat}, {lng}], [{lat, lng}])")]),e._v(". The first pair of coordinates represents the top right corner of the bounding box, while the second pair represents the bottom left corner.")]),e._v(" "),a("li",[e._v("It is possible to cumulate several geosearch filters within the "),a("code",[e._v("filter")]),e._v(" field.")]),e._v(" "),a("li",[e._v("Sort documents in ascending/descending order around a geo point. e.g. "),a("code",[e._v("_geoPoint({lat}, {lng}):asc")]),e._v(".")]),e._v(" "),a("li",[e._v("It is possible to filter and/or sort by geographical criteria of the user's choice.")]),e._v(" "),a("li",[a("code",[e._v("_geo")]),e._v(" must be set as a filterable attribute to use geo filtering capabilities.")]),e._v(" "),a("li",[a("code",[e._v("_geo")]),e._v(" must be set as a sortable attribute to use geo sort capabilities.")]),e._v(" "),a("li",[e._v("There is no "),a("code",[e._v("geo")]),e._v(" ranking rule that can be manipulated by the user. This one is automatically integrated in the ranking rule "),a("code",[e._v("sort")]),e._v(" by default and activated by sorting using the "),a("code",[e._v("_geoPoint({lat}, {lng})")]),e._v(" built-in sort rule.")]),e._v(" "),a("li",[e._v("Using "),a("code",[e._v("_geoPoint({lat}, {lng})")]),e._v(" in the "),a("code",[e._v("sort")]),e._v(" parameter at search leads the engine to return a "),a("code",[e._v("_geoDistance")]),e._v(" within the search results. This field represents the distance in meters of the document from the specified "),a("code",[e._v("_geoPoint")]),e._v(".")])]),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("According to our user feedback, the lack of a geosearch feature is mentioned as one of the biggest deal-breakers for choosing MeiliSearch as a search engine. A search engine must offer this feature. Some use cases specifically require integrated geosearch capabilities. Moreover, a lot of direct competitors offer it. Users today must find workarounds like using geohash to be able to geosearch documents. We hope to better serve the needs of users by implementing this feature. It allows multiplying the use-cases to which MeiliSearch can respond.")]),e._v(" "),a("h3",{attrs:{id:"iii-technical-explanations"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#iii-technical-explanations"}},[e._v("#")]),e._v(" III. Technical Explanations")]),e._v(" "),a("h4",{attrs:{id:"as-a-developer-i-want-to-add-geospatial-coordinates-to-a-document-so-that-the-document-can-be-geosearchable"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#as-a-developer-i-want-to-add-geospatial-coordinates-to-a-document-so-that-the-document-can-be-geosearchable"}},[e._v("#")]),e._v(" "),a("strong",[e._v("As a developer, I want to add geospatial coordinates to a document so that the document can be geosearchable.")])]),e._v(" "),a("ul",[a("li",[e._v("Introduce a reserved field "),a("code",[e._v("_geo")]),e._v(" for documents to store geo spatial data from an "),a("strong",[e._v("object")]),e._v(" made of "),a("code",[e._v("lat")]),e._v(" and "),a("code",[e._v("lng")]),e._v(" fields for a "),a("strong",[e._v("JSON format")]),e._v(". If the "),a("code",[e._v("_geo")]),e._v(" field is set to "),a("code",[e._v("null")]),e._v(", my document won't be geosearchable.")]),e._v(" "),a("li",[e._v("Introduce a reserved column "),a("code",[e._v("_geo")]),e._v(" for documents to store geo spatial data from a "),a("strong",[e._v("string")]),e._v(" made of "),a("code",[e._v("lat,lng")]),e._v(" for a "),a("strong",[e._v("CSV format")]),e._v(".")])]),e._v(" "),a("h5",{attrs:{id:"json-format"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#json-format"}},[e._v("#")]),e._v(" "),a("strong",[e._v("JSON Format")])]),e._v(" "),a("p",[a("strong",[a("code",[e._v("_geo")]),e._v(" field definition")])]),e._v(" "),a("ul",[a("li",[e._v("Name: "),a("code",[e._v("_geo")])]),e._v(" "),a("li",[e._v("Type: Object")]),e._v(" "),a("li",[e._v("Format: "),a("code",[e._v("{lat:number|string, lng:number|string}")])]),e._v(" "),a("li",[e._v("Not required")])]),e._v(" "),a("blockquote",[a("p",[e._v("💡 if "),a("code",[e._v("_geo")]),e._v(" is found in the document payload, "),a("code",[e._v("lat")]),e._v(" and "),a("code",[e._v("lng")]),e._v(" are required.\n💡 "),a("code",[e._v("lat")]),e._v(" and "),a("code",[e._v("lng")]),e._v(" must be of float value.\n💡 "),a("code",[e._v("lat")]),e._v(" and "),a("code",[e._v("lng")]),e._v(" field type can be mixed. e.g. "),a("code",[e._v("lat")]),e._v(" can be a string while "),a("code",[e._v("lng")]),e._v(" is a number in the same "),a("code",[e._v("_geo")]),e._v(" object.")])]),e._v(" "),a("h5",{attrs:{id:"csv-format"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#csv-format"}},[e._v("#")]),e._v(" "),a("strong",[e._v("CSV Format")])]),e._v(" "),a("p",[e._v("Following the format already defined in the https://github.com/meilisearch/specifications/pull/28/files specification for document indexing from a CSV format. A reserved column "),a("code",[e._v("_geo")]),e._v(" can be added to specify the geographical coordinates of a document.")]),e._v(" "),a("p",[e._v("csv format example")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('"id:number","label","brand","_geo"\n"1","F40","Ferrari","48.862725,2.287592"\n')])])]),a("p",[a("strong",[a("code",[e._v("_geo")]),e._v(" column definition")])]),e._v(" "),a("ul",[a("li",[e._v("Name: "),a("code",[e._v("_geo")])]),e._v(" "),a("li",[e._v("Type: String")]),e._v(" "),a("li",[e._v("Format: "),a("code",[e._v('"lat:float,lng:float"')])]),e._v(" "),a("li",[e._v("Not required")])]),e._v(" "),a("h4",{attrs:{id:"post-add-or-replace-documents-indexes-indexuid-documents"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#post-add-or-replace-documents-indexes-indexuid-documents"}},[e._v("#")]),e._v(" POST Add or replace documents "),a("code",[e._v("/indexes/{indexUid}/documents")])]),e._v(" "),a("h5",{attrs:{id:"request-body"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#request-body"}},[e._v("#")]),e._v(" Request body")]),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('"id"')]),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('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"F40"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"brand"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Ferrari"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"_geo"')]),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('"lat"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("48.862725")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"lng"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2.287592")]),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("h5",{attrs:{id:"_202-accepted-response-body"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_202-accepted-response-body"}},[e._v("#")]),e._v(" 202 Accepted - Response body")]),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('"updateId"')]),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("}")]),e._v("\n")])])]),a("h4",{attrs:{id:"put-add-or-replace-documents-indexes-indexuid-documents"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#put-add-or-replace-documents-indexes-indexuid-documents"}},[e._v("#")]),e._v(" PUT Add or replace documents "),a("code",[e._v("/indexes/{indexUid}/documents")])]),e._v(" "),a("h5",{attrs:{id:"request-body-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#request-body-2"}},[e._v("#")]),e._v(" Request body")]),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('"id"')]),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('"brand"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"F40 LM"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"brand"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Ferrari"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"_geo"')]),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('"lat"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"48.862725"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"lng"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2.287592"')]),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("h5",{attrs:{id:"_202-accepted-response-body-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_202-accepted-response-body-2"}},[e._v("#")]),e._v(" 202 Accepted - Response body")]),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('"updateId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("ul",[a("li",[e._v("🔴 Giving a bad formed "),a("code",[e._v("_geo")]),e._v(" that do not conform to the format causes the "),a("code",[e._v("task")]),e._v(" payload to fail and returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_document_geo_field"}},[e._v("invalid_document_geo_field")]),e._v(" error.")],1)]),e._v(" "),a("hr"),e._v(" "),a("h3",{attrs:{id:"as-an-end-user-i-want-to-filter-documents-within-a-geo-radius"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#as-an-end-user-i-want-to-filter-documents-within-a-geo-radius"}},[e._v("#")]),e._v(" "),a("strong",[e._v("As an end-user, I want to filter documents within a geo radius.")])]),e._v(" "),a("ul",[a("li",[e._v("Introduce a "),a("code",[e._v("_geoRadius({lat}, {lng}, {distance_in_meters})")]),e._v(" built-in filter rule to "),a("code",[e._v("filter")]),e._v(" documents in a geo radius.shape.")])]),e._v(" "),a("p",[a("strong",[a("code",[e._v("_geoRadius")]),e._v(" built-in filter rule definition")])]),e._v(" "),a("ul",[a("li",[e._v("Name: "),a("code",[e._v("_geoRadius")])]),e._v(" "),a("li",[e._v("Signature: ({lat:float}:required, {lng:float}:required, {distance_in_meters:int}:required)")]),e._v(" "),a("li",[e._v("Not required")]),e._v(" "),a("li",[a("code",[e._v("distance_in_meters")]),e._v(" only accepts positive value.")])]),e._v(" "),a("blockquote",[a("p",[e._v("The "),a("code",[e._v("_geo")]),e._v(" field has to be set in "),a("code",[e._v("filterableAttributes")]),e._v(" setting by the developer to activate geo filtering capabilities at search.")])]),e._v(" "),a("p",[a("strong",[a("code",[e._v("_geoBoundingBox")]),e._v(" built-in filter rule definition")])]),e._v(" "),a("ul",[a("li",[e._v("Name: "),a("code",[e._v("_geoBoundingBox")])]),e._v(" "),a("li",[e._v("Signature: ([{lat:float}:required, {lng:float}:required)], [{lat:float}:required, {lng:float}:required])")]),e._v(" "),a("li",[e._v("Not required")])]),e._v(" "),a("p",[e._v("The first pair of coordinates represents the top right corner of the bounding box, while the second pair represents the bottom left corner.")]),e._v(" "),a("blockquote",[a("p",[e._v("The "),a("code",[e._v("_geo")]),e._v(" field has to be set in "),a("code",[e._v("filterableAttributes")]),e._v(" setting by the developer to activate geo filtering capabilities at search.")])]),e._v(" "),a("h4",{attrs:{id:"get-search-indexes-indexuid-search"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-search-indexes-indexuid-search"}},[e._v("#")]),e._v(" GET Search "),a("code",[e._v("/indexes/{indexUid}/search")])]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('...&filter="brand=Mercedes AND _geoRadius(48.862725, 2.287592, 2000)"`\n')])])]),a("h4",{attrs:{id:"post-search-indexes-indexuid-search"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#post-search-indexes-indexuid-search"}},[e._v("#")]),e._v(" POST Search "),a("code",[e._v("/indexes/{indexUid}/search")])]),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('"filter"')]),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('"brand = Ferrari"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"_geoRadius(48.862725, 2.287592, 2000)"')]),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("ul",[a("li",[e._v("🔴 Specifying parameters that do not conform to the "),a("code",[e._v("_geoRadius")]),e._v(" or "),a("code",[e._v("_geoBoundingBox")]),e._v(" signature causes the API to return an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_parameter_filter"}},[e._v("invalid_search_parameter_filter")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Using "),a("code",[e._v("_geoDistance")]),e._v(", "),a("code",[e._v("_geo")]),e._v(" or "),a("code",[e._v("_geoPoint")]),e._v(" in a filter expression causes the API to return an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_parameter_filter"}},[e._v("invalid_search_parameter_filter")]),e._v(" error.")],1)]),e._v(" "),a("hr"),e._v(" "),a("h3",{attrs:{id:"as-an-end-user-i-want-to-sort-documents-around-a-geo-point"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#as-an-end-user-i-want-to-sort-documents-around-a-geo-point"}},[e._v("#")]),e._v(" "),a("strong",[e._v("As an end-user, I want to sort documents around a geo point.")])]),e._v(" "),a("ul",[a("li",[e._v("Introduce a "),a("code",[e._v("_geoPoint({lat}, {lng})")]),e._v(" function parameter to "),a("code",[e._v("sort")]),e._v(" documents around a central point.")])]),e._v(" "),a("p",[a("strong",[a("code",[e._v("_geoPoint")]),e._v(" built-in sort rule definition")])]),e._v(" "),a("ul",[a("li",[e._v("Name: "),a("code",[e._v("_geoPoint")])]),e._v(" "),a("li",[e._v("Signature: ({lat:float}:required, {lng:float}:required)")]),e._v(" "),a("li",[e._v("Not required")])]),e._v(" "),a("p",[e._v("Following the "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/55",target:"_blank",rel:"noopener noreferrer"}},[a("code",[e._v("sort")]),e._v(" specification feature"),a("OutboundLink")],1),e._v(":")]),e._v(" "),a("blockquote",[a("p",[e._v("The "),a("code",[e._v("_geo")]),e._v(" field has to be set in "),a("code",[e._v("sortableAttributes")]),e._v(" setting by the developer to activate geo sorting capabilities at search.")]),e._v(" "),a("p",[e._v("There is no "),a("code",[e._v("geo")]),e._v(" ranking rule as such. It is in fact within the "),a("code",[e._v("sort")]),e._v(" ranking rule in an obfuscated way.")]),e._v(" "),a("p",[a("code",[e._v("_geoPoint")]),e._v(" built-in sort rule can sort documents in ascending/descending order.")])]),e._v(" "),a("h4",{attrs:{id:"get-search-indexes-indexuid-search-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-search-indexes-indexuid-search-2"}},[e._v("#")]),e._v(" GET Search "),a("code",[e._v("/indexes/{indexUid}/search")])]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v(" ...&sort=_geoPoint({lat, lng}):asc,price:desc\n")])])]),a("h4",{attrs:{id:"post-search-indexes-indexuid-search-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#post-search-indexes-indexuid-search-2"}},[e._v("#")]),e._v(" POST Search "),a("code",[e._v("/indexes/{indexUid}/search")])]),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('"sort"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"_geoPoint({lat, lng}):asc,price:desc"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("ul",[a("li",[e._v("🔴 Specifying parameters that do not conform to the "),a("code",[e._v("_geoPoint")]),e._v(" signature causes the API to return an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_parameter_sort"}},[e._v("invalid_search_parameter_sort")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Using "),a("code",[e._v("_geoDistance")]),e._v(", "),a("code",[e._v("_geo")]),e._v(", "),a("code",[e._v("_geoRadius")]),e._v(" or "),a("code",[e._v("_geoBoundingBox")]),e._v(" in a sort expression causes the API to return an"),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_parameter_sort"}},[e._v("invalid_search_parameter_sort")]),e._v(" error.")],1)]),e._v(" "),a("hr"),e._v(" "),a("h3",{attrs:{id:"as-an-end-user-i-want-to-know-the-document-distance-when-i-am-sorting-around-a-geo-point"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#as-an-end-user-i-want-to-know-the-document-distance-when-i-am-sorting-around-a-geo-point"}},[e._v("#")]),e._v(" "),a("strong",[e._v("As an end-user, I want to know the document distance when I am sorting around a geo point.")])]),e._v(" "),a("ul",[a("li",[e._v("Introduce a "),a("code",[e._v("_geoDistance")]),e._v(" parameter to the search result "),a("code",[e._v("hit")]),e._v(" object.")])]),e._v(" "),a("p",[a("strong",[a("code",[e._v("_geoDistance")]),e._v(" field definition")])]),e._v(" "),a("ul",[a("li",[e._v("Name: "),a("code",[e._v("_geoDistance")])]),e._v(" "),a("li",[e._v("Description: Return document distance when the end-user sorts document from a "),a("code",[e._v("_geoPoint")]),e._v(" in meters.")]),e._v(" "),a("li",[e._v("Type: int")]),e._v(" "),a("li",[e._v("Not required")])]),e._v(" "),a("blockquote",[a("p",[e._v("💡 "),a("code",[e._v("_geoDistance")]),e._v(" response field is only computed and shown when the end-user have sorted documents around a "),a("code",[e._v("_geoPoint")]),e._v(". So if the end-user filters documents using a "),a("code",[e._v("_geoRadius/_geoBoundingBox")]),e._v(" built-in filter without sorting them around a "),a("code",[e._v("_geoPoint")]),e._v(", this field "),a("code",[e._v("_geoDistance")]),e._v(" will not appear in the search response.")])]),e._v(" "),a("hr"),e._v(" "),a("h4",{attrs:{id:"related-ranking-rules-settings-api-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#related-ranking-rules-settings-api-errors"}},[e._v("#")]),e._v(" Related Ranking Rules Settings API Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Specifying a custom ranking rule with "),a("code",[e._v("_geo")]),e._v(", "),a("code",[e._v("_geoDistance")]),e._v(", "),a("code",[e._v("_geoPoint")]),e._v(", "),a("code",[e._v("_geoRadius")]),e._v(" or "),a("code",[e._v("_geoBoundinBox")]),e._v(" returns an "),a("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(" "),a("hr"),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("h3",{attrs:{id:"i-measuring"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#i-measuring"}},[e._v("#")]),e._v(" I. Measuring")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("filterableAttribute")]),e._v(" setting definition to evaluate "),a("code",[e._v("_geo")]),e._v(" presence.")]),e._v(" "),a("li",[a("code",[e._v("sortableAttribute")]),e._v(" setting definition to evaluate "),a("code",[e._v("_geo")]),e._v(" presence.")])]),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("Add built-in filter to filter documents within "),a("code",[e._v("polygon")]),e._v(".")]),e._v(" "),a("li",[e._v("Handling array of geo points in the document object.")]),e._v(" "),a("li",[e._v("Handling distance in other formats (like the imperial format). "),a("strong",[e._v("It's easy to implement on the user side though.")])]),e._v(" "),a("li",[e._v("Handling position in other formats. It seems that "),a("a",{attrs:{href:"https://www.pacioos.hawaii.edu/voyager-news/lat-long-formats/",target:"_blank",rel:"noopener noreferrer"}},[e._v("degrees and minutes"),a("OutboundLink")],1),e._v(" are also used a lot. "),a("strong",[e._v("It's easy to implement on the user side though.")])])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[25],{449: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("ul",[a("li",[e._v("Title: Geosearch")]),e._v(" "),a("li",[e._v("Start Date: 2021-08-02")]),e._v(" "),a("li",[e._v("Specification PR: "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/59",target:"_blank",rel:"noopener noreferrer"}},[e._v("#59"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Discovery Issue: "),a("a",{attrs:{href:"https://github.com/meilisearch/product/issues/42",target:"_blank",rel:"noopener noreferrer"}},[e._v("#42"),a("OutboundLink")],1)])]),e._v(" "),a("h1",{attrs:{id:"geosearch"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#geosearch"}},[e._v("#")]),e._v(" Geosearch")]),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("The purpose of this specification is to add a first iteration of the "),a("strong",[e._v("geosearch")]),e._v(" feature to give geo-filtering and geosorting capabilities at search time.")]),e._v(" "),a("h4",{attrs:{id:"summary-key-points"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#summary-key-points"}},[e._v("#")]),e._v(" Summary Key points")]),e._v(" "),a("ul",[a("li",[e._v("Documents MUST have a "),a("code",[e._v("_geo")]),e._v(" reserved object to be geosearchable.")]),e._v(" "),a("li",[e._v("Filter documents by a given geo radius using the built-in filter "),a("code",[e._v("_geoRadius({lat}, {lng}, {distance_in_meters})")]),e._v(".")]),e._v(" "),a("li",[e._v("Filter documents by a given geo bounding box using the built-in filter "),a("code",[e._v("_geoBoundingBox([{lat}, {lng}], [{lat, lng}])")]),e._v(". The first pair of coordinates represents the top right corner of the bounding box, while the second pair represents the bottom left corner.")]),e._v(" "),a("li",[e._v("It is possible to cumulate several geosearch filters within the "),a("code",[e._v("filter")]),e._v(" field.")]),e._v(" "),a("li",[e._v("Sort documents in ascending/descending order around a geo point. e.g. "),a("code",[e._v("_geoPoint({lat}, {lng}):asc")]),e._v(".")]),e._v(" "),a("li",[e._v("It is possible to filter and/or sort by geographical criteria of the user's choice.")]),e._v(" "),a("li",[a("code",[e._v("_geo")]),e._v(" must be set as a filterable attribute to use geo filtering capabilities.")]),e._v(" "),a("li",[a("code",[e._v("_geo")]),e._v(" must be set as a sortable attribute to use geo sort capabilities.")]),e._v(" "),a("li",[e._v("There is no "),a("code",[e._v("geo")]),e._v(" ranking rule that can be manipulated by the user. This one is automatically integrated in the ranking rule "),a("code",[e._v("sort")]),e._v(" by default and activated by sorting using the "),a("code",[e._v("_geoPoint({lat}, {lng})")]),e._v(" built-in sort rule.")]),e._v(" "),a("li",[e._v("Using "),a("code",[e._v("_geoPoint({lat}, {lng})")]),e._v(" in the "),a("code",[e._v("sort")]),e._v(" parameter at search leads the engine to return a "),a("code",[e._v("_geoDistance")]),e._v(" within the search results. This field represents the distance in meters of the document from the specified "),a("code",[e._v("_geoPoint")]),e._v(".")])]),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("According to our user feedback, the lack of a geosearch feature is mentioned as one of the biggest deal-breakers for choosing MeiliSearch as a search engine. A search engine must offer this feature. Some use cases specifically require integrated geosearch capabilities. Moreover, a lot of direct competitors offer it. Users today must find workarounds like using geohash to be able to geosearch documents. We hope to better serve the needs of users by implementing this feature. It allows multiplying the use-cases to which MeiliSearch can respond.")]),e._v(" "),a("h3",{attrs:{id:"iii-technical-explanations"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#iii-technical-explanations"}},[e._v("#")]),e._v(" III. Technical Explanations")]),e._v(" "),a("h4",{attrs:{id:"as-a-developer-i-want-to-add-geospatial-coordinates-to-a-document-so-that-the-document-can-be-geosearchable"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#as-a-developer-i-want-to-add-geospatial-coordinates-to-a-document-so-that-the-document-can-be-geosearchable"}},[e._v("#")]),e._v(" "),a("strong",[e._v("As a developer, I want to add geospatial coordinates to a document so that the document can be geosearchable.")])]),e._v(" "),a("ul",[a("li",[e._v("Introduce a reserved field "),a("code",[e._v("_geo")]),e._v(" for documents to store geo spatial data from an "),a("strong",[e._v("object")]),e._v(" made of "),a("code",[e._v("lat")]),e._v(" and "),a("code",[e._v("lng")]),e._v(" fields for a "),a("strong",[e._v("JSON format")]),e._v(". If the "),a("code",[e._v("_geo")]),e._v(" field is set to "),a("code",[e._v("null")]),e._v(", my document won't be geosearchable.")]),e._v(" "),a("li",[e._v("Introduce a reserved column "),a("code",[e._v("_geo")]),e._v(" for documents to store geo spatial data from a "),a("strong",[e._v("string")]),e._v(" made of "),a("code",[e._v("lat,lng")]),e._v(" for a "),a("strong",[e._v("CSV format")]),e._v(".")])]),e._v(" "),a("h5",{attrs:{id:"json-format"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#json-format"}},[e._v("#")]),e._v(" "),a("strong",[e._v("JSON Format")])]),e._v(" "),a("p",[a("strong",[a("code",[e._v("_geo")]),e._v(" field definition")])]),e._v(" "),a("ul",[a("li",[e._v("Name: "),a("code",[e._v("_geo")])]),e._v(" "),a("li",[e._v("Type: Object")]),e._v(" "),a("li",[e._v("Format: "),a("code",[e._v("{lat:number|string, lng:number|string}")])]),e._v(" "),a("li",[e._v("Not required")])]),e._v(" "),a("blockquote",[a("p",[e._v("💡 if "),a("code",[e._v("_geo")]),e._v(" is found in the document payload, "),a("code",[e._v("lat")]),e._v(" and "),a("code",[e._v("lng")]),e._v(" are required.\n💡 "),a("code",[e._v("lat")]),e._v(" and "),a("code",[e._v("lng")]),e._v(" must be of float value.\n💡 "),a("code",[e._v("lat")]),e._v(" and "),a("code",[e._v("lng")]),e._v(" field type can be mixed. e.g. "),a("code",[e._v("lat")]),e._v(" can be a string while "),a("code",[e._v("lng")]),e._v(" is a number in the same "),a("code",[e._v("_geo")]),e._v(" object.")])]),e._v(" "),a("h5",{attrs:{id:"csv-format"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#csv-format"}},[e._v("#")]),e._v(" "),a("strong",[e._v("CSV Format")])]),e._v(" "),a("p",[e._v("Following the format already defined in the https://github.com/meilisearch/specifications/pull/28/files specification for document indexing from a CSV format. A reserved column "),a("code",[e._v("_geo")]),e._v(" can be added to specify the geographical coordinates of a document.")]),e._v(" "),a("p",[e._v("csv format example")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('"id:number","label","brand","_geo"\n"1","F40","Ferrari","48.862725,2.287592"\n')])])]),a("p",[a("strong",[a("code",[e._v("_geo")]),e._v(" column definition")])]),e._v(" "),a("ul",[a("li",[e._v("Name: "),a("code",[e._v("_geo")])]),e._v(" "),a("li",[e._v("Type: String")]),e._v(" "),a("li",[e._v("Format: "),a("code",[e._v('"lat:float,lng:float"')])]),e._v(" "),a("li",[e._v("Not required")])]),e._v(" "),a("h4",{attrs:{id:"post-add-or-replace-documents-indexes-indexuid-documents"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#post-add-or-replace-documents-indexes-indexuid-documents"}},[e._v("#")]),e._v(" POST Add or replace documents "),a("code",[e._v("/indexes/{indexUid}/documents")])]),e._v(" "),a("h5",{attrs:{id:"request-body"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#request-body"}},[e._v("#")]),e._v(" Request body")]),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('"id"')]),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('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"F40"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"brand"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Ferrari"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"_geo"')]),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('"lat"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("48.862725")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"lng"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2.287592")]),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("h5",{attrs:{id:"_202-accepted-response-body"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_202-accepted-response-body"}},[e._v("#")]),e._v(" 202 Accepted - Response body")]),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('"updateId"')]),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("}")]),e._v("\n")])])]),a("h4",{attrs:{id:"put-add-or-replace-documents-indexes-indexuid-documents"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#put-add-or-replace-documents-indexes-indexuid-documents"}},[e._v("#")]),e._v(" PUT Add or replace documents "),a("code",[e._v("/indexes/{indexUid}/documents")])]),e._v(" "),a("h5",{attrs:{id:"request-body-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#request-body-2"}},[e._v("#")]),e._v(" Request body")]),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('"id"')]),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('"brand"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"F40 LM"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"brand"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Ferrari"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"_geo"')]),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('"lat"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"48.862725"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"lng"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2.287592"')]),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("h5",{attrs:{id:"_202-accepted-response-body-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_202-accepted-response-body-2"}},[e._v("#")]),e._v(" 202 Accepted - Response body")]),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('"updateId"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("ul",[a("li",[e._v("🔴 Giving a bad formed "),a("code",[e._v("_geo")]),e._v(" that do not conform to the format causes the "),a("code",[e._v("task")]),e._v(" payload to fail and returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_document_geo_field"}},[e._v("invalid_document_geo_field")]),e._v(" error.")],1)]),e._v(" "),a("hr"),e._v(" "),a("h3",{attrs:{id:"as-an-end-user-i-want-to-filter-documents-within-a-geo-radius"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#as-an-end-user-i-want-to-filter-documents-within-a-geo-radius"}},[e._v("#")]),e._v(" "),a("strong",[e._v("As an end-user, I want to filter documents within a geo radius.")])]),e._v(" "),a("ul",[a("li",[e._v("Introduce a "),a("code",[e._v("_geoRadius({lat}, {lng}, {distance_in_meters})")]),e._v(" built-in filter rule to "),a("code",[e._v("filter")]),e._v(" documents in a geo radius.shape.")])]),e._v(" "),a("p",[a("strong",[a("code",[e._v("_geoRadius")]),e._v(" built-in filter rule definition")])]),e._v(" "),a("ul",[a("li",[e._v("Name: "),a("code",[e._v("_geoRadius")])]),e._v(" "),a("li",[e._v("Signature: ({lat:float}:required, {lng:float}:required, {distance_in_meters:int}:required)")]),e._v(" "),a("li",[e._v("Not required")]),e._v(" "),a("li",[a("code",[e._v("distance_in_meters")]),e._v(" only accepts positive value.")])]),e._v(" "),a("blockquote",[a("p",[e._v("The "),a("code",[e._v("_geo")]),e._v(" field has to be set in "),a("code",[e._v("filterableAttributes")]),e._v(" setting by the developer to activate geo filtering capabilities at search.")])]),e._v(" "),a("p",[a("strong",[a("code",[e._v("_geoBoundingBox")]),e._v(" built-in filter rule definition")])]),e._v(" "),a("ul",[a("li",[e._v("Name: "),a("code",[e._v("_geoBoundingBox")])]),e._v(" "),a("li",[e._v("Signature: ([{lat:float}:required, {lng:float}:required)], [{lat:float}:required, {lng:float}:required])")]),e._v(" "),a("li",[e._v("Not required")])]),e._v(" "),a("p",[e._v("The first pair of coordinates represents the top right corner of the bounding box, while the second pair represents the bottom left corner.")]),e._v(" "),a("blockquote",[a("p",[e._v("The "),a("code",[e._v("_geo")]),e._v(" field has to be set in "),a("code",[e._v("filterableAttributes")]),e._v(" setting by the developer to activate geo filtering capabilities at search.")])]),e._v(" "),a("h4",{attrs:{id:"get-search-indexes-indexuid-search"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-search-indexes-indexuid-search"}},[e._v("#")]),e._v(" GET Search "),a("code",[e._v("/indexes/{indexUid}/search")])]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('...&filter="brand=Mercedes AND _geoRadius(48.862725, 2.287592, 2000)"`\n')])])]),a("h4",{attrs:{id:"post-search-indexes-indexuid-search"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#post-search-indexes-indexuid-search"}},[e._v("#")]),e._v(" POST Search "),a("code",[e._v("/indexes/{indexUid}/search")])]),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('"filter"')]),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('"brand = Ferrari"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"_geoRadius(48.862725, 2.287592, 2000)"')]),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("ul",[a("li",[e._v("🔴 Specifying parameters that do not conform to the "),a("code",[e._v("_geoRadius")]),e._v(" or "),a("code",[e._v("_geoBoundingBox")]),e._v(" signature causes the API to return an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_parameter_filter"}},[e._v("invalid_search_parameter_filter")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Using "),a("code",[e._v("_geoDistance")]),e._v(", "),a("code",[e._v("_geo")]),e._v(" or "),a("code",[e._v("_geoPoint")]),e._v(" in a filter expression causes the API to return an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_parameter_filter"}},[e._v("invalid_search_parameter_filter")]),e._v(" error.")],1)]),e._v(" "),a("hr"),e._v(" "),a("h3",{attrs:{id:"as-an-end-user-i-want-to-sort-documents-around-a-geo-point"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#as-an-end-user-i-want-to-sort-documents-around-a-geo-point"}},[e._v("#")]),e._v(" "),a("strong",[e._v("As an end-user, I want to sort documents around a geo point.")])]),e._v(" "),a("ul",[a("li",[e._v("Introduce a "),a("code",[e._v("_geoPoint({lat}, {lng})")]),e._v(" function parameter to "),a("code",[e._v("sort")]),e._v(" documents around a central point.")])]),e._v(" "),a("p",[a("strong",[a("code",[e._v("_geoPoint")]),e._v(" built-in sort rule definition")])]),e._v(" "),a("ul",[a("li",[e._v("Name: "),a("code",[e._v("_geoPoint")])]),e._v(" "),a("li",[e._v("Signature: ({lat:float}:required, {lng:float}:required)")]),e._v(" "),a("li",[e._v("Not required")])]),e._v(" "),a("p",[e._v("Following the "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/55",target:"_blank",rel:"noopener noreferrer"}},[a("code",[e._v("sort")]),e._v(" specification feature"),a("OutboundLink")],1),e._v(":")]),e._v(" "),a("blockquote",[a("p",[e._v("The "),a("code",[e._v("_geo")]),e._v(" field has to be set in "),a("code",[e._v("sortableAttributes")]),e._v(" setting by the developer to activate geo sorting capabilities at search.")]),e._v(" "),a("p",[e._v("There is no "),a("code",[e._v("geo")]),e._v(" ranking rule as such. It is in fact within the "),a("code",[e._v("sort")]),e._v(" ranking rule in an obfuscated way.")]),e._v(" "),a("p",[a("code",[e._v("_geoPoint")]),e._v(" built-in sort rule can sort documents in ascending/descending order.")])]),e._v(" "),a("h4",{attrs:{id:"get-search-indexes-indexuid-search-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-search-indexes-indexuid-search-2"}},[e._v("#")]),e._v(" GET Search "),a("code",[e._v("/indexes/{indexUid}/search")])]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v(" ...&sort=_geoPoint({lat, lng}):asc,price:desc\n")])])]),a("h4",{attrs:{id:"post-search-indexes-indexuid-search-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#post-search-indexes-indexuid-search-2"}},[e._v("#")]),e._v(" POST Search "),a("code",[e._v("/indexes/{indexUid}/search")])]),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('"sort"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"_geoPoint({lat, lng}):asc,price:desc"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("ul",[a("li",[e._v("🔴 Specifying parameters that do not conform to the "),a("code",[e._v("_geoPoint")]),e._v(" signature causes the API to return an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_parameter_sort"}},[e._v("invalid_search_parameter_sort")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Using "),a("code",[e._v("_geoDistance")]),e._v(", "),a("code",[e._v("_geo")]),e._v(", "),a("code",[e._v("_geoRadius")]),e._v(" or "),a("code",[e._v("_geoBoundingBox")]),e._v(" in a sort expression causes the API to return an"),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_parameter_sort"}},[e._v("invalid_search_parameter_sort")]),e._v(" error.")],1)]),e._v(" "),a("hr"),e._v(" "),a("h3",{attrs:{id:"as-an-end-user-i-want-to-know-the-document-distance-when-i-am-sorting-around-a-geo-point"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#as-an-end-user-i-want-to-know-the-document-distance-when-i-am-sorting-around-a-geo-point"}},[e._v("#")]),e._v(" "),a("strong",[e._v("As an end-user, I want to know the document distance when I am sorting around a geo point.")])]),e._v(" "),a("ul",[a("li",[e._v("Introduce a "),a("code",[e._v("_geoDistance")]),e._v(" parameter to the search result "),a("code",[e._v("hit")]),e._v(" object.")])]),e._v(" "),a("p",[a("strong",[a("code",[e._v("_geoDistance")]),e._v(" field definition")])]),e._v(" "),a("ul",[a("li",[e._v("Name: "),a("code",[e._v("_geoDistance")])]),e._v(" "),a("li",[e._v("Description: Return document distance when the end-user sorts document from a "),a("code",[e._v("_geoPoint")]),e._v(" in meters.")]),e._v(" "),a("li",[e._v("Type: int")]),e._v(" "),a("li",[e._v("Not required")])]),e._v(" "),a("blockquote",[a("p",[e._v("💡 "),a("code",[e._v("_geoDistance")]),e._v(" response field is only computed and shown when the end-user have sorted documents around a "),a("code",[e._v("_geoPoint")]),e._v(". So if the end-user filters documents using a "),a("code",[e._v("_geoRadius/_geoBoundingBox")]),e._v(" built-in filter without sorting them around a "),a("code",[e._v("_geoPoint")]),e._v(", this field "),a("code",[e._v("_geoDistance")]),e._v(" will not appear in the search response.")])]),e._v(" "),a("hr"),e._v(" "),a("h4",{attrs:{id:"related-ranking-rules-settings-api-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#related-ranking-rules-settings-api-errors"}},[e._v("#")]),e._v(" Related Ranking Rules Settings API Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Specifying a custom ranking rule with "),a("code",[e._v("_geo")]),e._v(", "),a("code",[e._v("_geoDistance")]),e._v(", "),a("code",[e._v("_geoPoint")]),e._v(", "),a("code",[e._v("_geoRadius")]),e._v(" or "),a("code",[e._v("_geoBoundinBox")]),e._v(" returns an "),a("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(" "),a("hr"),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("h3",{attrs:{id:"i-measuring"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#i-measuring"}},[e._v("#")]),e._v(" I. Measuring")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("filterableAttribute")]),e._v(" setting definition to evaluate "),a("code",[e._v("_geo")]),e._v(" presence.")]),e._v(" "),a("li",[a("code",[e._v("sortableAttribute")]),e._v(" setting definition to evaluate "),a("code",[e._v("_geo")]),e._v(" presence.")])]),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("Add built-in filter to filter documents within "),a("code",[e._v("polygon")]),e._v(".")]),e._v(" "),a("li",[e._v("Handling array of geo points in the document object.")]),e._v(" "),a("li",[e._v("Handling distance in other formats (like the imperial format). "),a("strong",[e._v("It's easy to implement on the user side though.")])]),e._v(" "),a("li",[e._v("Handling position in other formats. It seems that "),a("a",{attrs:{href:"https://www.pacioos.hawaii.edu/voyager-news/lat-long-formats/",target:"_blank",rel:"noopener noreferrer"}},[e._v("degrees and minutes"),a("OutboundLink")],1),e._v(" are also used a lot. "),a("strong",[e._v("It's easy to implement on the user side though.")])])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/26.a92885cc.js b/docs/assets/js/26.719ff326.js similarity index 99% rename from docs/assets/js/26.a92885cc.js rename to docs/assets/js/26.719ff326.js index 794230390..729914f27 100644 --- a/docs/assets/js/26.a92885cc.js +++ b/docs/assets/js/26.719ff326.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[26],{451: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],{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 diff --git a/docs/assets/js/27.5f394637.js b/docs/assets/js/27.178e5c36.js similarity index 99% rename from docs/assets/js/27.5f394637.js rename to docs/assets/js/27.178e5c36.js index 5bc5fec5f..43229726b 100644 --- a/docs/assets/js/27.5f394637.js +++ b/docs/assets/js/27.178e5c36.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[27],{453: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],{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 diff --git a/docs/assets/js/28.5aa94f65.js b/docs/assets/js/28.41999e7c.js similarity index 98% rename from docs/assets/js/28.5aa94f65.js rename to docs/assets/js/28.41999e7c.js index a6fe77fd8..f0113a28c 100644 --- a/docs/assets/js/28.5aa94f65.js +++ b/docs/assets/js/28.41999e7c.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{449: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],{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 diff --git a/docs/assets/js/32.88319e61.js b/docs/assets/js/32.bac37d5d.js similarity index 99% rename from docs/assets/js/32.88319e61.js rename to docs/assets/js/32.bac37d5d.js index 9c2e4305b..97ad514fd 100644 --- a/docs/assets/js/32.88319e61.js +++ b/docs/assets/js/32.bac37d5d.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],{457: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/35.1fba5166.js b/docs/assets/js/35.6f79f9fa.js similarity index 99% rename from docs/assets/js/35.1fba5166.js rename to docs/assets/js/35.6f79f9fa.js index 703d8ea9b..1e586d4ff 100644 --- a/docs/assets/js/35.1fba5166.js +++ b/docs/assets/js/35.6f79f9fa.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[35],{460: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/36.15b16bf9.js b/docs/assets/js/36.db871ac4.js similarity index 99% rename from docs/assets/js/36.15b16bf9.js rename to docs/assets/js/36.db871ac4.js index 4ca761670..575ff8c49 100644 --- a/docs/assets/js/36.15b16bf9.js +++ b/docs/assets/js/36.db871ac4.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[36],{461: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("h1",{attrs:{id:"data-types"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#data-types"}},[t._v("#")]),t._v(" Data Types")]),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("This specification describes the different data types supported for the fields in a document and how Meilisearch handles them.")]),t._v(" "),a("h2",{attrs:{id:"_2-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-functional-specification"}},[t._v("#")]),t._v(" 2. Functional Specification")]),t._v(" "),a("p",[t._v("No matter the type, the value of a field is unchanged in the returned documents upon search.")]),t._v(" "),a("p",[t._v("For example, if you have a complex document structure with nested objects, the document is returned with the same complexity upon search.")]),t._v(" "),a("p",[t._v("However, based on their type, the fields are handled and used in different ways by Meilisearch.")]),t._v(" "),a("h3",{attrs:{id:"_2-1-supported-types"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-supported-types"}},[t._v("#")]),t._v(" 2.1. Supported types")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"#211-string"}},[t._v("String")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#212-numeric"}},[t._v("Numeric")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#213-boolean"}},[t._v("Boolean")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#214-array"}},[t._v("Array")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#215-object"}},[t._v("Object")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#216-null"}},[t._v("null")])])]),t._v(" "),a("h4",{attrs:{id:"_2-1-1-string"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-1-string"}},[t._v("#")]),t._v(" 2.1.1. String")]),t._v(" "),a("p",[a("code",[t._v("string")]),t._v(" is the primary type for indexing data in Meilisearch.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#31-string-tokenization"}},[t._v("3.1. String Tokenization section")]),t._v(".")])]),t._v(" "),a("h4",{attrs:{id:"_2-1-2-numeric"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-2-numeric"}},[t._v("#")]),t._v(" 2.1.2. Numeric")]),t._v(" "),a("p",[t._v("The engine internally converts a "),a("code",[t._v("numeric")]),t._v(" typed value ("),a("code",[t._v("integer")]),t._v("/"),a("code",[t._v("float")]),t._v(") to a human-readable decimal number string representation to make them searchable.")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v(">")]),t._v(", "),a("code",[t._v(">=")]),t._v(", "),a("code",[t._v("<")]),t._v(", and "),a("code",[t._v("<=")]),t._v(" "),a("code",[t._v("filter")]),t._v(" operators apply only to numerical values.")]),t._v(" "),a("h4",{attrs:{id:"_2-1-3-boolean"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-3-boolean"}},[t._v("#")]),t._v(" 2.1.3. Boolean")]),t._v(" "),a("p",[t._v("The engine internally converts a "),a("code",[t._v("boolean")]),t._v(" typed value ("),a("code",[t._v("true")]),t._v("/"),a("code",[t._v("false")]),t._v(") to a lowercase human-readable text to make it searchable.")]),t._v(" "),a("h4",{attrs:{id:"_2-1-4-array"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-4-array"}},[t._v("#")]),t._v(" 2.1.4. Array")]),t._v(" "),a("p",[t._v("An array is recursively broken into separate string tokens, which means separate words.")]),t._v(" "),a("p",[t._v("After the tokenizing process, each word is indexed and stored in the global dictionary of the corresponding index.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#32-array-tokenization"}},[t._v("3.2. Array Tokenization section")]),t._v(".")])]),t._v(" "),a("p",[t._v("Meilisearch accepts complex data structures, no matter the deepness level.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#34-nested-structures"}},[t._v("3.4. Nested structures section")]),t._v(".")])]),t._v(" "),a("h4",{attrs:{id:"_2-1-5-object"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-5-object"}},[t._v("#")]),t._v(" 2.1.5. Object")]),t._v(" "),a("p",[t._v("The engine flattens JSON objects at the root level of a document.")]),t._v(" "),a("p",[t._v("After the tokenizing process, each word is indexed and stored in the global dictionary of the corresponding index.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#33-object"}},[t._v("3.3. Object section")]),t._v(".")])]),t._v(" "),a("p",[t._v("Meilisearch accepts complex data structures, no matter the deepness level.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#34-nested-structures"}},[t._v("3.4. Nested structures section")]),t._v(".")])]),t._v(" "),a("h4",{attrs:{id:"_2-1-6-null"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-6-null"}},[t._v("#")]),t._v(" 2.1.6. "),a("code",[t._v("null")])]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("null")]),t._v(" type is not taken into account at indexing.")]),t._v(" "),a("h2",{attrs:{id:"_3-technical-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-technical-details"}},[t._v("#")]),t._v(" 3. Technical Details")]),t._v(" "),a("h3",{attrs:{id:"_3-1-string-tokenization"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-string-tokenization"}},[t._v("#")]),t._v(" 3.1. String Tokenization")]),t._v(" "),a("p",[t._v("String tokenization is the process of splitting a string into a list of individual terms that are called tokens.")]),t._v(" "),a("p",[t._v("A string is passed to a tokenizer and is then broken into separate string tokens. A token is a word.")]),t._v(" "),a("p",[t._v("For Latin-based languages, the words are separated by space.\nFor Kanji characters, the words are separated by character.")]),t._v(" "),a("p",[t._v("For Latin-based languages, there are two kinds of space separators:")]),t._v(" "),a("ul",[a("li",[a("strong",[t._v("Soft spaces (distance: 1)")]),t._v(": whitespaces, quotes, "),a("code",[t._v("-")]),t._v(" | "),a("code",[t._v("_")]),t._v(" | "),a("code",[t._v("\\")]),t._v(" | "),a("code",[t._v(":")]),t._v(" | "),a("code",[t._v("/")]),t._v(" | "),a("code",[t._v("\\\\")]),t._v(" | "),a("code",[t._v("@")]),t._v(" | "),a("code",[t._v('"')]),t._v(" | "),a("code",[t._v("+")]),t._v(" | "),a("code",[t._v("~")]),t._v(" | "),a("code",[t._v("=")]),t._v(" | "),a("code",[t._v("^")]),t._v(" | "),a("code",[t._v("*")]),t._v(" | "),a("code",[t._v("#")])]),t._v(" "),a("li",[a("strong",[t._v("Hard spaces (distance: 8)")]),t._v(": "),a("code",[t._v(".")]),t._v(" | "),a("code",[t._v(";")]),t._v(" | "),a("code",[t._v(",")]),t._v(" | "),a("code",[t._v("!")]),t._v(" | "),a("code",[t._v("?")]),t._v(" | "),a("code",[t._v("(")]),t._v(" | "),a("code",[t._v(")")]),t._v(" | "),a("code",[t._v("[")]),t._v(" | "),a("code",[t._v("]")]),t._v(" | "),a("code",[t._v("{")]),t._v(" | "),a("code",[t._v("}")]),t._v("| "),a("code",[t._v("|")])])]),t._v(" "),a("p",[t._v("Distance plays an essential role in determining whether documents are relevant. The "),a("code",[t._v("proximity")]),t._v(" ranking rule sorts the results by increasing distance between matched query terms. Two words separated by a soft space are closer and thus considered more relevant than two words separated by a hard space.")]),t._v(" "),a("p",[t._v("After the tokenizing process, each word is indexed and stored in the global dictionary of the corresponding index.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-1-examples"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-examples"}},[t._v("#")]),t._v(" 3.1.1. Examples")]),t._v(" "),a("p",[t._v("To demonstrate how a string is split by space, let's say you have the following string as an input:")]),t._v(" "),a("p",[a("code",[t._v('"Bruce Willis,Vin Diesel"')])]),t._v(" "),a("p",[t._v("In the example above, the distance between "),a("code",[t._v("Bruce")]),t._v(" and "),a("code",[t._v("Willis")]),t._v(" is equal to "),a("code",[t._v("1")]),t._v(". The distance between "),a("code",[t._v("Vin")]),t._v(" and "),a("code",[t._v("Diesel")]),t._v(" is equal to "),a("code",[t._v("1")]),t._v(" too.\nBut, the distance between "),a("code",[t._v("Bruce")]),t._v(" and "),a("code",[t._v("Vin")]),t._v(" is equal to "),a("code",[t._v("8")]),t._v(". The same goes for "),a("code",[t._v("Bruce")]),t._v(" and "),a("code",[t._v("Diesel")]),t._v(", or "),a("code",[t._v("Willis")]),t._v(" and "),a("code",[t._v("Vin")]),t._v(", or also "),a("code",[t._v("Willis")]),t._v(" and "),a("code",[t._v("Diesel")]),t._v(".")]),t._v(" "),a("p",[t._v("Let's see another example. Given two 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('"movie_id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"001"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Bruce.Willis"')]),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('"movie_id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"002"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Bruce super Willis"')]),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("When making a query on "),a("code",[t._v("Bruce Willis")]),t._v(", "),a("code",[t._v("002")]),t._v(" will be the first document returned and "),a("code",[t._v("001")]),t._v(" will be the second one.\nThis will happen because the proximity distance between "),a("code",[t._v("Bruce")]),t._v(" and "),a("code",[t._v("Willis")]),t._v(" is equal to "),a("code",[t._v("2")]),t._v(" in the document "),a("code",[t._v("002")]),t._v(" whereas the distance between "),a("code",[t._v("Bruce")]),t._v(" and "),a("code",[t._v("Willis")]),t._v(" is equal to "),a("code",[t._v("8")]),t._v(" in the document "),a("code",[t._v("001")]),t._v(" since the full stop is a hard space.")]),t._v(" "),a("h3",{attrs:{id:"_3-2-array-tokenization"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-array-tokenization"}},[t._v("#")]),t._v(" 3.2. Array Tokenization")]),t._v(" "),a("p",[t._v("An array is recursively broken into separate string tokens, which means separate words. After the tokenizing process, each word is indexed and stored in the global dictionary of the corresponding index.")]),t._v(" "),a("h4",{attrs:{id:"_3-2-1-examples"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-examples"}},[t._v("#")]),t._v(" 3.2.1. Examples")]),t._v(" "),a("p",[t._v("The following input:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"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 string"}},[t._v('"Bruce Willis"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Vin Diesel"')]),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 string"}},[t._v('"Kung Fu Panda"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Will be processed as if all elements were arranged at the same level:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Bruce Willis. Vin Diesel. Kung Fu Panda."')]),t._v("\n")])])]),a("p",[t._v("The strings above will be separated by soft and hard spaces exactly as explained in the string example.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#311-examples"}},[t._v("3.1.1. Examples section")]),t._v(".")])]),t._v(" "),a("h3",{attrs:{id:"_3-3-nested-structures"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-nested-structures"}},[t._v("#")]),t._v(" 3.3. Nested Structures")]),t._v(" "),a("p",[t._v("Nested structures (e.g. "),a("code",[t._v("Object")]),t._v(", "),a("code",[t._v("Array of Objects")]),t._v(", etc) are internally flattened to a document's root level.")]),t._v(" "),a("p",[t._v("It allows expressing a nested field in all Meilisearch parameters that accept document attributes.")]),t._v(" "),a("p",[t._v("Meilisearch accepts the "),a("code",[t._v(".")]),t._v(" (dot-notation) to express a nested field location in a document structure.")]),t._v(" "),a("p",[t._v("Meilisearch is limited to 127 levels of depth.")]),t._v(" "),a("h4",{attrs:{id:"_3-3-1-examples"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-examples"}},[t._v("#")]),t._v(" 3.3.1. Examples")]),t._v(" "),a("h5",{attrs:{id:"_3-3-1-1-object"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-object"}},[t._v("#")]),t._v(" 3.3.1.1. Object")]),t._v(" "),a("p",[t._v("The following JSON document:")]),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 punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"a"')]),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('"b"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"c"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"d"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"e"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"f"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"g"')]),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("Flattens 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('"a.b"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"c"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"a.d"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"e"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"a.f"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"g"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h5",{attrs:{id:"_3-3-1-2-array-of-objects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-2-array-of-objects"}},[t._v("#")]),t._v(" 3.3.1.2. Array of objects")]),t._v(" "),a("p",[t._v("The following JSON document:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"a"')]),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(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"b"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"c"')]),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("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"b"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"d"')]),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("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"b"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"e"')]),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("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Flattens 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('"a.b"')]),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('"c"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"d"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"e"')]),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("h5",{attrs:{id:"_3-3-1-3-array-of-objects-mixed-with-scalar-value"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-3-array-of-objects-mixed-with-scalar-value"}},[t._v("#")]),t._v(" 3.3.1.3. Array of objects mixed with scalar value")]),t._v(" "),a("p",[t._v("The following JSON document:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"a"')]),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 number"}},[t._v("42")]),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 property"}},[t._v('"b"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"c"')]),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("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"b"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"d"')]),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("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"b"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"e"')]),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("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Flattens 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('"a"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("42")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"a.b"')]),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('"c"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"d"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"e"')]),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("h5",{attrs:{id:"_3-3-1-4-array-of-objects-of-array-of-objects-of"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-4-array-of-objects-of-array-of-objects-of"}},[t._v("#")]),t._v(" 3.3.1.4. Array of objects of array of objects of ...")]),t._v(" "),a("p",[t._v("The following JSON document:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"a"')]),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 string"}},[t._v('"b"')]),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 string"}},[t._v('"c"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"d"')]),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('"e"')]),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 string"}},[t._v('"f"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"g"')]),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 punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"h"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"i"')]),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('"e"')]),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 string"}},[t._v('"j"')]),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('"z"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"y"')]),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 "),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 string"}},[t._v('"l"')]),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 string"}},[t._v('"m"')]),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("Flattens 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('"a"')]),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('"b"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"c"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"d"')]),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(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m"')]),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('"a.e"')]),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('"f"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"g"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"j"')]),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('"a.h"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"i"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"a.e.z"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"y"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h5",{attrs:{id:"_3-3-1-5-collision-between-a-representation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-5-collision-between-a-representation"}},[t._v("#")]),t._v(" 3.3.1.5. Collision between a representation")]),t._v(" "),a("p",[t._v("The following JSON document:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"a"')]),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('"b"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"c"')]),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 property"}},[t._v('"a.b"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"d"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Flattens 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('"a.b"')]),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('"c"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"d"')]),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("h5",{attrs:{id:"_3-3-1-6-searchableattributes-default-value-case"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-6-searchableattributes-default-value-case"}},[t._v("#")]),t._v(" 3.3.1.6. searchableAttributes default value case")]),t._v(" "),a("p",[t._v("By default, "),a("code",[t._v("searchableAttributes")]),t._v(" is set to "),a("code",[t._v("[*]")]),t._v(", making all document fields searchable.")]),t._v(" "),a("p",[t._v("In that case, "),a("code",[t._v("Attribute")]),t._v(" ranking rule consider a field higher in the internal representation more important than a lower one.")]),t._v(" "),a("p",[t._v("User document field order can be lost if the engine flattens identical field values are not co-located in a document payload.")]),t._v(" "),a("p",[t._v("The following JSON document:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"a.b"')]),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('"price"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2.0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"a"')]),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('"b"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Nice T-shirt"')]),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("Is internally represented")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"a.b"')]),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('"T-shirt"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Nice T-shirt"')]),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('"price"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2.0")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("The second representation of "),a("code",[t._v("a.b")]),t._v(" in its nested form is merged with the first representation of "),a("code",[t._v("a.b")]),t._v(".")]),t._v(" "),a("p",[t._v("Users can't and should not rely on a given document field order when "),a("code",[t._v("searchableAttributes")]),t._v(" is "),a("code",[t._v("[*]")]),t._v(".")]),t._v(" "),a("h5",{attrs:{id:"_3-3-1-7-dot-notation-expression"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-7-dot-notation-expression"}},[t._v("#")]),t._v(" 3.3.1.7. Dot-notation Expression")]),t._v(" "),a("p",[t._v("Permits to express the nested object property.")]),t._v(" "),a("h6",{attrs:{id:"_3-3-1-7-1-example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-7-1-example"}},[t._v("#")]),t._v(" 3.3.1.7.1. Example")]),t._v(" "),a("p",[t._v("Given this document structure")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("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(":")]),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('"person"')]),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('"firstname"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"John"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"lastname"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Doe"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),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('"country"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"US"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"city"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"New York"')]),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("A precise field can be expressed using the dot-notation")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[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('"person.firstname"')]),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("h5",{attrs:{id:"_3-3-1-8-all-object-properties-expression"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-8-all-object-properties-expression"}},[t._v("#")]),t._v(" 3.3.1.8. All Object Properties Expression")]),t._v(" "),a("p",[t._v("It is possible to express the definition of all properties of an object.")]),t._v(" "),a("p",[t._v("e.g. In this case "),a("code",[t._v("person")]),t._v(" is an object containing properties. "),a("code",[t._v('attributesToRetrieve: ["person"]')])]),t._v(" "),a("p",[t._v("This notation is accepted on all parameters or settings allowing to specify attributes. This is due to the fact that several documents may not share the same schema. See "),a("a",{attrs:{href:"#34182-edge-case"}},[t._v("3.4.1.8.2. Edge Case")]),t._v(" section.")]),t._v(" "),a("h6",{attrs:{id:"_3-3-1-8-1-example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-8-1-example"}},[t._v("#")]),t._v(" 3.3.1.8.1. Example")]),t._v(" "),a("p",[t._v("Given this document structure")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("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(":")]),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('"person"')]),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('"firstname"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"John"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"lastname"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Doe"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),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('"country"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"US"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"city"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"New York"')]),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("All properties of a document nested object can be expressed this way")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[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('"person"')]),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("It's 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('"attributesToHighlight"')]),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 string"}},[t._v('"person"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"person.firstname"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"person.lastname"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"person.address"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"person.address.country"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"person.address.city"')]),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("h6",{attrs:{id:"_3-3-1-8-2-edge-case"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-8-2-edge-case"}},[t._v("#")]),t._v(" 3.3.1.8.2. Edge Case")]),t._v(" "),a("p",[t._v("One document might have a non-nested field "),a("code",[t._v("person")]),t._v(" while another has a "),a("code",[t._v("person")]),t._v(" object containing properties.")]),t._v(" "),a("p",[t._v("The chosen behavior is not to force the user's hand and Meilisearch do not throw any errors.")]),t._v(" "),a("p",[t._v("E.g. If a user specifies "),a("code",[t._v('"filter": "person = \'Guillaume\'"')]),t._v(" at search time, the document that would have a nested object person would not be brought up by the filter.")]),t._v(" "),a("h2",{attrs:{id:"_4-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-future-possibilities"}},[t._v("#")]),t._v(" 4. Future Possibilities")]),t._v(" "),a("ul",[a("li",[t._v("Change the default behavior of "),a("code",[t._v("searchableAttributes")]),t._v(" so that it is predictable. We may remove the priority based on a field position in a document.")]),t._v(" "),a("li",[t._v("Support the wildcard notation with the dot-notation. e.g. "),a("code",[t._v("person.*")]),t._v(", "),a("code",[t._v("person.address.*")]),t._v(" or "),a("code",[t._v("person.l*")])]),t._v(" "),a("li",[t._v("Support the array notation. e.g. "),a("code",[t._v("person.addresses[1]")])])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[36],{460: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("h1",{attrs:{id:"data-types"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#data-types"}},[t._v("#")]),t._v(" Data Types")]),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("This specification describes the different data types supported for the fields in a document and how Meilisearch handles them.")]),t._v(" "),a("h2",{attrs:{id:"_2-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-functional-specification"}},[t._v("#")]),t._v(" 2. Functional Specification")]),t._v(" "),a("p",[t._v("No matter the type, the value of a field is unchanged in the returned documents upon search.")]),t._v(" "),a("p",[t._v("For example, if you have a complex document structure with nested objects, the document is returned with the same complexity upon search.")]),t._v(" "),a("p",[t._v("However, based on their type, the fields are handled and used in different ways by Meilisearch.")]),t._v(" "),a("h3",{attrs:{id:"_2-1-supported-types"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-supported-types"}},[t._v("#")]),t._v(" 2.1. Supported types")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"#211-string"}},[t._v("String")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#212-numeric"}},[t._v("Numeric")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#213-boolean"}},[t._v("Boolean")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#214-array"}},[t._v("Array")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#215-object"}},[t._v("Object")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#216-null"}},[t._v("null")])])]),t._v(" "),a("h4",{attrs:{id:"_2-1-1-string"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-1-string"}},[t._v("#")]),t._v(" 2.1.1. String")]),t._v(" "),a("p",[a("code",[t._v("string")]),t._v(" is the primary type for indexing data in Meilisearch.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#31-string-tokenization"}},[t._v("3.1. String Tokenization section")]),t._v(".")])]),t._v(" "),a("h4",{attrs:{id:"_2-1-2-numeric"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-2-numeric"}},[t._v("#")]),t._v(" 2.1.2. Numeric")]),t._v(" "),a("p",[t._v("The engine internally converts a "),a("code",[t._v("numeric")]),t._v(" typed value ("),a("code",[t._v("integer")]),t._v("/"),a("code",[t._v("float")]),t._v(") to a human-readable decimal number string representation to make them searchable.")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v(">")]),t._v(", "),a("code",[t._v(">=")]),t._v(", "),a("code",[t._v("<")]),t._v(", and "),a("code",[t._v("<=")]),t._v(" "),a("code",[t._v("filter")]),t._v(" operators apply only to numerical values.")]),t._v(" "),a("h4",{attrs:{id:"_2-1-3-boolean"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-3-boolean"}},[t._v("#")]),t._v(" 2.1.3. Boolean")]),t._v(" "),a("p",[t._v("The engine internally converts a "),a("code",[t._v("boolean")]),t._v(" typed value ("),a("code",[t._v("true")]),t._v("/"),a("code",[t._v("false")]),t._v(") to a lowercase human-readable text to make it searchable.")]),t._v(" "),a("h4",{attrs:{id:"_2-1-4-array"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-4-array"}},[t._v("#")]),t._v(" 2.1.4. Array")]),t._v(" "),a("p",[t._v("An array is recursively broken into separate string tokens, which means separate words.")]),t._v(" "),a("p",[t._v("After the tokenizing process, each word is indexed and stored in the global dictionary of the corresponding index.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#32-array-tokenization"}},[t._v("3.2. Array Tokenization section")]),t._v(".")])]),t._v(" "),a("p",[t._v("Meilisearch accepts complex data structures, no matter the deepness level.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#34-nested-structures"}},[t._v("3.4. Nested structures section")]),t._v(".")])]),t._v(" "),a("h4",{attrs:{id:"_2-1-5-object"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-5-object"}},[t._v("#")]),t._v(" 2.1.5. Object")]),t._v(" "),a("p",[t._v("The engine flattens JSON objects at the root level of a document.")]),t._v(" "),a("p",[t._v("After the tokenizing process, each word is indexed and stored in the global dictionary of the corresponding index.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#33-object"}},[t._v("3.3. Object section")]),t._v(".")])]),t._v(" "),a("p",[t._v("Meilisearch accepts complex data structures, no matter the deepness level.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#34-nested-structures"}},[t._v("3.4. Nested structures section")]),t._v(".")])]),t._v(" "),a("h4",{attrs:{id:"_2-1-6-null"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-6-null"}},[t._v("#")]),t._v(" 2.1.6. "),a("code",[t._v("null")])]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("null")]),t._v(" type is not taken into account at indexing.")]),t._v(" "),a("h2",{attrs:{id:"_3-technical-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-technical-details"}},[t._v("#")]),t._v(" 3. Technical Details")]),t._v(" "),a("h3",{attrs:{id:"_3-1-string-tokenization"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-string-tokenization"}},[t._v("#")]),t._v(" 3.1. String Tokenization")]),t._v(" "),a("p",[t._v("String tokenization is the process of splitting a string into a list of individual terms that are called tokens.")]),t._v(" "),a("p",[t._v("A string is passed to a tokenizer and is then broken into separate string tokens. A token is a word.")]),t._v(" "),a("p",[t._v("For Latin-based languages, the words are separated by space.\nFor Kanji characters, the words are separated by character.")]),t._v(" "),a("p",[t._v("For Latin-based languages, there are two kinds of space separators:")]),t._v(" "),a("ul",[a("li",[a("strong",[t._v("Soft spaces (distance: 1)")]),t._v(": whitespaces, quotes, "),a("code",[t._v("-")]),t._v(" | "),a("code",[t._v("_")]),t._v(" | "),a("code",[t._v("\\")]),t._v(" | "),a("code",[t._v(":")]),t._v(" | "),a("code",[t._v("/")]),t._v(" | "),a("code",[t._v("\\\\")]),t._v(" | "),a("code",[t._v("@")]),t._v(" | "),a("code",[t._v('"')]),t._v(" | "),a("code",[t._v("+")]),t._v(" | "),a("code",[t._v("~")]),t._v(" | "),a("code",[t._v("=")]),t._v(" | "),a("code",[t._v("^")]),t._v(" | "),a("code",[t._v("*")]),t._v(" | "),a("code",[t._v("#")])]),t._v(" "),a("li",[a("strong",[t._v("Hard spaces (distance: 8)")]),t._v(": "),a("code",[t._v(".")]),t._v(" | "),a("code",[t._v(";")]),t._v(" | "),a("code",[t._v(",")]),t._v(" | "),a("code",[t._v("!")]),t._v(" | "),a("code",[t._v("?")]),t._v(" | "),a("code",[t._v("(")]),t._v(" | "),a("code",[t._v(")")]),t._v(" | "),a("code",[t._v("[")]),t._v(" | "),a("code",[t._v("]")]),t._v(" | "),a("code",[t._v("{")]),t._v(" | "),a("code",[t._v("}")]),t._v("| "),a("code",[t._v("|")])])]),t._v(" "),a("p",[t._v("Distance plays an essential role in determining whether documents are relevant. The "),a("code",[t._v("proximity")]),t._v(" ranking rule sorts the results by increasing distance between matched query terms. Two words separated by a soft space are closer and thus considered more relevant than two words separated by a hard space.")]),t._v(" "),a("p",[t._v("After the tokenizing process, each word is indexed and stored in the global dictionary of the corresponding index.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-1-examples"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-examples"}},[t._v("#")]),t._v(" 3.1.1. Examples")]),t._v(" "),a("p",[t._v("To demonstrate how a string is split by space, let's say you have the following string as an input:")]),t._v(" "),a("p",[a("code",[t._v('"Bruce Willis,Vin Diesel"')])]),t._v(" "),a("p",[t._v("In the example above, the distance between "),a("code",[t._v("Bruce")]),t._v(" and "),a("code",[t._v("Willis")]),t._v(" is equal to "),a("code",[t._v("1")]),t._v(". The distance between "),a("code",[t._v("Vin")]),t._v(" and "),a("code",[t._v("Diesel")]),t._v(" is equal to "),a("code",[t._v("1")]),t._v(" too.\nBut, the distance between "),a("code",[t._v("Bruce")]),t._v(" and "),a("code",[t._v("Vin")]),t._v(" is equal to "),a("code",[t._v("8")]),t._v(". The same goes for "),a("code",[t._v("Bruce")]),t._v(" and "),a("code",[t._v("Diesel")]),t._v(", or "),a("code",[t._v("Willis")]),t._v(" and "),a("code",[t._v("Vin")]),t._v(", or also "),a("code",[t._v("Willis")]),t._v(" and "),a("code",[t._v("Diesel")]),t._v(".")]),t._v(" "),a("p",[t._v("Let's see another example. Given two 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('"movie_id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"001"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Bruce.Willis"')]),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('"movie_id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"002"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Bruce super Willis"')]),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("When making a query on "),a("code",[t._v("Bruce Willis")]),t._v(", "),a("code",[t._v("002")]),t._v(" will be the first document returned and "),a("code",[t._v("001")]),t._v(" will be the second one.\nThis will happen because the proximity distance between "),a("code",[t._v("Bruce")]),t._v(" and "),a("code",[t._v("Willis")]),t._v(" is equal to "),a("code",[t._v("2")]),t._v(" in the document "),a("code",[t._v("002")]),t._v(" whereas the distance between "),a("code",[t._v("Bruce")]),t._v(" and "),a("code",[t._v("Willis")]),t._v(" is equal to "),a("code",[t._v("8")]),t._v(" in the document "),a("code",[t._v("001")]),t._v(" since the full stop is a hard space.")]),t._v(" "),a("h3",{attrs:{id:"_3-2-array-tokenization"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-array-tokenization"}},[t._v("#")]),t._v(" 3.2. Array Tokenization")]),t._v(" "),a("p",[t._v("An array is recursively broken into separate string tokens, which means separate words. After the tokenizing process, each word is indexed and stored in the global dictionary of the corresponding index.")]),t._v(" "),a("h4",{attrs:{id:"_3-2-1-examples"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-examples"}},[t._v("#")]),t._v(" 3.2.1. Examples")]),t._v(" "),a("p",[t._v("The following input:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"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 string"}},[t._v('"Bruce Willis"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Vin Diesel"')]),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 string"}},[t._v('"Kung Fu Panda"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Will be processed as if all elements were arranged at the same level:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Bruce Willis. Vin Diesel. Kung Fu Panda."')]),t._v("\n")])])]),a("p",[t._v("The strings above will be separated by soft and hard spaces exactly as explained in the string example.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#311-examples"}},[t._v("3.1.1. Examples section")]),t._v(".")])]),t._v(" "),a("h3",{attrs:{id:"_3-3-nested-structures"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-nested-structures"}},[t._v("#")]),t._v(" 3.3. Nested Structures")]),t._v(" "),a("p",[t._v("Nested structures (e.g. "),a("code",[t._v("Object")]),t._v(", "),a("code",[t._v("Array of Objects")]),t._v(", etc) are internally flattened to a document's root level.")]),t._v(" "),a("p",[t._v("It allows expressing a nested field in all Meilisearch parameters that accept document attributes.")]),t._v(" "),a("p",[t._v("Meilisearch accepts the "),a("code",[t._v(".")]),t._v(" (dot-notation) to express a nested field location in a document structure.")]),t._v(" "),a("p",[t._v("Meilisearch is limited to 127 levels of depth.")]),t._v(" "),a("h4",{attrs:{id:"_3-3-1-examples"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-examples"}},[t._v("#")]),t._v(" 3.3.1. Examples")]),t._v(" "),a("h5",{attrs:{id:"_3-3-1-1-object"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-object"}},[t._v("#")]),t._v(" 3.3.1.1. Object")]),t._v(" "),a("p",[t._v("The following JSON document:")]),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 punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"a"')]),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('"b"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"c"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"d"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"e"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"f"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"g"')]),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("Flattens 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('"a.b"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"c"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"a.d"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"e"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"a.f"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"g"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h5",{attrs:{id:"_3-3-1-2-array-of-objects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-2-array-of-objects"}},[t._v("#")]),t._v(" 3.3.1.2. Array of objects")]),t._v(" "),a("p",[t._v("The following JSON document:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"a"')]),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(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"b"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"c"')]),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("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"b"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"d"')]),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("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"b"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"e"')]),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("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Flattens 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('"a.b"')]),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('"c"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"d"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"e"')]),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("h5",{attrs:{id:"_3-3-1-3-array-of-objects-mixed-with-scalar-value"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-3-array-of-objects-mixed-with-scalar-value"}},[t._v("#")]),t._v(" 3.3.1.3. Array of objects mixed with scalar value")]),t._v(" "),a("p",[t._v("The following JSON document:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"a"')]),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 number"}},[t._v("42")]),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 property"}},[t._v('"b"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"c"')]),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("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"b"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"d"')]),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("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"b"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"e"')]),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("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Flattens 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('"a"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("42")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"a.b"')]),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('"c"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"d"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"e"')]),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("h5",{attrs:{id:"_3-3-1-4-array-of-objects-of-array-of-objects-of"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-4-array-of-objects-of-array-of-objects-of"}},[t._v("#")]),t._v(" 3.3.1.4. Array of objects of array of objects of ...")]),t._v(" "),a("p",[t._v("The following JSON document:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"a"')]),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 string"}},[t._v('"b"')]),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 string"}},[t._v('"c"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"d"')]),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('"e"')]),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 string"}},[t._v('"f"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"g"')]),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 punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"h"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"i"')]),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('"e"')]),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 string"}},[t._v('"j"')]),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('"z"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"y"')]),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 "),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 string"}},[t._v('"l"')]),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 string"}},[t._v('"m"')]),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("Flattens 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('"a"')]),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('"b"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"c"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"d"')]),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(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"m"')]),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('"a.e"')]),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('"f"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"g"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"j"')]),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('"a.h"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"i"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"a.e.z"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"y"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h5",{attrs:{id:"_3-3-1-5-collision-between-a-representation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-5-collision-between-a-representation"}},[t._v("#")]),t._v(" 3.3.1.5. Collision between a representation")]),t._v(" "),a("p",[t._v("The following JSON document:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"a"')]),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('"b"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"c"')]),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 property"}},[t._v('"a.b"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"d"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Flattens 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('"a.b"')]),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('"c"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"d"')]),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("h5",{attrs:{id:"_3-3-1-6-searchableattributes-default-value-case"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-6-searchableattributes-default-value-case"}},[t._v("#")]),t._v(" 3.3.1.6. searchableAttributes default value case")]),t._v(" "),a("p",[t._v("By default, "),a("code",[t._v("searchableAttributes")]),t._v(" is set to "),a("code",[t._v("[*]")]),t._v(", making all document fields searchable.")]),t._v(" "),a("p",[t._v("In that case, "),a("code",[t._v("Attribute")]),t._v(" ranking rule consider a field higher in the internal representation more important than a lower one.")]),t._v(" "),a("p",[t._v("User document field order can be lost if the engine flattens identical field values are not co-located in a document payload.")]),t._v(" "),a("p",[t._v("The following JSON document:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"a.b"')]),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('"price"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2.0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"a"')]),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('"b"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Nice T-shirt"')]),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("Is internally represented")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"a.b"')]),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('"T-shirt"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Nice T-shirt"')]),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('"price"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2.0")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("The second representation of "),a("code",[t._v("a.b")]),t._v(" in its nested form is merged with the first representation of "),a("code",[t._v("a.b")]),t._v(".")]),t._v(" "),a("p",[t._v("Users can't and should not rely on a given document field order when "),a("code",[t._v("searchableAttributes")]),t._v(" is "),a("code",[t._v("[*]")]),t._v(".")]),t._v(" "),a("h5",{attrs:{id:"_3-3-1-7-dot-notation-expression"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-7-dot-notation-expression"}},[t._v("#")]),t._v(" 3.3.1.7. Dot-notation Expression")]),t._v(" "),a("p",[t._v("Permits to express the nested object property.")]),t._v(" "),a("h6",{attrs:{id:"_3-3-1-7-1-example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-7-1-example"}},[t._v("#")]),t._v(" 3.3.1.7.1. Example")]),t._v(" "),a("p",[t._v("Given this document structure")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("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(":")]),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('"person"')]),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('"firstname"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"John"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"lastname"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Doe"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),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('"country"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"US"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"city"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"New York"')]),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("A precise field can be expressed using the dot-notation")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[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('"person.firstname"')]),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("h5",{attrs:{id:"_3-3-1-8-all-object-properties-expression"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-8-all-object-properties-expression"}},[t._v("#")]),t._v(" 3.3.1.8. All Object Properties Expression")]),t._v(" "),a("p",[t._v("It is possible to express the definition of all properties of an object.")]),t._v(" "),a("p",[t._v("e.g. In this case "),a("code",[t._v("person")]),t._v(" is an object containing properties. "),a("code",[t._v('attributesToRetrieve: ["person"]')])]),t._v(" "),a("p",[t._v("This notation is accepted on all parameters or settings allowing to specify attributes. This is due to the fact that several documents may not share the same schema. See "),a("a",{attrs:{href:"#34182-edge-case"}},[t._v("3.4.1.8.2. Edge Case")]),t._v(" section.")]),t._v(" "),a("h6",{attrs:{id:"_3-3-1-8-1-example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-8-1-example"}},[t._v("#")]),t._v(" 3.3.1.8.1. Example")]),t._v(" "),a("p",[t._v("Given this document structure")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("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(":")]),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('"person"')]),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('"firstname"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"John"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"lastname"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Doe"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"address"')]),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('"country"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"US"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"city"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"New York"')]),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("All properties of a document nested object can be expressed this way")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[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('"person"')]),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("It's 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('"attributesToHighlight"')]),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 string"}},[t._v('"person"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"person.firstname"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"person.lastname"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"person.address"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"person.address.country"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"person.address.city"')]),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("h6",{attrs:{id:"_3-3-1-8-2-edge-case"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-8-2-edge-case"}},[t._v("#")]),t._v(" 3.3.1.8.2. Edge Case")]),t._v(" "),a("p",[t._v("One document might have a non-nested field "),a("code",[t._v("person")]),t._v(" while another has a "),a("code",[t._v("person")]),t._v(" object containing properties.")]),t._v(" "),a("p",[t._v("The chosen behavior is not to force the user's hand and Meilisearch do not throw any errors.")]),t._v(" "),a("p",[t._v("E.g. If a user specifies "),a("code",[t._v('"filter": "person = \'Guillaume\'"')]),t._v(" at search time, the document that would have a nested object person would not be brought up by the filter.")]),t._v(" "),a("h2",{attrs:{id:"_4-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-future-possibilities"}},[t._v("#")]),t._v(" 4. Future Possibilities")]),t._v(" "),a("ul",[a("li",[t._v("Change the default behavior of "),a("code",[t._v("searchableAttributes")]),t._v(" so that it is predictable. We may remove the priority based on a field position in a document.")]),t._v(" "),a("li",[t._v("Support the wildcard notation with the dot-notation. e.g. "),a("code",[t._v("person.*")]),t._v(", "),a("code",[t._v("person.address.*")]),t._v(" or "),a("code",[t._v("person.l*")])]),t._v(" "),a("li",[t._v("Support the array notation. e.g. "),a("code",[t._v("person.addresses[1]")])])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/37.b7579f33.js b/docs/assets/js/37.d3f7e90f.js similarity index 99% rename from docs/assets/js/37.b7579f33.js rename to docs/assets/js/37.d3f7e90f.js index daac23e03..f735edb13 100644 --- a/docs/assets/js/37.b7579f33.js +++ b/docs/assets/js/37.d3f7e90f.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[37],{459: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],{463: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.651ab4ec.js b/docs/assets/js/38.bfdf6fc9.js similarity index 99% rename from docs/assets/js/38.651ab4ec.js rename to docs/assets/js/38.bfdf6fc9.js index 0e04cadfe..8f11e7f3c 100644 --- a/docs/assets/js/38.651ab4ec.js +++ b/docs/assets/js/38.bfdf6fc9.js @@ -1 +1 @@ -(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 +(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 diff --git a/docs/assets/js/39.3ffdfa45.js b/docs/assets/js/39.c0e59772.js similarity index 99% rename from docs/assets/js/39.3ffdfa45.js rename to docs/assets/js/39.c0e59772.js index d67205e32..3dc024d12 100644 --- a/docs/assets/js/39.3ffdfa45.js +++ b/docs/assets/js/39.c0e59772.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[39],{463: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:"filterable-attributes-setting-api"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#filterable-attributes-setting-api"}},[e._v("#")]),e._v(" Filterable 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("filterableAttributes")]),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",[i("code",[e._v("filterableAttributes")]),e._v(" setting allows to configure the document fields usable as filter criteria and as facets.")]),e._v(" "),i("p",[e._v("Filters have several use-cases, such as restricting the results a specific user has access to or creating faceted search interfaces. Faceted search interfaces are particularly efficient in helping users navigate a great number of results across many broad categories.")]),e._v(" "),i("p",[i("code",[e._v("filterableAttributes")]),e._v(" need to be properly processed and prepared by Meilisearch before they can be used at search time. Fields defined as "),i("code",[e._v("filterableAttributes")]),e._v(" are usable in the "),i("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#312-filter"}},[i("code",[e._v("filter")])]),e._v(" and "),i("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#314-facets"}},[e._v("facets")]),e._v(" search API parameters.")],1),e._v(" "),i("p",[e._v("By default, Meilisearch has no filterable attributes defined.")]),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("filterableAttributes")]),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("filterableAttributes")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h4",{attrs:{id:"_3-3-1-get-indexes-index-uid-settings-filterable-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get-indexes-index-uid-settings-filterable-attributes"}},[e._v("#")]),e._v(" 3.3.1. "),i("code",[e._v("GET")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/filterable-attributes")])]),e._v(" "),i("p",[e._v("Fetch the "),i("code",[e._v("filterableAttributes")]),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-filterable-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-put-indexes-index-uid-settings-filterable-attributes"}},[e._v("#")]),e._v(" 3.3.2. "),i("code",[e._v("PUT")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/filterable-attributes")])]),e._v(" "),i("p",[e._v("Modify the "),i("code",[e._v("filterableAttributes")]),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---indexesindexuidsettingsfilterable-attributes"}},[e._v("3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/filterable-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("filterableAttributes")]),e._v(" index setting returns no error.")]),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_filterable_attributes"}},[e._v("invalid_settings_filterable_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-filterable-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-delete-indexes-index-uid-settings-filterable-attributes"}},[e._v("#")]),e._v(" 3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/filterable-attributes")])]),e._v(" "),i("p",[e._v("Reset the "),i("code",[e._v("filterableAttributes")]),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=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[39],{462: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:"filterable-attributes-setting-api"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#filterable-attributes-setting-api"}},[e._v("#")]),e._v(" Filterable 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("filterableAttributes")]),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",[i("code",[e._v("filterableAttributes")]),e._v(" setting allows to configure the document fields usable as filter criteria and as facets.")]),e._v(" "),i("p",[e._v("Filters have several use-cases, such as restricting the results a specific user has access to or creating faceted search interfaces. Faceted search interfaces are particularly efficient in helping users navigate a great number of results across many broad categories.")]),e._v(" "),i("p",[i("code",[e._v("filterableAttributes")]),e._v(" need to be properly processed and prepared by Meilisearch before they can be used at search time. Fields defined as "),i("code",[e._v("filterableAttributes")]),e._v(" are usable in the "),i("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#312-filter"}},[i("code",[e._v("filter")])]),e._v(" and "),i("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#314-facets"}},[e._v("facets")]),e._v(" search API parameters.")],1),e._v(" "),i("p",[e._v("By default, Meilisearch has no filterable attributes defined.")]),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("filterableAttributes")]),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("filterableAttributes")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h4",{attrs:{id:"_3-3-1-get-indexes-index-uid-settings-filterable-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get-indexes-index-uid-settings-filterable-attributes"}},[e._v("#")]),e._v(" 3.3.1. "),i("code",[e._v("GET")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/filterable-attributes")])]),e._v(" "),i("p",[e._v("Fetch the "),i("code",[e._v("filterableAttributes")]),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-filterable-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-put-indexes-index-uid-settings-filterable-attributes"}},[e._v("#")]),e._v(" 3.3.2. "),i("code",[e._v("PUT")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/filterable-attributes")])]),e._v(" "),i("p",[e._v("Modify the "),i("code",[e._v("filterableAttributes")]),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---indexesindexuidsettingsfilterable-attributes"}},[e._v("3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/filterable-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("filterableAttributes")]),e._v(" index setting returns no error.")]),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_filterable_attributes"}},[e._v("invalid_settings_filterable_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-filterable-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-delete-indexes-index-uid-settings-filterable-attributes"}},[e._v("#")]),e._v(" 3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/filterable-attributes")])]),e._v(" "),i("p",[e._v("Reset the "),i("code",[e._v("filterableAttributes")]),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=a.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/44.d3d1a586.js b/docs/assets/js/44.97d19d44.js similarity index 99% rename from docs/assets/js/44.d3d1a586.js rename to docs/assets/js/44.97d19d44.js index f5d6da14c..2f0db5a54 100644 --- a/docs/assets/js/44.d3d1a586.js +++ b/docs/assets/js/44.97d19d44.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[44],{469:function(t,e,i){"use strict";i.r(e);var r=i(62),s=Object(r.a)({},(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[i("h1",{attrs:{id:"settings-api"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#settings-api"}},[t._v("#")]),t._v(" Settings API")]),t._v(" "),i("h2",{attrs:{id:"_1-summary"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),i("p",[t._v("This specification describes the global settings API endpoints and cross-reference related sub-resources APIs.")]),t._v(" "),i("h2",{attrs:{id:"_2-motivation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),i("p",[t._v("N/A")]),t._v(" "),i("h2",{attrs:{id:"_3-functional-specification"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),i("h3",{attrs:{id:"_3-1-sub-resource-settings-api-list"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-sub-resource-settings-api-list"}},[t._v("#")]),t._v(" 3.1. Sub Resource Settings API List")]),t._v(" "),i("table",[i("thead",[i("tr",[i("th",[t._v("API Resource")]),t._v(" "),i("th",[t._v("Description")])])]),t._v(" "),i("tbody",[i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0123-displayed-attributes-setting-api.html"}},[t._v("displayed-attributes")])],1),t._v(" "),i("td",[i("code",[t._v("displayedAttributes")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0123-searchable-attributes-setting-api.html"}},[t._v("searchable-attributes")])],1),t._v(" "),i("td",[i("code",[t._v("searchableAttributes")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0123-filterable-attributes-setting-api.html"}},[t._v("filterable-attributes")])],1),t._v(" "),i("td",[i("code",[t._v("filterableAttributes")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0123-sortable-attributes-setting-api.html"}},[t._v("sortable-attributes")])],1),t._v(" "),i("td",[i("code",[t._v("sortableAttributes")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0123-ranking-rules-setting-api.html"}},[t._v("ranking-rules")])],1),t._v(" "),i("td",[i("code",[t._v("rankingRules")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0123-stop-words-setting-api.html"}},[t._v("stop-words")])],1),t._v(" "),i("td",[i("code",[t._v("stopWords")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0123-separators-settings-api.html"}},[t._v("separator-tokens")])],1),t._v(" "),i("td",[i("code",[t._v("separatorTokens")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0123-separators-settings-api.html"}},[t._v("non-separator-tokens")])],1),t._v(" "),i("td",[i("code",[t._v("nonSeparatorTokens")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0123-user-dictionary-settings-api.html"}},[t._v("dictionary")])],1),t._v(" "),i("td",[i("code",[t._v("dictionary")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0123-synonyms-setting-api.html"}},[t._v("synonyms")])],1),t._v(" "),i("td",[i("code",[t._v("synonyms")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0123-distinct-attribute-setting-api.html"}},[t._v("distinct-attribute")])],1),t._v(" "),i("td",[i("code",[t._v("distinctAttribute")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0117-typo-tolerance-setting-api.html"}},[t._v("typo-tolerance")])],1),t._v(" "),i("td",[i("code",[t._v("typoTolerance")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/157-pagination-setting-api.html"}},[t._v("pagination")])],1),t._v(" "),i("td",[i("code",[t._v("pagination")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/157-faceting-setting-api.html"}},[t._v("faceting")])],1),t._v(" "),i("td",[i("code",[t._v("faceting")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0123-proximity-precision.html"}},[t._v("faceting")])],1),t._v(" "),i("td",[i("code",[t._v("proximityPrecision")]),t._v(" sub-resource API endpoints definition")])])])]),t._v(" "),i("p",[t._v("Each setting is exposed as a sub-resource of the "),i("code",[t._v("indexes/:index_uid/settings")]),t._v(" endpoints. e.g. The ranking rules setting of a Meilisearch index is exposed at "),i("code",[t._v("indexes/:index_uid/settings/ranking-rules")]),t._v(".")]),t._v(" "),i("p",[t._v("Some setting changes cause a complete re-indexing of the documents. See "),i("a",{attrs:{href:"#41-triggering-documents-re-indexing"}},[t._v("4.1. Triggering Documents Re-indexing")]),t._v(".")]),t._v(" "),i("h3",{attrs:{id:"_3-2-api-endpoints-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-api-endpoints-definition"}},[t._v("#")]),t._v(" 3.2. API Endpoints Definition")]),t._v(" "),i("p",[t._v("Manipulate all settings of a Meilisearch index.")]),t._v(" "),i("h4",{attrs:{id:"_3-2-1-get-indexes-index-uid-settings"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-get-indexes-index-uid-settings"}},[t._v("#")]),t._v(" 3.2.1. "),i("code",[t._v("GET")]),t._v(" - "),i("code",[t._v("indexes/:index_uid/settings")])]),t._v(" "),i("p",[t._v("Fetch the settings of a Meilisearch index.")]),t._v(" "),i("h5",{attrs:{id:"_3-2-1-1-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-response-definition"}},[t._v("#")]),t._v(" 3.2.1.1. Response Definition")]),t._v(" "),i("table",[i("thead",[i("tr",[i("th",[t._v("Field")]),t._v(" "),i("th",[t._v("Type")]),t._v(" "),i("th",[t._v("Required")])])]),t._v(" "),i("tbody",[i("tr",[i("td",[i("code",[t._v("displayedAttributes")])]),t._v(" "),i("td",[t._v("Array of String")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("searchableAttributes")])]),t._v(" "),i("td",[t._v("Array of String")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("filterableAttributes")])]),t._v(" "),i("td",[t._v("Array of String")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("sortableAttributes")])]),t._v(" "),i("td",[t._v("Array of String")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("rankingRules")])]),t._v(" "),i("td",[t._v("Array of String")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("stopWords")])]),t._v(" "),i("td",[t._v("Array of String")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("separatorTokens")])]),t._v(" "),i("td",[t._v("Array of String")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("nonSeparatorTokens")])]),t._v(" "),i("td",[t._v("Array of String")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("dictionary")])]),t._v(" "),i("td",[t._v("Array of String")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("synonyms")])]),t._v(" "),i("td",[t._v("Object")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("distinctAttribute")])]),t._v(" "),i("td",[t._v("String / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("typoTolerance")])]),t._v(" "),i("td",[t._v("Object")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("pagination")])]),t._v(" "),i("td",[t._v("Object")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("faceting")])]),t._v(" "),i("td",[t._v("Object")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("proximityPrecision")])]),t._v(" "),i("td",[t._v("String")]),t._v(" "),i("td",[t._v("true")])])])]),t._v(" "),i("p",[t._v("The attributes ordering in the response payload is equivalent to the order described in the table above.")]),t._v(" "),i("h5",{attrs:{id:"_3-2-1-2-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-2-errors"}},[t._v("#")]),t._v(" 3.2.1.2. Errors")]),t._v(" "),i("ul",[i("li",[t._v("🔴 If the requested "),i("code",[t._v("index_uid")]),t._v(" does not exist, the API returns an "),i("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(" "),i("h4",{attrs:{id:"_3-2-2-patch-indexes-index-uid-settings"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-patch-indexes-index-uid-settings"}},[t._v("#")]),t._v(" 3.2.2. "),i("code",[t._v("PATCH")]),t._v(" - "),i("code",[t._v("indexes/:index_uid/settings")])]),t._v(" "),i("p",[t._v("Modify the settings of a Meilisearch index.")]),t._v(" "),i("h5",{attrs:{id:"_3-2-2-1-request-payload-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-request-payload-definition"}},[t._v("#")]),t._v(" 3.2.2.1. Request Payload Definition")]),t._v(" "),i("table",[i("thead",[i("tr",[i("th",[t._v("Field")]),t._v(" "),i("th",[t._v("Type")]),t._v(" "),i("th",[t._v("Required")])])]),t._v(" "),i("tbody",[i("tr",[i("td",[i("code",[t._v("displayedAttributes")])]),t._v(" "),i("td",[t._v("Array of String / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("searchableAttributes")])]),t._v(" "),i("td",[t._v("Array of String / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("filterableAttributes")])]),t._v(" "),i("td",[t._v("Array of String / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("sortableAttributes")])]),t._v(" "),i("td",[t._v("Array of String / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("rankingRules")])]),t._v(" "),i("td",[t._v("Array of String / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("stopWords")])]),t._v(" "),i("td",[t._v("Array of String / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("separatorTokens")])]),t._v(" "),i("td",[t._v("Array of String / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("nonSeparatorTokens")])]),t._v(" "),i("td",[t._v("Array of String / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("dictionary")])]),t._v(" "),i("td",[t._v("Array of String / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("synonyms")])]),t._v(" "),i("td",[t._v("Object / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("distinctAttribute")])]),t._v(" "),i("td",[t._v("String / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("typoTolerance")])]),t._v(" "),i("td",[t._v("Object / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("pagination")])]),t._v(" "),i("td",[t._v("Object / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("faceting")])]),t._v(" "),i("td",[t._v("Object / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("proximityPrecision")])]),t._v(" "),i("td",[t._v("String / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])])])]),t._v(" "),i("ul",[i("li",[t._v("The request payload accepts partial definitions, the value of missing fields will remain unchanged.")]),t._v(" "),i("li",[t._v("The request payload accepts the "),i("code",[t._v("null")]),t._v(" value for any setting, which will reset the setting to its default value.")])]),t._v(" "),i("h5",{attrs:{id:"_3-2-2-2-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-response-definition"}},[t._v("#")]),t._v(" 3.2.2.2. Response Definition")]),t._v(" "),i("p",[t._v("When the request is successful, Meilisearch returns the HTTP code "),i("code",[t._v("202 Accepted")]),t._v(". The response's content is the summarized representation of the received asynchronous task.")]),t._v(" "),i("p",[t._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[t._v("Summarized "),i("code",[t._v("task")]),t._v(" Object for "),i("code",[t._v("202 Accepted")])]),t._v(".")],1),t._v(" "),i("h5",{attrs:{id:"_3-2-2-3-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-3-errors"}},[t._v("#")]),t._v(" 3.2.2.3. Errors")]),t._v(" "),i("ul",[i("li",[t._v("🔴 Omitting Content-Type header returns a "),i("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(" "),i("li",[t._v("🔴 Sending an empty Content-Type returns an "),i("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(" "),i("li",[t._v("🔴 Sending a different Content-Type than "),i("code",[t._v("application/json")]),t._v(" returns an "),i("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(" "),i("li",[t._v("🔴 Sending an empty payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[t._v("missing_payload")]),t._v(" error.")],1),t._v(" "),i("li",[t._v("🔴 Sending an invalid JSON payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[t._v("malformed_payload")]),t._v(" error.")],1),t._v(" "),i("li",[t._v("🔴 Sending an invalid index uid format for the "),i("code",[t._v(":index_uid")]),t._v(" path parameter returns an "),i("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(" "),i("p",[t._v("Errors related to a sub-resource are described in its respective specification. See "),i("a",{attrs:{href:"#31-sub-resource-settings-api-list"}},[t._v("3.1. Sub Resource Settings API List")]),t._v(".")]),t._v(" "),i("h6",{attrs:{id:"_3-2-2-3-1-async-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-3-1-async-errors"}},[t._v("#")]),t._v(" 3.2.2.3.1. Async Errors")]),t._v(" "),i("ul",[i("li",[t._v("🔴 When Meilisearch is secured, if the API Key do not have the "),i("code",[t._v("indexes.create")]),t._v(" action defined, the API returns an "),i("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 "),i("code",[t._v("task")]),t._v(" resource. See "),i("a",{attrs:{href:"#3222-response-definition"}},[t._v("3.2.2.2. Response Definition")]),t._v(".")],1)]),t._v(" "),i("blockquote",[i("p",[t._v("Otherwise, Meilisearch will create the index in a lazy way. See "),i("a",{attrs:{href:"#3224-lazy-index-creation"}},[t._v("3.2.2.4. Lazy Index Creation")]),t._v(".")])]),t._v(" "),i("h5",{attrs:{id:"_3-2-2-4-lazy-index-creation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-4-lazy-index-creation"}},[t._v("#")]),t._v(" 3.2.2.4. Lazy Index Creation")]),t._v(" "),i("p",[t._v("If the requested "),i("code",[t._v("index_uid")]),t._v(" does not exist, and the authorization layer allows it (See "),i("a",{attrs:{href:"#32231-async-errors"}},[t._v("3.2.2.3.1. Async Errors")]),t._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),i("a",{attrs:{href:"#3222-response-definition"}},[t._v("3.2.2.2. Response Definition")]),t._v(".")]),t._v(" "),i("h4",{attrs:{id:"_3-2-3-delete-indexes-index-uid-settings"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-delete-indexes-index-uid-settings"}},[t._v("#")]),t._v(" 3.2.3. "),i("code",[t._v("DELETE")]),t._v(" - "),i("code",[t._v("indexes/:index_uid/settings")])]),t._v(" "),i("p",[t._v("Reset the settings of a Meilisearch index to the default values.")]),t._v(" "),i("h5",{attrs:{id:"_3-2-3-1-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-1-response-definition"}},[t._v("#")]),t._v(" 3.2.3.1. Response Definition")]),t._v(" "),i("p",[t._v("When the request is in a successful state, Meilisearch returns the HTTP code "),i("code",[t._v("202 Accepted")]),t._v(". The response's content is the summarized representation of the received asynchronous task.")]),t._v(" "),i("p",[t._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[t._v("Summarized "),i("code",[t._v("task")]),t._v(" Object for "),i("code",[t._v("202 Accepted")])]),t._v(".")],1),t._v(" "),i("h5",{attrs:{id:"_3-2-3-2-default-values"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-2-default-values"}},[t._v("#")]),t._v(" 3.2.3.2. Default Values")]),t._v(" "),i("p",[t._v("See "),i("a",{attrs:{href:"#31-sub-settings-api-resource-list"}},[t._v("3.1. Sub Settings API Resource List")]),t._v(" to get the default values of each setting.")]),t._v(" "),i("h5",{attrs:{id:"_3-2-3-3-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-3-errors"}},[t._v("#")]),t._v(" 3.2.3.3. Errors")]),t._v(" "),i("ul",[i("li",[t._v("🔴 Sending an invalid index uid format for the "),i("code",[t._v(":index_uid")]),t._v(" path parameter returns an "),i("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(" "),i("p",[t._v("Errors related to a sub-resource are described in its respective specification. See "),i("a",{attrs:{href:"#31-sub-resource-settings-api-list"}},[t._v("3.1. Sub Resource Settings API List")]),t._v(".")]),t._v(" "),i("h6",{attrs:{id:"_3-2-3-3-1-asynchronous-index-not-found-error"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-3-1-asynchronous-index-not-found-error"}},[t._v("#")]),t._v(" 3.2.3.3.1. Asynchronous Index Not Found Error")]),t._v(" "),i("ul",[i("li",[t._v("🔴 If the requested "),i("code",[t._v("index_uid")]),t._v(" does not exist, the API returns an "),i("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 "),i("code",[t._v("task")]),t._v(" resource. See "),i("a",{attrs:{href:"#3231-response-definition"}},[t._v("3.2.3.1. Response Definition")]),t._v(".")],1)]),t._v(" "),i("h4",{attrs:{id:"_3-2-4-general-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-general-errors"}},[t._v("#")]),t._v(" 3.2.4. General Errors")]),t._v(" "),i("p",[t._v("These errors apply to all endpoints described here.")]),t._v(" "),i("h5",{attrs:{id:"_3-2-4-1-auth-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-1-auth-errors"}},[t._v("#")]),t._v(" 3.2.4.1 Auth Errors")]),t._v(" "),i("p",[t._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),t._v(" "),i("ul",[i("li",[t._v("🔴 Accessing this route without the "),i("code",[t._v("Authorization")]),t._v(" header returns a "),i("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(" "),i("li",[t._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"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),i("h2",{attrs:{id:"_4-technical-details"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[t._v("#")]),t._v(" 4. Technical Details")]),t._v(" "),i("h3",{attrs:{id:"_4-1-triggering-documents-re-indexing"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-triggering-documents-re-indexing"}},[t._v("#")]),t._v(" 4.1. Triggering Documents Re-indexing")]),t._v(" "),i("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(" "),i("p",[t._v("Changing any of the following index settings will cause documents to be re-indexed:")]),t._v(" "),i("ul",[i("li",[i("code",[t._v("searchableAttributes")])]),t._v(" "),i("li",[i("code",[t._v("filterableAttributes")])]),t._v(" "),i("li",[i("code",[t._v("sortableAttributes")])]),t._v(" "),i("li",[i("code",[t._v("distinctAttribute")])]),t._v(" "),i("li",[i("code",[t._v("stopWords")])]),t._v(" "),i("li",[i("code",[t._v("separatorTokens")])]),t._v(" "),i("li",[i("code",[t._v("nonSeparatorTokens")])]),t._v(" "),i("li",[i("code",[t._v("dictionary")])]),t._v(" "),i("li",[i("code",[t._v("proximityPrecision")])])]),t._v(" "),i("h2",{attrs:{id:"_5-future-possibilities"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[t._v("#")]),t._v(" 5. Future Possibilities")]),t._v(" "),i("p",[t._v("n/a")])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[44],{468:function(t,e,i){"use strict";i.r(e);var r=i(62),s=Object(r.a)({},(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[i("h1",{attrs:{id:"settings-api"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#settings-api"}},[t._v("#")]),t._v(" Settings API")]),t._v(" "),i("h2",{attrs:{id:"_1-summary"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),i("p",[t._v("This specification describes the global settings API endpoints and cross-reference related sub-resources APIs.")]),t._v(" "),i("h2",{attrs:{id:"_2-motivation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),i("p",[t._v("N/A")]),t._v(" "),i("h2",{attrs:{id:"_3-functional-specification"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),i("h3",{attrs:{id:"_3-1-sub-resource-settings-api-list"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-sub-resource-settings-api-list"}},[t._v("#")]),t._v(" 3.1. Sub Resource Settings API List")]),t._v(" "),i("table",[i("thead",[i("tr",[i("th",[t._v("API Resource")]),t._v(" "),i("th",[t._v("Description")])])]),t._v(" "),i("tbody",[i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0123-displayed-attributes-setting-api.html"}},[t._v("displayed-attributes")])],1),t._v(" "),i("td",[i("code",[t._v("displayedAttributes")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0123-searchable-attributes-setting-api.html"}},[t._v("searchable-attributes")])],1),t._v(" "),i("td",[i("code",[t._v("searchableAttributes")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0123-filterable-attributes-setting-api.html"}},[t._v("filterable-attributes")])],1),t._v(" "),i("td",[i("code",[t._v("filterableAttributes")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0123-sortable-attributes-setting-api.html"}},[t._v("sortable-attributes")])],1),t._v(" "),i("td",[i("code",[t._v("sortableAttributes")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0123-ranking-rules-setting-api.html"}},[t._v("ranking-rules")])],1),t._v(" "),i("td",[i("code",[t._v("rankingRules")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0123-stop-words-setting-api.html"}},[t._v("stop-words")])],1),t._v(" "),i("td",[i("code",[t._v("stopWords")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0123-separators-settings-api.html"}},[t._v("separator-tokens")])],1),t._v(" "),i("td",[i("code",[t._v("separatorTokens")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0123-separators-settings-api.html"}},[t._v("non-separator-tokens")])],1),t._v(" "),i("td",[i("code",[t._v("nonSeparatorTokens")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0123-user-dictionary-settings-api.html"}},[t._v("dictionary")])],1),t._v(" "),i("td",[i("code",[t._v("dictionary")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0123-synonyms-setting-api.html"}},[t._v("synonyms")])],1),t._v(" "),i("td",[i("code",[t._v("synonyms")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0123-distinct-attribute-setting-api.html"}},[t._v("distinct-attribute")])],1),t._v(" "),i("td",[i("code",[t._v("distinctAttribute")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0117-typo-tolerance-setting-api.html"}},[t._v("typo-tolerance")])],1),t._v(" "),i("td",[i("code",[t._v("typoTolerance")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/157-pagination-setting-api.html"}},[t._v("pagination")])],1),t._v(" "),i("td",[i("code",[t._v("pagination")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/157-faceting-setting-api.html"}},[t._v("faceting")])],1),t._v(" "),i("td",[i("code",[t._v("faceting")]),t._v(" sub-resource API endpoints definition")])]),t._v(" "),i("tr",[i("td",[i("RouterLink",{attrs:{to:"/specifications/text/0123-proximity-precision.html"}},[t._v("faceting")])],1),t._v(" "),i("td",[i("code",[t._v("proximityPrecision")]),t._v(" sub-resource API endpoints definition")])])])]),t._v(" "),i("p",[t._v("Each setting is exposed as a sub-resource of the "),i("code",[t._v("indexes/:index_uid/settings")]),t._v(" endpoints. e.g. The ranking rules setting of a Meilisearch index is exposed at "),i("code",[t._v("indexes/:index_uid/settings/ranking-rules")]),t._v(".")]),t._v(" "),i("p",[t._v("Some setting changes cause a complete re-indexing of the documents. See "),i("a",{attrs:{href:"#41-triggering-documents-re-indexing"}},[t._v("4.1. Triggering Documents Re-indexing")]),t._v(".")]),t._v(" "),i("h3",{attrs:{id:"_3-2-api-endpoints-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-api-endpoints-definition"}},[t._v("#")]),t._v(" 3.2. API Endpoints Definition")]),t._v(" "),i("p",[t._v("Manipulate all settings of a Meilisearch index.")]),t._v(" "),i("h4",{attrs:{id:"_3-2-1-get-indexes-index-uid-settings"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-get-indexes-index-uid-settings"}},[t._v("#")]),t._v(" 3.2.1. "),i("code",[t._v("GET")]),t._v(" - "),i("code",[t._v("indexes/:index_uid/settings")])]),t._v(" "),i("p",[t._v("Fetch the settings of a Meilisearch index.")]),t._v(" "),i("h5",{attrs:{id:"_3-2-1-1-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-response-definition"}},[t._v("#")]),t._v(" 3.2.1.1. Response Definition")]),t._v(" "),i("table",[i("thead",[i("tr",[i("th",[t._v("Field")]),t._v(" "),i("th",[t._v("Type")]),t._v(" "),i("th",[t._v("Required")])])]),t._v(" "),i("tbody",[i("tr",[i("td",[i("code",[t._v("displayedAttributes")])]),t._v(" "),i("td",[t._v("Array of String")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("searchableAttributes")])]),t._v(" "),i("td",[t._v("Array of String")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("filterableAttributes")])]),t._v(" "),i("td",[t._v("Array of String")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("sortableAttributes")])]),t._v(" "),i("td",[t._v("Array of String")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("rankingRules")])]),t._v(" "),i("td",[t._v("Array of String")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("stopWords")])]),t._v(" "),i("td",[t._v("Array of String")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("separatorTokens")])]),t._v(" "),i("td",[t._v("Array of String")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("nonSeparatorTokens")])]),t._v(" "),i("td",[t._v("Array of String")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("dictionary")])]),t._v(" "),i("td",[t._v("Array of String")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("synonyms")])]),t._v(" "),i("td",[t._v("Object")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("distinctAttribute")])]),t._v(" "),i("td",[t._v("String / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("typoTolerance")])]),t._v(" "),i("td",[t._v("Object")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("pagination")])]),t._v(" "),i("td",[t._v("Object")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("faceting")])]),t._v(" "),i("td",[t._v("Object")]),t._v(" "),i("td",[t._v("true")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("proximityPrecision")])]),t._v(" "),i("td",[t._v("String")]),t._v(" "),i("td",[t._v("true")])])])]),t._v(" "),i("p",[t._v("The attributes ordering in the response payload is equivalent to the order described in the table above.")]),t._v(" "),i("h5",{attrs:{id:"_3-2-1-2-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-2-errors"}},[t._v("#")]),t._v(" 3.2.1.2. Errors")]),t._v(" "),i("ul",[i("li",[t._v("🔴 If the requested "),i("code",[t._v("index_uid")]),t._v(" does not exist, the API returns an "),i("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(" "),i("h4",{attrs:{id:"_3-2-2-patch-indexes-index-uid-settings"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-patch-indexes-index-uid-settings"}},[t._v("#")]),t._v(" 3.2.2. "),i("code",[t._v("PATCH")]),t._v(" - "),i("code",[t._v("indexes/:index_uid/settings")])]),t._v(" "),i("p",[t._v("Modify the settings of a Meilisearch index.")]),t._v(" "),i("h5",{attrs:{id:"_3-2-2-1-request-payload-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-request-payload-definition"}},[t._v("#")]),t._v(" 3.2.2.1. Request Payload Definition")]),t._v(" "),i("table",[i("thead",[i("tr",[i("th",[t._v("Field")]),t._v(" "),i("th",[t._v("Type")]),t._v(" "),i("th",[t._v("Required")])])]),t._v(" "),i("tbody",[i("tr",[i("td",[i("code",[t._v("displayedAttributes")])]),t._v(" "),i("td",[t._v("Array of String / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("searchableAttributes")])]),t._v(" "),i("td",[t._v("Array of String / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("filterableAttributes")])]),t._v(" "),i("td",[t._v("Array of String / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("sortableAttributes")])]),t._v(" "),i("td",[t._v("Array of String / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("rankingRules")])]),t._v(" "),i("td",[t._v("Array of String / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("stopWords")])]),t._v(" "),i("td",[t._v("Array of String / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("separatorTokens")])]),t._v(" "),i("td",[t._v("Array of String / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("nonSeparatorTokens")])]),t._v(" "),i("td",[t._v("Array of String / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("dictionary")])]),t._v(" "),i("td",[t._v("Array of String / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("synonyms")])]),t._v(" "),i("td",[t._v("Object / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("distinctAttribute")])]),t._v(" "),i("td",[t._v("String / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("typoTolerance")])]),t._v(" "),i("td",[t._v("Object / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("pagination")])]),t._v(" "),i("td",[t._v("Object / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("faceting")])]),t._v(" "),i("td",[t._v("Object / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])]),t._v(" "),i("tr",[i("td",[i("code",[t._v("proximityPrecision")])]),t._v(" "),i("td",[t._v("String / "),i("code",[t._v("null")])]),t._v(" "),i("td",[t._v("false")])])])]),t._v(" "),i("ul",[i("li",[t._v("The request payload accepts partial definitions, the value of missing fields will remain unchanged.")]),t._v(" "),i("li",[t._v("The request payload accepts the "),i("code",[t._v("null")]),t._v(" value for any setting, which will reset the setting to its default value.")])]),t._v(" "),i("h5",{attrs:{id:"_3-2-2-2-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-response-definition"}},[t._v("#")]),t._v(" 3.2.2.2. Response Definition")]),t._v(" "),i("p",[t._v("When the request is successful, Meilisearch returns the HTTP code "),i("code",[t._v("202 Accepted")]),t._v(". The response's content is the summarized representation of the received asynchronous task.")]),t._v(" "),i("p",[t._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[t._v("Summarized "),i("code",[t._v("task")]),t._v(" Object for "),i("code",[t._v("202 Accepted")])]),t._v(".")],1),t._v(" "),i("h5",{attrs:{id:"_3-2-2-3-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-3-errors"}},[t._v("#")]),t._v(" 3.2.2.3. Errors")]),t._v(" "),i("ul",[i("li",[t._v("🔴 Omitting Content-Type header returns a "),i("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(" "),i("li",[t._v("🔴 Sending an empty Content-Type returns an "),i("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(" "),i("li",[t._v("🔴 Sending a different Content-Type than "),i("code",[t._v("application/json")]),t._v(" returns an "),i("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(" "),i("li",[t._v("🔴 Sending an empty payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[t._v("missing_payload")]),t._v(" error.")],1),t._v(" "),i("li",[t._v("🔴 Sending an invalid JSON payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[t._v("malformed_payload")]),t._v(" error.")],1),t._v(" "),i("li",[t._v("🔴 Sending an invalid index uid format for the "),i("code",[t._v(":index_uid")]),t._v(" path parameter returns an "),i("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(" "),i("p",[t._v("Errors related to a sub-resource are described in its respective specification. See "),i("a",{attrs:{href:"#31-sub-resource-settings-api-list"}},[t._v("3.1. Sub Resource Settings API List")]),t._v(".")]),t._v(" "),i("h6",{attrs:{id:"_3-2-2-3-1-async-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-3-1-async-errors"}},[t._v("#")]),t._v(" 3.2.2.3.1. Async Errors")]),t._v(" "),i("ul",[i("li",[t._v("🔴 When Meilisearch is secured, if the API Key do not have the "),i("code",[t._v("indexes.create")]),t._v(" action defined, the API returns an "),i("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 "),i("code",[t._v("task")]),t._v(" resource. See "),i("a",{attrs:{href:"#3222-response-definition"}},[t._v("3.2.2.2. Response Definition")]),t._v(".")],1)]),t._v(" "),i("blockquote",[i("p",[t._v("Otherwise, Meilisearch will create the index in a lazy way. See "),i("a",{attrs:{href:"#3224-lazy-index-creation"}},[t._v("3.2.2.4. Lazy Index Creation")]),t._v(".")])]),t._v(" "),i("h5",{attrs:{id:"_3-2-2-4-lazy-index-creation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-4-lazy-index-creation"}},[t._v("#")]),t._v(" 3.2.2.4. Lazy Index Creation")]),t._v(" "),i("p",[t._v("If the requested "),i("code",[t._v("index_uid")]),t._v(" does not exist, and the authorization layer allows it (See "),i("a",{attrs:{href:"#32231-async-errors"}},[t._v("3.2.2.3.1. Async Errors")]),t._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),i("a",{attrs:{href:"#3222-response-definition"}},[t._v("3.2.2.2. Response Definition")]),t._v(".")]),t._v(" "),i("h4",{attrs:{id:"_3-2-3-delete-indexes-index-uid-settings"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-delete-indexes-index-uid-settings"}},[t._v("#")]),t._v(" 3.2.3. "),i("code",[t._v("DELETE")]),t._v(" - "),i("code",[t._v("indexes/:index_uid/settings")])]),t._v(" "),i("p",[t._v("Reset the settings of a Meilisearch index to the default values.")]),t._v(" "),i("h5",{attrs:{id:"_3-2-3-1-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-1-response-definition"}},[t._v("#")]),t._v(" 3.2.3.1. Response Definition")]),t._v(" "),i("p",[t._v("When the request is in a successful state, Meilisearch returns the HTTP code "),i("code",[t._v("202 Accepted")]),t._v(". The response's content is the summarized representation of the received asynchronous task.")]),t._v(" "),i("p",[t._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[t._v("Summarized "),i("code",[t._v("task")]),t._v(" Object for "),i("code",[t._v("202 Accepted")])]),t._v(".")],1),t._v(" "),i("h5",{attrs:{id:"_3-2-3-2-default-values"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-2-default-values"}},[t._v("#")]),t._v(" 3.2.3.2. Default Values")]),t._v(" "),i("p",[t._v("See "),i("a",{attrs:{href:"#31-sub-settings-api-resource-list"}},[t._v("3.1. Sub Settings API Resource List")]),t._v(" to get the default values of each setting.")]),t._v(" "),i("h5",{attrs:{id:"_3-2-3-3-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-3-errors"}},[t._v("#")]),t._v(" 3.2.3.3. Errors")]),t._v(" "),i("ul",[i("li",[t._v("🔴 Sending an invalid index uid format for the "),i("code",[t._v(":index_uid")]),t._v(" path parameter returns an "),i("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(" "),i("p",[t._v("Errors related to a sub-resource are described in its respective specification. See "),i("a",{attrs:{href:"#31-sub-resource-settings-api-list"}},[t._v("3.1. Sub Resource Settings API List")]),t._v(".")]),t._v(" "),i("h6",{attrs:{id:"_3-2-3-3-1-asynchronous-index-not-found-error"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-3-1-asynchronous-index-not-found-error"}},[t._v("#")]),t._v(" 3.2.3.3.1. Asynchronous Index Not Found Error")]),t._v(" "),i("ul",[i("li",[t._v("🔴 If the requested "),i("code",[t._v("index_uid")]),t._v(" does not exist, the API returns an "),i("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 "),i("code",[t._v("task")]),t._v(" resource. See "),i("a",{attrs:{href:"#3231-response-definition"}},[t._v("3.2.3.1. Response Definition")]),t._v(".")],1)]),t._v(" "),i("h4",{attrs:{id:"_3-2-4-general-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-general-errors"}},[t._v("#")]),t._v(" 3.2.4. General Errors")]),t._v(" "),i("p",[t._v("These errors apply to all endpoints described here.")]),t._v(" "),i("h5",{attrs:{id:"_3-2-4-1-auth-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-1-auth-errors"}},[t._v("#")]),t._v(" 3.2.4.1 Auth Errors")]),t._v(" "),i("p",[t._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),t._v(" "),i("ul",[i("li",[t._v("🔴 Accessing this route without the "),i("code",[t._v("Authorization")]),t._v(" header returns a "),i("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(" "),i("li",[t._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"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),i("h2",{attrs:{id:"_4-technical-details"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[t._v("#")]),t._v(" 4. Technical Details")]),t._v(" "),i("h3",{attrs:{id:"_4-1-triggering-documents-re-indexing"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-triggering-documents-re-indexing"}},[t._v("#")]),t._v(" 4.1. Triggering Documents Re-indexing")]),t._v(" "),i("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(" "),i("p",[t._v("Changing any of the following index settings will cause documents to be re-indexed:")]),t._v(" "),i("ul",[i("li",[i("code",[t._v("searchableAttributes")])]),t._v(" "),i("li",[i("code",[t._v("filterableAttributes")])]),t._v(" "),i("li",[i("code",[t._v("sortableAttributes")])]),t._v(" "),i("li",[i("code",[t._v("distinctAttribute")])]),t._v(" "),i("li",[i("code",[t._v("stopWords")])]),t._v(" "),i("li",[i("code",[t._v("separatorTokens")])]),t._v(" "),i("li",[i("code",[t._v("nonSeparatorTokens")])]),t._v(" "),i("li",[i("code",[t._v("dictionary")])]),t._v(" "),i("li",[i("code",[t._v("proximityPrecision")])])]),t._v(" "),i("h2",{attrs:{id:"_5-future-possibilities"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[t._v("#")]),t._v(" 5. Future Possibilities")]),t._v(" "),i("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/45.94f10b5f.js b/docs/assets/js/45.6c35ad02.js similarity index 99% rename from docs/assets/js/45.94f10b5f.js rename to docs/assets/js/45.6c35ad02.js index cc561e71f..6f3b3afa8 100644 --- a/docs/assets/js/45.94f10b5f.js +++ b/docs/assets/js/45.6c35ad02.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[45],{468:function(e,t,i){"use strict";i.r(t);var r=i(62),s=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:"sortable-attributes-setting-api"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#sortable-attributes-setting-api"}},[e._v("#")]),e._v(" Sortable 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("sortableAttributes")]),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",[i("code",[e._v("sortableAttributes")]),e._v(" setting allows to configure the document fields usable as sort criteria at search time")]),e._v(" "),i("p",[e._v("By default, Meilisearch focuses on ordering results according to their relevancy. This sorting behavior can be altered so end-users can decide at search time what type of results they want to see first.")]),e._v(" "),i("p",[i("code",[e._v("sortableAttributes")]),e._v(" need to be properly processed and prepared by Meilisearch before they can be used. Fields defined as "),i("code",[e._v("sortableAttributes")]),e._v(" are usable in the "),i("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#1213-sort"}},[i("code",[e._v("sort")])]),e._v(" search API parameter.")],1),e._v(" "),i("p",[e._v("By default, Meilisearch has no sortable attributes defined.")]),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("sortableAttributes")]),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("sortableAttributes")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h4",{attrs:{id:"_3-3-1-get-indexes-index-uid-settings-sortable-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get-indexes-index-uid-settings-sortable-attributes"}},[e._v("#")]),e._v(" 3.3.1. "),i("code",[e._v("GET")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/sortable-attributes")])]),e._v(" "),i("p",[e._v("Fetch the "),i("code",[e._v("sortableAttributes")]),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-sortable-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-put-indexes-index-uid-settings-sortable-attributes"}},[e._v("#")]),e._v(" 3.3.2. "),i("code",[e._v("PUT")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/sortable-attributes")])]),e._v(" "),i("p",[e._v("Modify the "),i("code",[e._v("sortableAttributes")]),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---indexesindexuidsettingssortable-attributes"}},[e._v("3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/sortable-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("sortableAttributes")]),e._v(" index setting returns no error.")]),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 a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_sortable_attributes"}},[e._v("invalid_settings_sortable_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-sortable-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-delete-indexes-index-uid-settings-sortable-attributes"}},[e._v("#")]),e._v(" 3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/sortable-attributes")])]),e._v(" "),i("p",[e._v("Reset the "),i("code",[e._v("sortableAttributes")]),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=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[45],{469:function(e,t,i){"use strict";i.r(t);var r=i(62),s=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:"sortable-attributes-setting-api"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#sortable-attributes-setting-api"}},[e._v("#")]),e._v(" Sortable 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("sortableAttributes")]),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",[i("code",[e._v("sortableAttributes")]),e._v(" setting allows to configure the document fields usable as sort criteria at search time")]),e._v(" "),i("p",[e._v("By default, Meilisearch focuses on ordering results according to their relevancy. This sorting behavior can be altered so end-users can decide at search time what type of results they want to see first.")]),e._v(" "),i("p",[i("code",[e._v("sortableAttributes")]),e._v(" need to be properly processed and prepared by Meilisearch before they can be used. Fields defined as "),i("code",[e._v("sortableAttributes")]),e._v(" are usable in the "),i("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#1213-sort"}},[i("code",[e._v("sort")])]),e._v(" search API parameter.")],1),e._v(" "),i("p",[e._v("By default, Meilisearch has no sortable attributes defined.")]),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("sortableAttributes")]),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("sortableAttributes")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h4",{attrs:{id:"_3-3-1-get-indexes-index-uid-settings-sortable-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get-indexes-index-uid-settings-sortable-attributes"}},[e._v("#")]),e._v(" 3.3.1. "),i("code",[e._v("GET")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/sortable-attributes")])]),e._v(" "),i("p",[e._v("Fetch the "),i("code",[e._v("sortableAttributes")]),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-sortable-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-put-indexes-index-uid-settings-sortable-attributes"}},[e._v("#")]),e._v(" 3.3.2. "),i("code",[e._v("PUT")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/sortable-attributes")])]),e._v(" "),i("p",[e._v("Modify the "),i("code",[e._v("sortableAttributes")]),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---indexesindexuidsettingssortable-attributes"}},[e._v("3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/sortable-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("sortableAttributes")]),e._v(" index setting returns no error.")]),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 a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_sortable_attributes"}},[e._v("invalid_settings_sortable_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-sortable-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-delete-indexes-index-uid-settings-sortable-attributes"}},[e._v("#")]),e._v(" 3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/sortable-attributes")])]),e._v(" "),i("p",[e._v("Reset the "),i("code",[e._v("sortableAttributes")]),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=s.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/46.7f495a96.js b/docs/assets/js/46.9f9d4a1b.js similarity index 99% rename from docs/assets/js/46.7f495a96.js rename to docs/assets/js/46.9f9d4a1b.js index a250012a1..fcfa9f422 100644 --- a/docs/assets/js/46.7f495a96.js +++ b/docs/assets/js/46.9f9d4a1b.js @@ -1 +1 @@ -(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 +(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 diff --git a/docs/assets/js/47.bf881f32.js b/docs/assets/js/47.49c151b7.js similarity index 99% rename from docs/assets/js/47.bf881f32.js rename to docs/assets/js/47.49c151b7.js index a692af2d4..a74234fa2 100644 --- a/docs/assets/js/47.bf881f32.js +++ b/docs/assets/js/47.49c151b7.js @@ -1 +1 @@ -(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 +(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 diff --git a/docs/assets/js/50.e4b54756.js b/docs/assets/js/50.79df3dcc.js similarity index 99% rename from docs/assets/js/50.e4b54756.js rename to docs/assets/js/50.79df3dcc.js index bb6fe2986..a579b2ca1 100644 --- a/docs/assets/js/50.e4b54756.js +++ b/docs/assets/js/50.79df3dcc.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[50],{475: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],{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 diff --git a/docs/assets/js/51.a5cea8ee.js b/docs/assets/js/51.320631dd.js similarity index 99% rename from docs/assets/js/51.a5cea8ee.js rename to docs/assets/js/51.320631dd.js index a2f13c440..ddbaf72e0 100644 --- a/docs/assets/js/51.a5cea8ee.js +++ b/docs/assets/js/51.320631dd.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[51],{476: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],{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 diff --git a/docs/assets/js/52.b777542a.js b/docs/assets/js/52.c36008c5.js similarity index 99% rename from docs/assets/js/52.b777542a.js rename to docs/assets/js/52.c36008c5.js index 94a9983dc..53c0a734e 100644 --- a/docs/assets/js/52.b777542a.js +++ b/docs/assets/js/52.c36008c5.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[52],{474: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],{476: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.70550584.js b/docs/assets/js/54.b042742e.js similarity index 99% rename from docs/assets/js/54.70550584.js rename to docs/assets/js/54.b042742e.js index d6aa82aee..d651eb0d9 100644 --- a/docs/assets/js/54.70550584.js +++ b/docs/assets/js/54.b042742e.js @@ -1 +1 @@ -(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 +(window.webpackJsonp=window.webpackJsonp||[]).push([[54],{479: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/55.166e6f41.js b/docs/assets/js/55.16d1a9db.js similarity index 98% rename from docs/assets/js/55.166e6f41.js rename to docs/assets/js/55.16d1a9db.js index 6d4bf3507..0383e04ea 100644 --- a/docs/assets/js/55.166e6f41.js +++ b/docs/assets/js/55.16d1a9db.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[55],{479:function(t,a,e){"use strict";e.r(a);var s=e(62),i=Object(s.a)({},(function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"health-api"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#health-api"}},[t._v("#")]),t._v(" Health API")]),t._v(" "),e("h2",{attrs:{id:"_1-summary"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),e("p",[t._v("This specification describes the health API endpoint. The "),e("code",[t._v("/health")]),t._v(" route allows to verify the status and availability of a Meilisearch instance.")]),t._v(" "),e("h2",{attrs:{id:"_2-motivation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),e("p",[t._v("To know the status of a Meilisearch instance, "),e("code",[t._v("/health")]),t._v(" is a public route that can be long pooled with simple monitoring tools.")]),t._v(" "),e("h2",{attrs:{id:"_3-functional-specification"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),e("h3",{attrs:{id:"_3-1-health-api-resource-properties"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-health-api-resource-properties"}},[t._v("#")]),t._v(" 3.1. "),e("code",[t._v("health")]),t._v(" API resource properties")]),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("tbody",[e("tr",[e("td",[e("a",{attrs:{href:"#311-status"}},[t._v("status")])]),t._v(" "),e("td",[t._v("String")]),t._v(" "),e("td",[t._v("True")])])])]),t._v(" "),e("h4",{attrs:{id:"_3-1-1-status"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-status"}},[t._v("#")]),t._v(" 3.1.1. "),e("code",[t._v("status")])]),t._v(" "),e("ul",[e("li",[t._v("Type: String")]),t._v(" "),e("li",[t._v("Required: True")]),t._v(" "),e("li",[t._v("Default: "),e("code",[t._v("available")])])]),t._v(" "),e("p",[t._v("Returns the status of a Meilisearch instance, the only possible value is "),e("code",[t._v("available")]),t._v(".")]),t._v(" "),e("h2",{attrs:{id:"_3-2-api-endpoints-definition"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-api-endpoints-definition"}},[t._v("#")]),t._v(" 3.2. API Endpoints Definition")]),t._v(" "),e("h3",{attrs:{id:"_3-2-1-get-health"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-get-health"}},[t._v("#")]),t._v(" 3.2.1. "),e("code",[t._v("GET")]),t._v(" - "),e("code",[t._v("health")])]),t._v(" "),e("p",[t._v("Retrieves the status of a Meilisearch instance.")]),t._v(" "),e("p",[e("code",[t._v("200")]),t._v(" - Response body")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[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('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"available"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[t._v("All properties must be returned when the resource is retrieved.")]),t._v(" "),e("h3",{attrs:{id:"_3-2-2-endpoint-access"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-endpoint-access"}},[t._v("#")]),t._v(" 3.2.2. Endpoint access")]),t._v(" "),e("p",[t._v("This route is always public and access to it cannot be protected by an API key.")]),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("p",[t._v("n/a")]),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("p",[t._v("n/a")])])}),[],!1,null,null,null);a.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[55],{478:function(t,a,e){"use strict";e.r(a);var s=e(62),i=Object(s.a)({},(function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"health-api"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#health-api"}},[t._v("#")]),t._v(" Health API")]),t._v(" "),e("h2",{attrs:{id:"_1-summary"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),e("p",[t._v("This specification describes the health API endpoint. The "),e("code",[t._v("/health")]),t._v(" route allows to verify the status and availability of a Meilisearch instance.")]),t._v(" "),e("h2",{attrs:{id:"_2-motivation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),e("p",[t._v("To know the status of a Meilisearch instance, "),e("code",[t._v("/health")]),t._v(" is a public route that can be long pooled with simple monitoring tools.")]),t._v(" "),e("h2",{attrs:{id:"_3-functional-specification"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),e("h3",{attrs:{id:"_3-1-health-api-resource-properties"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-health-api-resource-properties"}},[t._v("#")]),t._v(" 3.1. "),e("code",[t._v("health")]),t._v(" API resource properties")]),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("tbody",[e("tr",[e("td",[e("a",{attrs:{href:"#311-status"}},[t._v("status")])]),t._v(" "),e("td",[t._v("String")]),t._v(" "),e("td",[t._v("True")])])])]),t._v(" "),e("h4",{attrs:{id:"_3-1-1-status"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-status"}},[t._v("#")]),t._v(" 3.1.1. "),e("code",[t._v("status")])]),t._v(" "),e("ul",[e("li",[t._v("Type: String")]),t._v(" "),e("li",[t._v("Required: True")]),t._v(" "),e("li",[t._v("Default: "),e("code",[t._v("available")])])]),t._v(" "),e("p",[t._v("Returns the status of a Meilisearch instance, the only possible value is "),e("code",[t._v("available")]),t._v(".")]),t._v(" "),e("h2",{attrs:{id:"_3-2-api-endpoints-definition"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-api-endpoints-definition"}},[t._v("#")]),t._v(" 3.2. API Endpoints Definition")]),t._v(" "),e("h3",{attrs:{id:"_3-2-1-get-health"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-get-health"}},[t._v("#")]),t._v(" 3.2.1. "),e("code",[t._v("GET")]),t._v(" - "),e("code",[t._v("health")])]),t._v(" "),e("p",[t._v("Retrieves the status of a Meilisearch instance.")]),t._v(" "),e("p",[e("code",[t._v("200")]),t._v(" - Response body")]),t._v(" "),e("div",{staticClass:"language-json extra-class"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[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('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"available"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("p",[t._v("All properties must be returned when the resource is retrieved.")]),t._v(" "),e("h3",{attrs:{id:"_3-2-2-endpoint-access"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-endpoint-access"}},[t._v("#")]),t._v(" 3.2.2. Endpoint access")]),t._v(" "),e("p",[t._v("This route is always public and access to it cannot be protected by an API key.")]),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("p",[t._v("n/a")]),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("p",[t._v("n/a")])])}),[],!1,null,null,null);a.default=i.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/62.3ac8f506.js b/docs/assets/js/62.057cf3e0.js similarity index 98% rename from docs/assets/js/62.3ac8f506.js rename to docs/assets/js/62.057cf3e0.js index c787f4275..988a6e97f 100644 --- a/docs/assets/js/62.3ac8f506.js +++ b/docs/assets/js/62.057cf3e0.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[62],{486: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:"runtime-experimental-feature-api"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#runtime-experimental-feature-api"}},[e._v("#")]),e._v(" Runtime experimental feature 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 runtime experimental feature API allows toggling the status of some "),a("RouterLink",{attrs:{to:"/specifications/text/0193-experimental-features.html"}},[e._v("experimental features")]),e._v(" at runtime.")],1),e._v(" "),a("p",[e._v("Due to its nature, this route itself is permanently experimental, in that the way of using it is not covered by "),a("a",{attrs:{href:"https://github.com/meilisearch/engine-team/blob/main/resources/versioning-policy.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("Meilisearch's stability guarantee"),a("OutboundLink")],1),e._v(".")]),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("Historically, experimental features in the engine must be enabled from the CLI or via environment variables.")]),e._v(" "),a("p",[e._v("The problem is that it requires restarting Meilisearch, so:")]),e._v(" "),a("ul",[a("li",[e._v("It induces downtime.")]),e._v(" "),a("li",[e._v("Makes experimental features harder to enable for "),a("a",{attrs:{href:"https://www.meilisearch.com/pricing?utm_campaign=oss&utm_source=engine&utm_medium=specifications",target:"_blank",rel:"noopener noreferrer"}},[e._v("Meilisearch Cloud"),a("OutboundLink")],1),e._v(" instances.")])]),e._v(" "),a("p",[e._v("The motivation of this feature is to remove these issues by allowing enabling and disabling experimental features at runtime.")]),e._v(" "),a("p",[e._v("Due to the nature of some experimental features they might not be in scope for this API. The experimental features in scope for this API are called "),a("RouterLink",{attrs:{to:"/specifications/text/0193-experimental-features.html#32-runtime-experimental-features"}},[a("em",[e._v("runtime")]),e._v(" experimental features")]),e._v(", while the ones not in scope are called "),a("RouterLink",{attrs:{to:"/specifications/text/0193-experimental-features.html#31-instance-experimental-features"}},[a("em",[e._v("instance")]),e._v(" experimental features")]),e._v(".")],1),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-routes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-routes"}},[e._v("#")]),e._v(" 3.1 Routes")]),e._v(" "),a("p",[e._v("Meilisearch exposes 2 routes to get or set the status of runtime experimental features.")]),e._v(" "),a("ul",[a("li",[e._v("GET "),a("code",[e._v("/experimental-features")]),e._v(": get the status of all the runtime experimental features.")]),e._v(" "),a("li",[e._v("PATCH "),a("code",[e._v("/experimental-features")]),e._v(": set the status of some of the runtime experimental features.")])]),e._v(" "),a("p",[e._v("All routes return the status of the runtime experimental features after calling the route.")]),e._v(" "),a("p",[e._v("This response is a JSON object containing the following fields:")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Field name")]),e._v(" "),a("th",[e._v("Type")]),e._v(" "),a("th",[e._v("Experimental feature")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("code",[e._v("vectorStore")])]),e._v(" "),a("td",[e._v("Boolean")]),e._v(" "),a("td",[a("RouterLink",{attrs:{to:"/specifications/text/0193-experimental-features.html#vector-store"}},[e._v("Vector store")])],1)])])]),e._v(" "),a("p",[e._v("The PATCH routes accept as payload a JSON object containing the same fields as in the response, with the following effects on the corresponding feature:")]),e._v(" "),a("ul",[a("li",[e._v("Setting a field to "),a("code",[e._v("true")]),e._v(" enables the feature.")]),e._v(" "),a("li",[e._v("Setting a field to "),a("code",[e._v("false")]),e._v(" disables the feature.")]),e._v(" "),a("li",[e._v("Setting a field to "),a("code",[e._v("null")]),e._v(" or omitting a field leaves its value unchanged.")])]),e._v(" "),a("h3",{attrs:{id:"_3-2-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-errors"}},[e._v("#")]),e._v(" 3.2 Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#bad_request"}},[a("code",[e._v("bad_request")])]),e._v(" for unknown fields in the payload or whenever a field is not a boolean.")],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("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("p",[e._v("N/A")])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[62],{487: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:"runtime-experimental-feature-api"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#runtime-experimental-feature-api"}},[e._v("#")]),e._v(" Runtime experimental feature 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 runtime experimental feature API allows toggling the status of some "),a("RouterLink",{attrs:{to:"/specifications/text/0193-experimental-features.html"}},[e._v("experimental features")]),e._v(" at runtime.")],1),e._v(" "),a("p",[e._v("Due to its nature, this route itself is permanently experimental, in that the way of using it is not covered by "),a("a",{attrs:{href:"https://github.com/meilisearch/engine-team/blob/main/resources/versioning-policy.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("Meilisearch's stability guarantee"),a("OutboundLink")],1),e._v(".")]),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("Historically, experimental features in the engine must be enabled from the CLI or via environment variables.")]),e._v(" "),a("p",[e._v("The problem is that it requires restarting Meilisearch, so:")]),e._v(" "),a("ul",[a("li",[e._v("It induces downtime.")]),e._v(" "),a("li",[e._v("Makes experimental features harder to enable for "),a("a",{attrs:{href:"https://www.meilisearch.com/pricing?utm_campaign=oss&utm_source=engine&utm_medium=specifications",target:"_blank",rel:"noopener noreferrer"}},[e._v("Meilisearch Cloud"),a("OutboundLink")],1),e._v(" instances.")])]),e._v(" "),a("p",[e._v("The motivation of this feature is to remove these issues by allowing enabling and disabling experimental features at runtime.")]),e._v(" "),a("p",[e._v("Due to the nature of some experimental features they might not be in scope for this API. The experimental features in scope for this API are called "),a("RouterLink",{attrs:{to:"/specifications/text/0193-experimental-features.html#32-runtime-experimental-features"}},[a("em",[e._v("runtime")]),e._v(" experimental features")]),e._v(", while the ones not in scope are called "),a("RouterLink",{attrs:{to:"/specifications/text/0193-experimental-features.html#31-instance-experimental-features"}},[a("em",[e._v("instance")]),e._v(" experimental features")]),e._v(".")],1),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-routes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-routes"}},[e._v("#")]),e._v(" 3.1 Routes")]),e._v(" "),a("p",[e._v("Meilisearch exposes 2 routes to get or set the status of runtime experimental features.")]),e._v(" "),a("ul",[a("li",[e._v("GET "),a("code",[e._v("/experimental-features")]),e._v(": get the status of all the runtime experimental features.")]),e._v(" "),a("li",[e._v("PATCH "),a("code",[e._v("/experimental-features")]),e._v(": set the status of some of the runtime experimental features.")])]),e._v(" "),a("p",[e._v("All routes return the status of the runtime experimental features after calling the route.")]),e._v(" "),a("p",[e._v("This response is a JSON object containing the following fields:")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Field name")]),e._v(" "),a("th",[e._v("Type")]),e._v(" "),a("th",[e._v("Experimental feature")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("code",[e._v("vectorStore")])]),e._v(" "),a("td",[e._v("Boolean")]),e._v(" "),a("td",[a("RouterLink",{attrs:{to:"/specifications/text/0193-experimental-features.html#vector-store"}},[e._v("Vector store")])],1)])])]),e._v(" "),a("p",[e._v("The PATCH routes accept as payload a JSON object containing the same fields as in the response, with the following effects on the corresponding feature:")]),e._v(" "),a("ul",[a("li",[e._v("Setting a field to "),a("code",[e._v("true")]),e._v(" enables the feature.")]),e._v(" "),a("li",[e._v("Setting a field to "),a("code",[e._v("false")]),e._v(" disables the feature.")]),e._v(" "),a("li",[e._v("Setting a field to "),a("code",[e._v("null")]),e._v(" or omitting a field leaves its value unchanged.")])]),e._v(" "),a("h3",{attrs:{id:"_3-2-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-errors"}},[e._v("#")]),e._v(" 3.2 Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#bad_request"}},[a("code",[e._v("bad_request")])]),e._v(" for unknown fields in the payload or whenever a field is not a boolean.")],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("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("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/63.39c14cc1.js b/docs/assets/js/63.d21ecbad.js similarity index 99% rename from docs/assets/js/63.39c14cc1.js rename to docs/assets/js/63.d21ecbad.js index 144a530d0..0b9e6554a 100644 --- a/docs/assets/js/63.39c14cc1.js +++ b/docs/assets/js/63.d21ecbad.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[63],{487: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],{486: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.23b1d627.js similarity index 99% rename from docs/assets/js/65.cb3ec6ff.js rename to docs/assets/js/65.23b1d627.js index 50dd544c4..c5026c977 100644 --- a/docs/assets/js/65.cb3ec6ff.js +++ b/docs/assets/js/65.23b1d627.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],{491: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/66.74682a96.js b/docs/assets/js/66.0c66d056.js similarity index 99% rename from docs/assets/js/66.74682a96.js rename to docs/assets/js/66.0c66d056.js index b17f71cb8..660d61e91 100644 --- a/docs/assets/js/66.74682a96.js +++ b/docs/assets/js/66.0c66d056.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[66],{490: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:"task-queue-webhook"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#task-queue-webhook"}},[t._v("#")]),t._v(" Task queue webhook")]),t._v(" "),e("h2",{attrs:{id:"_1-summary"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),e("p",[t._v("Describe the usage of a webhook URL that will be called whenever a task finishes so a third party can be notified.\nIt is used to compute some of the required metrics for the Monitoring Metrics v1 project. Heavily related to the\nformat of the "),e("RouterLink",{attrs:{to:"/text/0060-tasks-api.html#fully-qualified-task-object"}},[e("code",[t._v("tasks")])]),t._v(".")],1),t._v(" "),e("h2",{attrs:{id:"_2-motivation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),e("p",[t._v("It'll give users the possibility to wait on task completion "),e("em",[t._v("without")]),t._v(" having to poll meilisearch over and over again.\nThis heavily reduces the network congestion and will allow us to compute the different metrics/ charts needed for the\n[Monitoring Metrics v1](https://www.notion.so/ Monitoring-Metrics-v1-4782d56795c043799dde33309e73a20f? pvs=21) project\nthat is related to the tasks queue ("),e("em",[t._v("Indexing latency, tasks operations")]),t._v("), we need to receive task information on the\ncloud stack.")]),t._v(" "),e("h2",{attrs:{id:"_3-functional-specification"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),e("h3",{attrs:{id:"_3-1-summary-key-points"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-summary-key-points"}},[t._v("#")]),t._v(" 3.1. Summary Key Points")]),t._v(" "),e("ul",[e("li",[t._v("The webhook URL is configured either via the env var "),e("code",[t._v("MEILI_TASK_WEBHOOK_URL")]),t._v(" or via the CLI option flag "),e("code",[t._v("--task-webhook-url")]),t._v(" "),e("ul",[e("li",[t._v("By default, the webhook URL value is empty.")]),t._v(" "),e("li",[t._v("If the given value does not match a valid URL format, a human-readable error is returned to the user, and the engine does not start.")]),t._v(" "),e("li",[t._v("A valid user-provided URL is kept as is.")]),t._v(" "),e("li",[t._v("You can optionally set an Authorization header by using the "),e("code",[t._v("--task-webhook-authorization-header")]),t._v(" CLI option flag or via the "),e("code",[t._v("MEILI_TASK_WEBHOOK_AUTHORIZATION_HEADER")]),t._v(" env var.")])])]),t._v(" "),e("li",[t._v("When a valid webhook URL is configured and when a batch of tasks reaches a finished status ("),e("code",[t._v("status: succeeded/failed")]),t._v("), the engine sends a "),e("code",[t._v("POST")]),t._v(" request to the user-configured webhook URL. The HTTP request contains the finished tasks in its payload.\n"),e("ul",[e("li",[t._v("The sent payload is compressed with gzip and represented in the JSON Lines text format.")])])]),t._v(" "),e("li",[t._v("A task sent over the webhook URL matches the "),e("a",{attrs:{href:"https://github.com/meilisearch/specifications/blob/main/text/0060-tasks-api.md#1-task-object-definition",target:"_blank",rel:"noopener noreferrer"}},[t._v("task object definition"),e("OutboundLink")],1),t._v(".")]),t._v(" "),e("li",[t._v("If an error is encountered while sending the payload to the URL, Meilisearch logs it but does not stop processing tasks.")]),t._v(" "),e("li",[t._v("Payload example\n"),e("ul",[e("li",[t._v("In that case, the user configured "),e("code",[t._v("https://myproject.com/mywebhook?common=people")])])])])]),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 comment"}},[t._v("//POST HTTP request to https://myproject.com/mywebhook?common=people")]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("4")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movie"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"failed"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"indexDeletion"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"details.deletedDocuments"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error.message"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Index `movie` not found."')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error.code"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"index_not_found"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error.type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error.link"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#index_not_found"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"duration"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"PT0.001192S"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-08-04T12:28:15.159167Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"startedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-08-04T12:28:15.161996Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"finishedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-08-04T12:28:15.163188Z"')]),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 property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("5")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movie"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"failed"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"indexDeletion"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"details.deletedDocuments"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error.message"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Index `movie` not found."')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error.code"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"index_not_found"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error.type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error.link"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#index_not_found"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"duration"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"PT0.001192S"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-08-04T12:28:15.159167Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"startedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-08-04T12:28:15.161996Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"finishedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-08-04T12:28:15.163188Z"')]),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 property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("6")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movie"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"failed"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"indexDeletion"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"details.deletedDocuments"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error.message"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Index `movie` not found."')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error.code"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"index_not_found"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error.type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error.link"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#index_not_found"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"duration"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"PT0.001192S"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-08-04T12:28:15.159167Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"startedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-08-04T12:28:15.161996Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"finishedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-08-04T12:28:15.163188Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("hr"),t._v(" "),e("h3",{attrs:{id:"_3-1-cli-definition"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-cli-definition"}},[t._v("#")]),t._v(" 3.1. CLI Definition")]),t._v(" "),e("p",[t._v("You can find the CLI information about the webhook "),e("RouterLink",{attrs:{to:"/text/0119-instance-options.html"}},[t._v("here")])],1),t._v(" "),e("h2",{attrs:{id:"_4-technical-aspects"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-aspects"}},[t._v("#")]),t._v(" 4. Technical Aspects")]),t._v(" "),e("h3",{attrs:{id:"_4-1-sending-a-batch"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-sending-a-batch"}},[t._v("#")]),t._v(" 4.1. Sending a batch")]),t._v(" "),e("p",[t._v("While a batch is being sent, the scheduler won't process a new batch until the webhook accepts the payload.")]),t._v(" "),e("h2",{attrs:{id:"_5-future-possibilities"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[t._v("#")]),t._v(" 5. Future Possibilities")]),t._v(" "),e("ul",[e("li",[t._v("Let users subscribe to a webhook to specific indexes or tasks instead of providing one global hook for everyone.")]),t._v(" "),e("li",[t._v("Let users update the URL of their webhook at runtime.")]),t._v(" "),e("li",[t._v("Stops blocking the processing of new tasks while we're sending a payload.")])])])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[66],{489: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:"task-queue-webhook"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#task-queue-webhook"}},[t._v("#")]),t._v(" Task queue webhook")]),t._v(" "),e("h2",{attrs:{id:"_1-summary"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),e("p",[t._v("Describe the usage of a webhook URL that will be called whenever a task finishes so a third party can be notified.\nIt is used to compute some of the required metrics for the Monitoring Metrics v1 project. Heavily related to the\nformat of the "),e("RouterLink",{attrs:{to:"/text/0060-tasks-api.html#fully-qualified-task-object"}},[e("code",[t._v("tasks")])]),t._v(".")],1),t._v(" "),e("h2",{attrs:{id:"_2-motivation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),e("p",[t._v("It'll give users the possibility to wait on task completion "),e("em",[t._v("without")]),t._v(" having to poll meilisearch over and over again.\nThis heavily reduces the network congestion and will allow us to compute the different metrics/ charts needed for the\n[Monitoring Metrics v1](https://www.notion.so/ Monitoring-Metrics-v1-4782d56795c043799dde33309e73a20f? pvs=21) project\nthat is related to the tasks queue ("),e("em",[t._v("Indexing latency, tasks operations")]),t._v("), we need to receive task information on the\ncloud stack.")]),t._v(" "),e("h2",{attrs:{id:"_3-functional-specification"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),e("h3",{attrs:{id:"_3-1-summary-key-points"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-summary-key-points"}},[t._v("#")]),t._v(" 3.1. Summary Key Points")]),t._v(" "),e("ul",[e("li",[t._v("The webhook URL is configured either via the env var "),e("code",[t._v("MEILI_TASK_WEBHOOK_URL")]),t._v(" or via the CLI option flag "),e("code",[t._v("--task-webhook-url")]),t._v(" "),e("ul",[e("li",[t._v("By default, the webhook URL value is empty.")]),t._v(" "),e("li",[t._v("If the given value does not match a valid URL format, a human-readable error is returned to the user, and the engine does not start.")]),t._v(" "),e("li",[t._v("A valid user-provided URL is kept as is.")]),t._v(" "),e("li",[t._v("You can optionally set an Authorization header by using the "),e("code",[t._v("--task-webhook-authorization-header")]),t._v(" CLI option flag or via the "),e("code",[t._v("MEILI_TASK_WEBHOOK_AUTHORIZATION_HEADER")]),t._v(" env var.")])])]),t._v(" "),e("li",[t._v("When a valid webhook URL is configured and when a batch of tasks reaches a finished status ("),e("code",[t._v("status: succeeded/failed")]),t._v("), the engine sends a "),e("code",[t._v("POST")]),t._v(" request to the user-configured webhook URL. The HTTP request contains the finished tasks in its payload.\n"),e("ul",[e("li",[t._v("The sent payload is compressed with gzip and represented in the JSON Lines text format.")])])]),t._v(" "),e("li",[t._v("A task sent over the webhook URL matches the "),e("a",{attrs:{href:"https://github.com/meilisearch/specifications/blob/main/text/0060-tasks-api.md#1-task-object-definition",target:"_blank",rel:"noopener noreferrer"}},[t._v("task object definition"),e("OutboundLink")],1),t._v(".")]),t._v(" "),e("li",[t._v("If an error is encountered while sending the payload to the URL, Meilisearch logs it but does not stop processing tasks.")]),t._v(" "),e("li",[t._v("Payload example\n"),e("ul",[e("li",[t._v("In that case, the user configured "),e("code",[t._v("https://myproject.com/mywebhook?common=people")])])])])]),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 comment"}},[t._v("//POST HTTP request to https://myproject.com/mywebhook?common=people")]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("4")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movie"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"failed"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"indexDeletion"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"details.deletedDocuments"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error.message"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Index `movie` not found."')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error.code"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"index_not_found"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error.type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error.link"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#index_not_found"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"duration"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"PT0.001192S"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-08-04T12:28:15.159167Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"startedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-08-04T12:28:15.161996Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"finishedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-08-04T12:28:15.163188Z"')]),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 property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("5")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movie"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"failed"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"indexDeletion"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"details.deletedDocuments"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error.message"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Index `movie` not found."')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error.code"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"index_not_found"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error.type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error.link"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#index_not_found"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"duration"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"PT0.001192S"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-08-04T12:28:15.159167Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"startedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-08-04T12:28:15.161996Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"finishedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-08-04T12:28:15.163188Z"')]),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 property"}},[t._v('"uid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("6")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movie"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"failed"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"indexDeletion"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"canceledBy"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"details.deletedDocuments"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error.message"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Index `movie` not found."')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error.code"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"index_not_found"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error.type"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"error.link"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#index_not_found"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"duration"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"PT0.001192S"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enqueuedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-08-04T12:28:15.159167Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"startedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-08-04T12:28:15.161996Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"finishedAt"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-08-04T12:28:15.163188Z"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),e("hr"),t._v(" "),e("h3",{attrs:{id:"_3-1-cli-definition"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-cli-definition"}},[t._v("#")]),t._v(" 3.1. CLI Definition")]),t._v(" "),e("p",[t._v("You can find the CLI information about the webhook "),e("RouterLink",{attrs:{to:"/text/0119-instance-options.html"}},[t._v("here")])],1),t._v(" "),e("h2",{attrs:{id:"_4-technical-aspects"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-aspects"}},[t._v("#")]),t._v(" 4. Technical Aspects")]),t._v(" "),e("h3",{attrs:{id:"_4-1-sending-a-batch"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-sending-a-batch"}},[t._v("#")]),t._v(" 4.1. Sending a batch")]),t._v(" "),e("p",[t._v("While a batch is being sent, the scheduler won't process a new batch until the webhook accepts the payload.")]),t._v(" "),e("h2",{attrs:{id:"_5-future-possibilities"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[t._v("#")]),t._v(" 5. Future Possibilities")]),t._v(" "),e("ul",[e("li",[t._v("Let users subscribe to a webhook to specific indexes or tasks instead of providing one global hook for everyone.")]),t._v(" "),e("li",[t._v("Let users update the URL of their webhook at runtime.")]),t._v(" "),e("li",[t._v("Stops blocking the processing of new tasks while we're sending a payload.")])])])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/67.6322aeae.js b/docs/assets/js/67.0aad035d.js similarity index 99% rename from docs/assets/js/67.6322aeae.js rename to docs/assets/js/67.0aad035d.js index 3a97abe32..fbeb1595f 100644 --- a/docs/assets/js/67.6322aeae.js +++ b/docs/assets/js/67.0aad035d.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],{490: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/8.46d0376f.js b/docs/assets/js/8.e63f62a9.js similarity index 94% rename from docs/assets/js/8.46d0376f.js rename to docs/assets/js/8.e63f62a9.js index 9661aac73..a7516d648 100644 --- a/docs/assets/js/8.46d0376f.js +++ b/docs/assets/js/8.e63f62a9.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{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("h1",{attrs:{id:"meilisearch-specification"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#meilisearch-specification"}},[e._v("#")]),e._v(" Meilisearch specification")]),e._v(" "),i("p",[e._v("This website help the navigation of the "),i("a",{attrs:{href:"https://github.com/meilisearch/specifications/",target:"_blank",rel:"noopener noreferrer"}},[e._v("specification"),i("OutboundLink")],1),e._v(" repository:")]),e._v(" "),i("ul",[i("li",[e._v("it has been built around the "),i("a",{attrs:{href:"https://github.com/meilisearch/specifications/tree/main",target:"_blank",rel:"noopener noreferrer"}},[i("code",[e._v("main")]),i("OutboundLink")],1),e._v(" branch of the specifications.")]),e._v(" "),i("li",[e._v("it's updated every day at 12PM and deployed via GitHub Pages.")])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{432: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("h1",{attrs:{id:"meilisearch-specification"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#meilisearch-specification"}},[e._v("#")]),e._v(" Meilisearch specification")]),e._v(" "),i("p",[e._v("This website help the navigation of the "),i("a",{attrs:{href:"https://github.com/meilisearch/specifications/",target:"_blank",rel:"noopener noreferrer"}},[e._v("specification"),i("OutboundLink")],1),e._v(" repository:")]),e._v(" "),i("ul",[i("li",[e._v("it has been built around the "),i("a",{attrs:{href:"https://github.com/meilisearch/specifications/tree/main",target:"_blank",rel:"noopener noreferrer"}},[i("code",[e._v("main")]),i("OutboundLink")],1),e._v(" branch of the specifications.")]),e._v(" "),i("li",[e._v("it's updated every day at 12PM and deployed via GitHub Pages.")])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/9.980fc650.js b/docs/assets/js/9.0c014273.js similarity index 95% rename from docs/assets/js/9.980fc650.js rename to docs/assets/js/9.0c014273.js index ec9d4b1f2..8747e61ff 100644 --- a/docs/assets/js/9.980fc650.js +++ b/docs/assets/js/9.0c014273.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{432:function(t,e,o){"use strict";o.r(e);var n=o(62),i=Object(n.a)({},(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[o("p",[t._v("MIT License")]),t._v(" "),o("p",[t._v("Copyright (c) 2019-2020 Meili SAS")]),t._v(" "),o("p",[t._v('Permission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:')]),t._v(" "),o("p",[t._v("The above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.")]),t._v(" "),o("p",[t._v('THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.')])])}),[],!1,null,null,null);e.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{433:function(t,e,o){"use strict";o.r(e);var n=o(62),i=Object(n.a)({},(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[o("p",[t._v("MIT License")]),t._v(" "),o("p",[t._v("Copyright (c) 2019-2020 Meili SAS")]),t._v(" "),o("p",[t._v('Permission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:')]),t._v(" "),o("p",[t._v("The above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.")]),t._v(" "),o("p",[t._v('THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.')])])}),[],!1,null,null,null);e.default=i.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/app.95608e41.js b/docs/assets/js/app.d9c7382b.js similarity index 78% rename from docs/assets/js/app.95608e41.js rename to docs/assets/js/app.d9c7382b.js index 370916a3f..256db508e 100644 --- a/docs/assets/js/app.95608e41.js +++ b/docs/assets/js/app.d9c7382b.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 d191a6707..5c4859bf5 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 5ae75d032..c34f3371f 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 e77c1e8db..b8f4aff28 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 fa5d03d93..9630df66f 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 899512672..2c04ac4b4 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 1a81c286b..3258347b2 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 d1b5768e5..c455a562b 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 45e01cfdc..fc16d1b94 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 d2dcc08d7..39fb2161c 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 78fb6872d..bea961d5a 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 5748ba74a..3d94951e6 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 c5b1f347f..f3a69461e 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 af1153cf8..cc6a94a48 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 83798a81c..2ab7f5328 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 da58dcdcc..a2a903bc8 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 40fb56707..d7a0c7592 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 a8b7d8185..b17b53897 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 009d29f41..4c8c3ba02 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 d5b5a69e0..8034c2a49 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 15f7af14a..bfc1e74fd 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 64388ebf7..581b86e0b 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 a5f49a79a..e1c1fa52a 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 a76b64c7f..99d94a6fe 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 9cf0f66c3..cb0dc03b4 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 fbafeb087..e8ba2b054 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 4db96dbe7..0018220a4 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 b36a49ffc..b19bc1919 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 35781c435..c16091dc9 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 104f250aa..1c9ad2985 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 b4988673e..712f2cc9a 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 3cbb09fb8..f460877f6 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 74f7c09c3..6fd053210 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 342f98db2..a135031bc 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 7c8e4c1bc..fe10ebce0 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 83ec5a5e4..86bb060bf 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 eb62652b4..446e2c5e0 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 3e1988f2f..6674251c0 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 bcab2fb72..74a8c5dc7 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 d20ea913f..fdd827c78 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 3d2e8eb8d..9a931c786 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 458f71292..90fd64398 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 9eebee62a..9cd3ab211 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 0d128ed8a..43b1d99ac 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 3a554048d..127b307cc 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 9a20b1634..1c67390db 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 db53c1eee..2821bebdd 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 b01f2afca..0e70f5c1f 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 e01938b91..7e5015d5f 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 2c5bf633d..b3b3a2249 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 eb780b719..c3719f9da 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 156c1a3c4..756b8eeaf 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 fd54e1e7d..c2ea09f8a 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 8ad813629..531796547 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 28951bab3..e23595aff 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 046a2ddd4..b5c71721b 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 3f91949c7..a33ef54d4 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 01bffe34a..45f322555 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 db2df21ea..63e1324a3 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 a1f8d84a0..80ded23c5 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 8406fba21..519a214a0 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 @@

- +