From e6cd1e4b807a6f3b0e21974b14d36b65a1ff1292 Mon Sep 17 00:00:00 2001 From: meili-bot <74670311+meili-bot@users.noreply.github.com> Date: Fri, 4 Oct 2024 12:05:49 +0000 Subject: [PATCH] update the website according to the specs --- docs/404.html | 4 ++-- docs/assets/js/{10.c664e5e6.js => 10.4bb9eeac.js} | 2 +- docs/assets/js/{11.7b4d52ff.js => 11.16951e4b.js} | 2 +- docs/assets/js/{12.03671aca.js => 12.31781feb.js} | 2 +- docs/assets/js/{13.5ee4202d.js => 13.167021d3.js} | 2 +- docs/assets/js/{14.dda8b7ef.js => 14.9305fa09.js} | 2 +- docs/assets/js/{15.3f1414b9.js => 15.095125b3.js} | 2 +- docs/assets/js/{16.a7c6842a.js => 16.8f686f44.js} | 2 +- docs/assets/js/{17.052e3dd6.js => 17.2bfcfa03.js} | 2 +- docs/assets/js/{18.145cf324.js => 18.bee2a3a1.js} | 2 +- docs/assets/js/{19.9e814d58.js => 19.455f3c41.js} | 2 +- docs/assets/js/{20.9f9509a9.js => 20.fb03e236.js} | 2 +- docs/assets/js/{21.01b56736.js => 21.5d4e271d.js} | 2 +- docs/assets/js/{22.a9f2f84c.js => 22.d2a0a444.js} | 2 +- docs/assets/js/{25.686e52de.js => 25.96849fe5.js} | 2 +- docs/assets/js/{27.07dfbf7c.js => 27.178e5c36.js} | 2 +- docs/assets/js/{28.8111d4f5.js => 28.d2c2cee7.js} | 2 +- docs/assets/js/{30.704af26a.js => 30.ffe8feb9.js} | 2 +- docs/assets/js/{31.7ce04ec7.js => 31.eed11757.js} | 2 +- docs/assets/js/{34.1ae80f5b.js => 34.c87f6484.js} | 2 +- docs/assets/js/{36.db871ac4.js => 36.29ef85a1.js} | 2 +- docs/assets/js/{39.3ffdfa45.js => 39.f053b747.js} | 2 +- docs/assets/js/{40.d13ddf5a.js => 40.d64a9add.js} | 2 +- docs/assets/js/{41.65027914.js => 41.aad3d1ae.js} | 2 +- docs/assets/js/{42.0ada06ba.js => 42.dc101efb.js} | 2 +- docs/assets/js/{43.4bb7d0b6.js => 43.00df8636.js} | 2 +- docs/assets/js/{44.437489b6.js => 44.7f7f2a04.js} | 2 +- docs/assets/js/{46.7f495a96.js => 46.28bc0390.js} | 2 +- docs/assets/js/{47.bf881f32.js => 47.49c151b7.js} | 2 +- docs/assets/js/{49.ed10170c.js => 49.b53c1109.js} | 2 +- docs/assets/js/{51.a5cea8ee.js => 51.2eb15273.js} | 2 +- docs/assets/js/{52.55ac3382.js => 52.0681cb16.js} | 2 +- docs/assets/js/{53.f57a89e9.js => 53.d16d1983.js} | 2 +- docs/assets/js/{54.70550584.js => 54.c149ca97.js} | 2 +- docs/assets/js/{56.dfe45e94.js => 56.a3d19c35.js} | 2 +- docs/assets/js/{57.8d52478a.js => 57.ab2e1909.js} | 2 +- docs/assets/js/{58.ad106d10.js => 58.b103820c.js} | 2 +- docs/assets/js/{59.4fac32dd.js => 59.a3757b9e.js} | 2 +- docs/assets/js/{60.5e7d293f.js => 60.df174b2b.js} | 2 +- docs/assets/js/{61.556679de.js => 61.6a669f3a.js} | 2 +- docs/assets/js/{64.53965336.js => 64.e6f9b837.js} | 2 +- docs/assets/js/{65.509d9e2e.js => 65.3c3fb2ee.js} | 2 +- docs/assets/js/{66.74682a96.js => 66.0c66d056.js} | 2 +- docs/assets/js/{9.65656e78.js => 9.0c014273.js} | 2 +- docs/assets/js/{app.abbf05fd.js => app.06ecc07e.js} | 4 ++-- docs/index.html | 4 ++-- docs/specifications/LICENSE.html | 4 ++-- docs/specifications/index.html | 4 ++-- docs/specifications/pull_request_template.html | 4 ++-- docs/specifications/text/0000-specification-template.html | 4 ++-- docs/specifications/text/0001-frontend-disable-prod.html | 4 ++-- docs/specifications/text/0001-script-based-tokenizer.html | 4 ++-- docs/specifications/text/0028-indexing-csv.html | 4 ++-- docs/specifications/text/0029-indexing-ndjson.html | 4 ++-- docs/specifications/text/0032-distinct-attribute.html | 4 ++-- docs/specifications/text/0033-logging.html | 4 ++-- docs/specifications/text/0034-telemetry-policies.html | 4 ++-- .../text/0038-rename-attributes-for-faceting.html | 4 ++-- docs/specifications/text/0043-phrase-query.html | 4 ++-- .../0047-reset-stop-words-synonyms-settings-with-null.html | 4 ++-- docs/specifications/text/0048-rename-max-mdb-size-var.html | 4 ++-- docs/specifications/text/0055-sort.html | 4 ++-- docs/specifications/text/0059-geo-search.html | 4 ++-- docs/specifications/text/0060-tasks-api.html | 4 ++-- .../text/0061-error-format-and-definitions.html | 4 ++-- docs/specifications/text/0077-words-position-limit.html | 4 ++-- docs/specifications/text/0085-api-keys.html | 4 ++-- docs/specifications/text/0089-tenant-tokens.html | 4 ++-- docs/specifications/text/0096-auto-batching.html | 4 ++-- docs/specifications/text/0105-dumps-api.html | 4 ++-- docs/specifications/text/0117-typo-tolerance-setting-api.html | 4 ++-- docs/specifications/text/0118-search-api.html | 4 ++-- docs/specifications/text/0119-instance-options.html | 4 ++-- docs/specifications/text/0121-data-types.html | 4 ++-- .../text/0123-displayed-attributes-setting-api.html | 4 ++-- .../text/0123-distinct-attribute-setting-api.html | 4 ++-- .../text/0123-filterable-attributes-setting-api.html | 4 ++-- docs/specifications/text/0123-proximity-precision.html | 4 ++-- docs/specifications/text/0123-ranking-rules-setting-api.html | 4 ++-- .../text/0123-searchable-attributes-setting-api.html | 4 ++-- docs/specifications/text/0123-separators-settings-api.html | 4 ++-- docs/specifications/text/0123-settings-api.html | 4 ++-- .../text/0123-sortable-attributes-setting-api.html | 4 ++-- docs/specifications/text/0123-stop-words-setting-api.html | 4 ++-- docs/specifications/text/0123-synonyms-setting-api.html | 4 ++-- .../text/0123-user-dictionary-settings-api.html | 4 ++-- docs/specifications/text/0124-documents-api.html | 4 ++-- docs/specifications/text/0132-indexes-api.html | 4 ++-- docs/specifications/text/0134-stats-api.html | 4 ++-- docs/specifications/text/0135-indexing-json.html | 4 ++-- docs/specifications/text/0136-documents-soft-deletion.html | 4 ++-- docs/specifications/text/0171-version-api.html | 4 ++-- docs/specifications/text/0172-health-api.html | 4 ++-- docs/specifications/text/0174-metrics-api.html | 4 ++-- docs/specifications/text/0178-compression-headers.html | 4 ++-- docs/specifications/text/0185-configuration-file.html | 4 ++-- docs/specifications/text/0191-swap-indexes-api.html | 4 ++-- docs/specifications/text/0192-multi-search-api.html | 4 ++-- docs/specifications/text/0193-experimental-features.html | 4 ++-- docs/specifications/text/0194-experimental-feature-api.html | 4 ++-- docs/specifications/text/0195-ranking-score.html | 4 ++-- docs/specifications/text/0246-facet-search-api.html | 4 ++-- docs/specifications/text/0258-snapshots-api.html | 4 ++-- docs/specifications/text/0262-task-queue-webhook.html | 4 ++-- docs/specifications/text/157-faceting-setting-api.html | 4 ++-- docs/specifications/text/157-pagination-setting-api.html | 4 ++-- 106 files changed, 169 insertions(+), 169 deletions(-) rename docs/assets/js/{10.c664e5e6.js => 10.4bb9eeac.js} (99%) rename docs/assets/js/{11.7b4d52ff.js => 11.16951e4b.js} (97%) rename docs/assets/js/{12.03671aca.js => 12.31781feb.js} (94%) rename docs/assets/js/{13.5ee4202d.js => 13.167021d3.js} (98%) rename docs/assets/js/{14.dda8b7ef.js => 14.9305fa09.js} (99%) rename docs/assets/js/{15.3f1414b9.js => 15.095125b3.js} (99%) rename docs/assets/js/{16.a7c6842a.js => 16.8f686f44.js} (99%) rename docs/assets/js/{17.052e3dd6.js => 17.2bfcfa03.js} (99%) rename docs/assets/js/{18.145cf324.js => 18.bee2a3a1.js} (99%) rename docs/assets/js/{19.9e814d58.js => 19.455f3c41.js} (99%) rename docs/assets/js/{20.9f9509a9.js => 20.fb03e236.js} (99%) rename docs/assets/js/{21.01b56736.js => 21.5d4e271d.js} (99%) rename docs/assets/js/{22.a9f2f84c.js => 22.d2a0a444.js} (98%) rename docs/assets/js/{25.686e52de.js => 25.96849fe5.js} (99%) rename docs/assets/js/{27.07dfbf7c.js => 27.178e5c36.js} (99%) rename docs/assets/js/{28.8111d4f5.js => 28.d2c2cee7.js} (98%) rename docs/assets/js/{30.704af26a.js => 30.ffe8feb9.js} (99%) rename docs/assets/js/{31.7ce04ec7.js => 31.eed11757.js} (99%) rename docs/assets/js/{34.1ae80f5b.js => 34.c87f6484.js} (99%) rename docs/assets/js/{36.db871ac4.js => 36.29ef85a1.js} (99%) rename docs/assets/js/{39.3ffdfa45.js => 39.f053b747.js} (99%) rename docs/assets/js/{40.d13ddf5a.js => 40.d64a9add.js} (99%) rename docs/assets/js/{41.65027914.js => 41.aad3d1ae.js} (99%) rename docs/assets/js/{42.0ada06ba.js => 42.dc101efb.js} (99%) rename docs/assets/js/{43.4bb7d0b6.js => 43.00df8636.js} (99%) rename docs/assets/js/{44.437489b6.js => 44.7f7f2a04.js} (99%) rename docs/assets/js/{46.7f495a96.js => 46.28bc0390.js} (99%) rename docs/assets/js/{47.bf881f32.js => 47.49c151b7.js} (99%) rename docs/assets/js/{49.ed10170c.js => 49.b53c1109.js} (99%) rename docs/assets/js/{51.a5cea8ee.js => 51.2eb15273.js} (99%) rename docs/assets/js/{52.55ac3382.js => 52.0681cb16.js} (99%) rename docs/assets/js/{53.f57a89e9.js => 53.d16d1983.js} (98%) rename docs/assets/js/{54.70550584.js => 54.c149ca97.js} (99%) rename docs/assets/js/{56.dfe45e94.js => 56.a3d19c35.js} (99%) rename docs/assets/js/{57.8d52478a.js => 57.ab2e1909.js} (98%) rename docs/assets/js/{58.ad106d10.js => 58.b103820c.js} (99%) rename docs/assets/js/{59.4fac32dd.js => 59.a3757b9e.js} (99%) rename docs/assets/js/{60.5e7d293f.js => 60.df174b2b.js} (99%) rename docs/assets/js/{61.556679de.js => 61.6a669f3a.js} (99%) rename docs/assets/js/{64.53965336.js => 64.e6f9b837.js} (99%) rename docs/assets/js/{65.509d9e2e.js => 65.3c3fb2ee.js} (99%) rename docs/assets/js/{66.74682a96.js => 66.0c66d056.js} (99%) rename docs/assets/js/{9.65656e78.js => 9.0c014273.js} (95%) rename docs/assets/js/{app.abbf05fd.js => app.06ecc07e.js} (76%) diff --git a/docs/404.html b/docs/404.html index 81525d13e..ef09fc73e 100644 --- a/docs/404.html +++ b/docs/404.html @@ -8,13 +8,13 @@ - +

404

That's a Four-Oh-Four.
Take me home.
- + diff --git a/docs/assets/js/10.c664e5e6.js b/docs/assets/js/10.4bb9eeac.js similarity index 99% rename from docs/assets/js/10.c664e5e6.js rename to docs/assets/js/10.4bb9eeac.js index f244650f4..503b653b1 100644 --- a/docs/assets/js/10.c664e5e6.js +++ b/docs/assets/js/10.4bb9eeac.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{437:function(e,t,a){"use strict";a.r(t);var i=a(62),s=Object(i.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"specifications-workflow"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#specifications-workflow"}},[e._v("#")]),e._v(" Specifications Workflow")]),e._v(" "),a("p",[e._v("This repository manages the specifications of the Meilisearch API. Specifications are meant to describe the expected behavior on a high level and point out identified corner cases.")]),e._v(" "),a("h2",{attrs:{id:"draft-state-create-a-new-pr"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#draft-state-create-a-new-pr"}},[e._v("#")]),e._v(" Draft State: Create a new PR")]),e._v(" "),a("p",[e._v("To start a new specification, a new branch must start")]),e._v(" "),a("ul",[a("li",[e._v("from "),a("code",[e._v("release-vX.X.X")]),e._v(" if the related changes are already planned for the release "),a("code",[e._v("vX.X.X")])]),e._v(" "),a("li",[e._v("from "),a("code",[e._v("main")]),e._v(" if you don't know in which release the changes will be integrated")])]),e._v(" "),a("p",[e._v("If a new specification file needs to be introduced, you must create a new file in "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/tree/main/text",target:"_blank",rel:"noopener noreferrer"}},[e._v("this folder"),a("OutboundLink")],1),e._v(" following the pattern: "),a("code",[e._v("PR_number-feature-name.md")]),e._v(". e.g. if PR number 12 is about facetting, the newly introduced specification file will be named "),a("code",[e._v("0012-facetting.md")]),e._v(".")]),e._v(" "),a("blockquote",[a("p",[e._v("Note that a pull request not strictly dealing about a specification conception will be tagged as "),a("code",[e._v("Not A Spec")]),e._v(". e.g. A pull-request updating this file will be tagged with the "),a("code",[e._v("Not A Spec")]),e._v(" label.")])]),e._v(" "),a("p",[e._v("The "),a("RouterLink",{attrs:{to:"/specifications/pull_request_template.html"}},[e._v("pull-request template")]),e._v(" must be filled in when the pull-request is created.")],1),e._v(" "),a("h2",{attrs:{id:"review-state"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#review-state"}},[e._v("#")]),e._v(" Review State")]),e._v(" "),a("p",[e._v("It's up to the maintainers of this repository to decide when the PR is ready to be reviewed and which persons should review it.")]),e._v(" "),a("p",[e._v("The PR must be tagged as "),a("code",[e._v("Ready For Review")]),e._v(" to enter this stage.")]),e._v(" "),a("p",[e._v("To be validated, it must be reviewed and approved by peers, ideally:")]),e._v(" "),a("ul",[a("li",[e._v("One person from the Engine team.")]),e._v(" "),a("li",[e._v("One person from the Integration team.")]),e._v(" "),a("li",[e._v("One person from the Documentation team.")])]),e._v(" "),a("h2",{attrs:{id:"merge-state"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#merge-state"}},[e._v("#")]),e._v(" Merge State")]),e._v(" "),a("p",[e._v("To be merged, a specification pull-request should follow the given rules:")]),e._v(" "),a("ul",[a("li",[e._v("It must be approved as described in the "),a("a",{attrs:{href:"#review-state"}},[e._v("Review State")]),e._v(" section.")]),e._v(" "),a("li",[e._v("The PR must point to the right "),a("code",[e._v("release-vX.X.X")]),e._v(" branch.")]),e._v(" "),a("li",[e._v("It must be tagged with:\n"),a("ul",[a("li",[e._v("A "),a("code",[e._v("vX.X.X")]),e._v(" tag indicating in which release the described changes will be introduced.")]),e._v(" "),a("li",[e._v("A "),a("code",[e._v("QX:YYYY")]),e._v(" tag indicating in which quarter and year the described changes will be introduced.")]),e._v(" "),a("li",[e._v("The "),a("code",[e._v("⚠ Breaking")]),e._v(" tag, if breaking changes are introduced.")]),e._v(" "),a("li",[e._v("The "),a("code",[e._v("Telemetry")]),e._v(" tag, if telemetry changes are introduced.")]),e._v(" "),a("li",[e._v("The "),a("code",[e._v("OpenAPI")]),e._v(" tag, if the "),a("a",{attrs:{href:"open-api.yaml"}},[e._v("open-api")]),e._v(" specification will see changes introduced.")])])])]),e._v(" "),a("hr"),e._v(" "),a("h1",{attrs:{id:"release-worfklow"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#release-worfklow"}},[e._v("#")]),e._v(" Release Worfklow")]),e._v(" "),a("p",[e._v("The following steps should happen the day a Meilisearch release is shipped:")]),e._v(" "),a("ul",[a("li",[e._v("Pull-requests describing changes for a release are squashed and merged into the corresponding "),a("code",[e._v("release-vX.X.X")]),e._v(" branch.")]),e._v(" "),a("li",[a("code",[e._v("release-vX.X.X")]),e._v(" is squashed and merged into "),a("code",[e._v("main")]),e._v(".")]),e._v(" "),a("li",[a("code",[e._v("open-api.yml")]),e._v(" version is deployed on bump.sh.")])]),e._v(" "),a("hr"),e._v(" "),a("h2",{attrs:{id:"specification-file-format"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#specification-file-format"}},[e._v("#")]),e._v(" Specification File Format")]),e._v(" "),a("p",[e._v("Meilisearch's feature specifications are made up of five sections, described below.")]),e._v(" "),a("h3",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("Summarize the specification with a short paragraph.")]),e._v(" "),a("h3",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[e._v("Explain which use cases are supported.")]),e._v(" "),a("h3",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("p",[e._v("This section gives a high level overview of the feature. It should avoid technical language so that it can be understood by a general audience (think user-level).")]),e._v(" "),a("ul",[a("li",[e._v("Describe the API resource and endpoints. (Methods, URL, query parameters, body definition, status code).")]),e._v(" "),a("li",[e._v("Explain the feature through examples.")]),e._v(" "),a("li",[e._v("List error cases.")])]),e._v(" "),a("h3",{attrs:{id:"_4-technical-details-optional"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details-optional"}},[e._v("#")]),e._v(" 4. Technical Details (Optional)")]),e._v(" "),a("p",[e._v('When needed, we recommend describing practical aspects of implementation, e.g. specific algorithmic choices. If none, fill the section body with "n/a".')]),e._v(" "),a("h3",{attrs:{id:"_5-future-possibilities-optional"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities-optional"}},[e._v("#")]),e._v(" 5. Future Possibilities (Optional)")]),e._v(" "),a("p",[e._v('This last section includes any related topics or features which are not currently in Meilisearch and will not be added now, but which may be explored in the future. If none, fill the section body with "n/a".')])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file +(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.7b4d52ff.js b/docs/assets/js/11.16951e4b.js similarity index 97% rename from docs/assets/js/11.7b4d52ff.js rename to docs/assets/js/11.16951e4b.js index 35bca0216..44d3bfae3 100644 --- a/docs/assets/js/11.7b4d52ff.js +++ b/docs/assets/js/11.16951e4b.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{433: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],{436:function(e,t,a){"use strict";a.r(t);var s=a(62),i=Object(s.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("p",[e._v("🤖 "),a("a",{attrs:{href:""}},[e._v("API Diff")]),e._v(" "),a("em",[e._v("Put the link of the GitHub comment generated by bump.sh if generated; Apply the "),a("code",[e._v("OpenApi")]),e._v(" label")])]),e._v(" "),a("hr"),e._v(" "),a("h1",{attrs:{id:"summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#summary"}},[e._v("#")]),e._v(" Summary")]),e._v(" "),a("p",[a("em",[e._v("Explain with a few sentences the goal of the specification")])]),e._v(" "),a("hr"),e._v(" "),a("h1",{attrs:{id:"changes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#changes"}},[e._v("#")]),e._v(" Changes")]),e._v(" "),a("p",[a("em",[e._v("Explain in a clear way the changes bring by the specification; Bullet points FTW;")])]),e._v(" "),a("h1",{attrs:{id:"out-of-scope"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#out-of-scope"}},[e._v("#")]),e._v(" Out Of Scope")]),e._v(" "),a("p",[a("em",[e._v("Explain in clear way subjects that are out of scope and shouldn't be discussed by the reviewers")])]),e._v(" "),a("hr"),e._v(" "),a("h1",{attrs:{id:"attention-to-reviewers"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#attention-to-reviewers"}},[e._v("#")]),e._v(" Attention To Reviewers")]),e._v(" "),a("p",[a("em",[e._v("Explain clearly what reviewers should specifically look for to facilitate the review phase. Also, mention the sections that will not necessarily be taken into account if reviewed.")])]),e._v(" "),a("hr"),e._v(" "),a("h2",{attrs:{id:"misc"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#misc"}},[e._v("#")]),e._v(" Misc")]),e._v(" "),a("ul",[a("li",[e._v("[] Update OpenAPI specification file "),a("em",[e._v("(if needed; Apply the "),a("code",[e._v("OpenApi")]),e._v(" label)")])]),e._v(" "),a("li",[e._v("[] Update telemetry datapoints "),a("em",[e._v("(if needed; Apply the "),a("code",[e._v("Telemetry")]),e._v(" label)")])])])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/12.03671aca.js b/docs/assets/js/12.31781feb.js similarity index 94% rename from docs/assets/js/12.03671aca.js rename to docs/assets/js/12.31781feb.js index 60f41a538..a70174535 100644 --- a/docs/assets/js/12.03671aca.js +++ b/docs/assets/js/12.31781feb.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{434: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],{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 diff --git a/docs/assets/js/13.5ee4202d.js b/docs/assets/js/13.167021d3.js similarity index 98% rename from docs/assets/js/13.5ee4202d.js rename to docs/assets/js/13.167021d3.js index 0edf1b5be..35948ded7 100644 --- a/docs/assets/js/13.5ee4202d.js +++ b/docs/assets/js/13.167021d3.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{436:function(e,t,i){"use strict";i.r(t);var a=i(62),r=Object(a.a)({},(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[i("ul",[i("li",[e._v("Title: Optional Meilisearch Front-end")]),e._v(" "),i("li",[e._v("Start Date: 2020/11/16")]),e._v(" "),i("li",[e._v("specification PR: #8")]),e._v(" "),i("li",[e._v("Meilisearch Issue: #411")])]),e._v(" "),i("h1",{attrs:{id:"optional-meilisearch-front-end"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#optional-meilisearch-front-end"}},[e._v("#")]),e._v(" Optional Meilisearch Front-end")]),e._v(" "),i("h2",{attrs:{id:"first-section-feature-description-and-interaction"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#first-section-feature-description-and-interaction"}},[e._v("#")]),e._v(" First section: Feature Description and Interaction")]),e._v(" "),i("h3",{attrs:{id:"summary"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#summary"}},[e._v("#")]),e._v(" Summary")]),e._v(" "),i("p",[e._v("For testing purposes, MeiliSearch is shipped with a frontend that is served at the server's root. This provides the user with a basic GUI to perform searches on his documents. While this is useful in a development environment, this is not necessarily desirable in a production environment. This specification proposes to remove this frontend in a production environment.")]),e._v(" "),i("h3",{attrs:{id:"motivation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#motivation"}},[e._v("#")]),e._v(" Motivation")]),e._v(" "),i("p",[e._v("This frontend was developed for testing purposes, therefore it should only be present in a development environment.")]),e._v(" "),i("h3",{attrs:{id:"prior-art-and-r-d"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#prior-art-and-r-d"}},[e._v("#")]),e._v(" Prior Art and R&D")]),e._v(" "),i("p",[e._v("N.A")]),e._v(" "),i("h3",{attrs:{id:"explanation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#explanation"}},[e._v("#")]),e._v(" Explanation")]),e._v(" "),i("p",[e._v("When the option "),i("code",[e._v("--env")]),e._v(" or "),i("code",[e._v("MEILI_ENV")]),e._v(" is set to "),i("code",[e._v("production")]),e._v(", the frontend is disabled.")]),e._v(" "),i("h3",{attrs:{id:"impact-on-documentation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#impact-on-documentation"}},[e._v("#")]),e._v(" Impact on documentation")]),e._v(" "),i("p",[e._v("Documentation needs to be updated in:")]),e._v(" "),i("ul",[i("li",[e._v("The "),i("a",{attrs:{href:"https://docs.meilisearch.com/guides/advanced_guides/configuration.html#environment",target:"_blank",rel:"noopener noreferrer"}},[e._v("environment documentation"),i("OutboundLink")],1)]),e._v(" "),i("li",[e._v("The "),i("a",{attrs:{href:"https://docs.meilisearch.com/guides/advanced_guides/web_interface.html#web-interface",target:"_blank",rel:"noopener noreferrer"}},[e._v("web interface documentation"),i("OutboundLink")],1)])]),e._v(" "),i("h2",{attrs:{id:"second-section-technical-specifications"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#second-section-technical-specifications"}},[e._v("#")]),e._v(" Second Section: Technical Specifications")]),e._v(" "),i("h3",{attrs:{id:"architecture"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#architecture"}},[e._v("#")]),e._v(" Architecture")]),e._v(" "),i("p",[e._v("N.A")]),e._v(" "),i("h3",{attrs:{id:"implementation-details"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#implementation-details"}},[e._v("#")]),e._v(" Implementation Details")]),e._v(" "),i("p",[e._v("Pass an argument to "),i("code",[e._v("create_app")]),e._v(" to conditionally enable the frontend service.")]),e._v(" "),i("h3",{attrs:{id:"corner-cases"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#corner-cases"}},[e._v("#")]),e._v(" Corner Cases")]),e._v(" "),i("p",[e._v("TDB")]),e._v(" "),i("h2",{attrs:{id:"third-section-future-possibilities"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#third-section-future-possibilities"}},[e._v("#")]),e._v(" Third Section: Future possibilities")]),e._v(" "),i("ul",[i("li",[e._v("Add an opt-in flag to re-enable the frontend in production environment, as suggested per "),i("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/8#issuecomment-729676988",target:"_blank",rel:"noopener noreferrer"}},[e._v("comment"),i("OutboundLink")],1)])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{437:function(e,t,i){"use strict";i.r(t);var a=i(62),r=Object(a.a)({},(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[i("ul",[i("li",[e._v("Title: Optional Meilisearch Front-end")]),e._v(" "),i("li",[e._v("Start Date: 2020/11/16")]),e._v(" "),i("li",[e._v("specification PR: #8")]),e._v(" "),i("li",[e._v("Meilisearch Issue: #411")])]),e._v(" "),i("h1",{attrs:{id:"optional-meilisearch-front-end"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#optional-meilisearch-front-end"}},[e._v("#")]),e._v(" Optional Meilisearch Front-end")]),e._v(" "),i("h2",{attrs:{id:"first-section-feature-description-and-interaction"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#first-section-feature-description-and-interaction"}},[e._v("#")]),e._v(" First section: Feature Description and Interaction")]),e._v(" "),i("h3",{attrs:{id:"summary"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#summary"}},[e._v("#")]),e._v(" Summary")]),e._v(" "),i("p",[e._v("For testing purposes, MeiliSearch is shipped with a frontend that is served at the server's root. This provides the user with a basic GUI to perform searches on his documents. While this is useful in a development environment, this is not necessarily desirable in a production environment. This specification proposes to remove this frontend in a production environment.")]),e._v(" "),i("h3",{attrs:{id:"motivation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#motivation"}},[e._v("#")]),e._v(" Motivation")]),e._v(" "),i("p",[e._v("This frontend was developed for testing purposes, therefore it should only be present in a development environment.")]),e._v(" "),i("h3",{attrs:{id:"prior-art-and-r-d"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#prior-art-and-r-d"}},[e._v("#")]),e._v(" Prior Art and R&D")]),e._v(" "),i("p",[e._v("N.A")]),e._v(" "),i("h3",{attrs:{id:"explanation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#explanation"}},[e._v("#")]),e._v(" Explanation")]),e._v(" "),i("p",[e._v("When the option "),i("code",[e._v("--env")]),e._v(" or "),i("code",[e._v("MEILI_ENV")]),e._v(" is set to "),i("code",[e._v("production")]),e._v(", the frontend is disabled.")]),e._v(" "),i("h3",{attrs:{id:"impact-on-documentation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#impact-on-documentation"}},[e._v("#")]),e._v(" Impact on documentation")]),e._v(" "),i("p",[e._v("Documentation needs to be updated in:")]),e._v(" "),i("ul",[i("li",[e._v("The "),i("a",{attrs:{href:"https://docs.meilisearch.com/guides/advanced_guides/configuration.html#environment",target:"_blank",rel:"noopener noreferrer"}},[e._v("environment documentation"),i("OutboundLink")],1)]),e._v(" "),i("li",[e._v("The "),i("a",{attrs:{href:"https://docs.meilisearch.com/guides/advanced_guides/web_interface.html#web-interface",target:"_blank",rel:"noopener noreferrer"}},[e._v("web interface documentation"),i("OutboundLink")],1)])]),e._v(" "),i("h2",{attrs:{id:"second-section-technical-specifications"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#second-section-technical-specifications"}},[e._v("#")]),e._v(" Second Section: Technical Specifications")]),e._v(" "),i("h3",{attrs:{id:"architecture"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#architecture"}},[e._v("#")]),e._v(" Architecture")]),e._v(" "),i("p",[e._v("N.A")]),e._v(" "),i("h3",{attrs:{id:"implementation-details"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#implementation-details"}},[e._v("#")]),e._v(" Implementation Details")]),e._v(" "),i("p",[e._v("Pass an argument to "),i("code",[e._v("create_app")]),e._v(" to conditionally enable the frontend service.")]),e._v(" "),i("h3",{attrs:{id:"corner-cases"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#corner-cases"}},[e._v("#")]),e._v(" Corner Cases")]),e._v(" "),i("p",[e._v("TDB")]),e._v(" "),i("h2",{attrs:{id:"third-section-future-possibilities"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#third-section-future-possibilities"}},[e._v("#")]),e._v(" Third Section: Future possibilities")]),e._v(" "),i("ul",[i("li",[e._v("Add an opt-in flag to re-enable the frontend in production environment, as suggested per "),i("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/8#issuecomment-729676988",target:"_blank",rel:"noopener noreferrer"}},[e._v("comment"),i("OutboundLink")],1)])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/14.dda8b7ef.js b/docs/assets/js/14.9305fa09.js similarity index 99% rename from docs/assets/js/14.dda8b7ef.js rename to docs/assets/js/14.9305fa09.js index 2fc51c0db..98e1ae9ca 100644 --- a/docs/assets/js/14.dda8b7ef.js +++ b/docs/assets/js/14.9305fa09.js @@ -1 +1 @@ -(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 +(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{438:function(t,s,a){"use strict";a.r(s);var n=a(62),e=Object(n.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("ul",[a("li",[t._v("Title: Script Based Tokenizer")]),t._v(" "),a("li",[t._v("Start Date: 2020-10-27")]),t._v(" "),a("li",[t._v("specification PR: meilisearch/specifications#2")]),t._v(" "),a("li",[t._v("Meilisearch Issue: meilisearch/Meilsearch#624")])]),t._v(" "),a("h2",{attrs:{id:"feature-description-and-interaction"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#feature-description-and-interaction"}},[t._v("#")]),t._v(" Feature Description and Interaction")]),t._v(" "),a("h3",{attrs:{id:"summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#summary"}},[t._v("#")]),t._v(" Summary")]),t._v(" "),a("p",[t._v("The first step of document indexing in the Meilisearch engine is tokenization. Tokenization is the action of taking a sentence and splitting it in units of language called tokens. The tokenization task is highly language dependant and is a critical factor in the quality of the search results.")]),t._v(" "),a("h3",{attrs:{id:"motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#motivation"}},[t._v("#")]),t._v(" Motivation")]),t._v(" "),a("p",[t._v("We want to provide our users with an always improved searching experience. For that matter, it is critical for us to improve the performance of our tokenizer, and to provide better support for multilingual tokenization.")]),t._v(" "),a("h3",{attrs:{id:"prior-art-and-r-d"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#prior-art-and-r-d"}},[t._v("#")]),t._v(" Prior Art and R&D")]),t._v(" "),a("p",[a("strong",[t._v("tokenization:")])]),t._v(" "),a("ul",[a("li",[a("blockquote",[a("p",[a("strong",[a("a",{attrs:{href:"https://github.com/unicode-rs/unicode-segmentation",target:"_blank",rel:"noopener noreferrer"}},[t._v("unicode-segmentation"),a("OutboundLink")],1),t._v(":")]),t._v("\ntokenizer which follow the "),a("a",{attrs:{href:"http://www.unicode.org/reports/tr29/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Standard Annex #29: Unicode Text Segmentation"),a("OutboundLink")],1),t._v(",\nthis tokenizer seems promising for Latin scripts.")])])]),t._v(" "),a("li",[a("blockquote",[a("p",[a("strong",[a("a",{attrs:{href:"https://github.com/messense/jieba-rs",target:"_blank",rel:"noopener noreferrer"}},[t._v("Jieba"),a("OutboundLink")],1),t._v(":")]),t._v("\ntokenizer specialized in Chinese languages")])])]),t._v(" "),a("li",[a("blockquote",[a("p",[a("strong",[a("a",{attrs:{href:"https://github.com/lindera-morphology/lindera",target:"_blank",rel:"noopener noreferrer"}},[t._v("Lindera"),a("OutboundLink")],1),t._v(":")]),t._v("\nJapanese and Korean")])])])]),t._v(" "),a("p",[a("strong",[t._v("lang/script detection:")])]),t._v(" "),a("ul",[a("li",[a("blockquote",[a("p",[a("strong",[a("a",{attrs:{href:"https://github.com/greyblake/whatlang-rs",target:"_blank",rel:"noopener noreferrer"}},[t._v("whatlang"),a("OutboundLink")],1),t._v(":")]),t._v("\nwhatlang is able to detect script or/and language in a text,\nlanguage detection is low but the script is acceptable.\nnote: Sonic also uses whatlang to perform the tokenization, it could be interesting to check out how they do it.")])])]),t._v(" "),a("li",[a("blockquote",[a("p",[a("strong",[t._v("toku (@qdequele):")]),t._v("\nin a R&D project, @qdequele was able to detect language based on stop word distribution in a text.\nIf, in a latin script, there is lot of French stop words then the text language is probably french.")])])])]),t._v(" "),a("p",[a("strong",[t._v("other solution that advertise multilingual support:")])]),t._v(" "),a("ul",[a("li",[t._v("Sonic uses whatlang to perform the tokenization, it could be interesting to checkout how they do it: https://github.com/valeriansaliou/sonic/tree/master/src/lexer\n"),a("ul",[a("li",[t._v("Sonic uses whatlang to detect the languages but doesn't actually seem to use it to segment the text. It simply uses unicode segmentation, I can't really explain what they actually do with the language information.")])])]),t._v(" "),a("li",[t._v("tantivy advertise good multilingual support: https://github.com/tantivy-search/tantivy/tree/main/src/tokenizer\n"),a("ul",[a("li",[t._v("Tantivy is similar to elastic in the sense that you can set up a custom text analyzer. The difference is that it is only made of "),a("code",[t._v("tokenizer")]),t._v(" -> "),a("code",[t._v("token_filter")]),t._v(". Tantivy also provides a collection of tokenizer to choose from. Tokens are rather simple and do not contain any metadata, except for their position.")])])]),t._v(" "),a("li",[t._v("How elastic search handle it: https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-tokenizers.html:\n"),a("ul",[a("li",[t._v("Elastic proposed to create custom text analyzer. A text analyzer is a pipelined text processor with the following components: "),a("code",[t._v("char_filter")]),t._v(" -> "),a("code",[t._v("tokenizer")]),t._v(" -> "),a("code",[t._v("token_filter")]),t._v(". There are multiple different tokenizers that can be chosen, depending on the use-case. This is a bit complicated, but I also think that advanced users should be able to choose the tokenizer they want. (default behavior is us guessing what's the best tokenizer to use.)")])])]),t._v(" "),a("li",[t._v("Algolia:\n"),a("ul",[a("li",[t._v("Algolia uses multiple techniques to handle tokenization. They start by "),a("a",{attrs:{href:"https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/",target:"_blank",rel:"noopener noreferrer"}},[t._v("normalizing"),a("OutboundLink")],1),t._v(" the text (lowercase, unidecode, transform traditional Chinese to modern, etc). Then, they tokenize the normalized data. It seems that the tokenization is based on two techniques. The first one is by "),a("a",{attrs:{href:"https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/",target:"_blank",rel:"noopener noreferrer"}},[t._v("defining separators"),a("OutboundLink")],1),t._v(" (space, comma, carriage return, etc) and the other one is with "),a("a",{attrs:{href:"https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#using-dictionaries",target:"_blank",rel:"noopener noreferrer"}},[t._v("dictionaries"),a("OutboundLink")],1),t._v(". The language is not automatically detected, "),a("a",{attrs:{href:"https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#no-automatic-language-detection",target:"_blank",rel:"noopener noreferrer"}},[t._v("it must be set by the user"),a("OutboundLink")],1),t._v(". They also have dictionaries for plurals.")])])])]),t._v(" "),a("h3",{attrs:{id:"explanation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#explanation"}},[t._v("#")]),t._v(" Explanation")]),t._v(" "),a("p",[t._v("In order to use the tokenizer, all the user has to do is to instantiate a "),a("code",[t._v("Tokenizer")]),t._v(", call "),a("code",[t._v("tokenize(&str)")]),t._v(" on it and iterate over the emitted tokens:")]),t._v(" "),a("div",{staticClass:"language-rust extra-class"},[a("pre",{pre:!0,attrs:{class:"language-rust"}},[a("code",[t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("use")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token namespace"}},[t._v("fst"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")])]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Set")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("use")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token namespace"}},[t._v("charabia"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")])]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenizerBuilder")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// text to tokenize.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" orig "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The quick (\\"brown\\") fox can\'t jump 32.3 feet, right? Brr, it\'s 29.3°F!"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// create the builder.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("mut")]),t._v(" builder "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenizerBuilder")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("new")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// create a set of stop words.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" stop_words "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Set")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("from_iter")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"the"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("iter")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("unwrap")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// configurate stop words.")]),t._v("\n builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("stop_words")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),t._v("stop_words"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// build the tokenizer passing the text to tokenize.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" tokenizer "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("build")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tokenize original string")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("mut")]),t._v(" tokens "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" tokenizer"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("tokenize")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("orig"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Token")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" lemma"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" kind"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" tokens"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("next")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("unwrap")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token macro property"}},[t._v("assert_eq!")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("lemma"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"the"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token macro property"}},[t._v("assert_eq!")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("kind"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenKind")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Word")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Token")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" lemma"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" kind"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" tokens"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("next")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("unwrap")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token macro property"}},[t._v("assert_eq!")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("lemma"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('" "')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token macro property"}},[t._v("assert_eq!")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("kind"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenKind")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Separator")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SeparatorKind")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Soft")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Token")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" lemma"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" kind"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" tokens"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("next")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("unwrap")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token macro property"}},[t._v("assert_eq!")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("lemma"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"quick"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token macro property"}},[t._v("assert_eq!")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("kind"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenKind")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Word")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("p",[t._v("The call to the tokenize method allows the reuse of the same "),a("code",[t._v("Tokenizer")]),t._v(" instance, and keep its configuration state and allocations.")]),t._v(" "),a("p",[t._v("Below are examples of the integration of the new tokenizer in existing code:")]),t._v(" "),a("ul",[a("li",[t._v("Highlight in @kerollmops milli:")])]),t._v(" "),a("div",{staticClass:"language-rust extra-class"},[a("pre",{pre:!0,attrs:{class:"language-rust"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// new tokenizer")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("fn")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function-definition function"}},[t._v("highlight_record")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("record"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("mut")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("IndexMap")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" words"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("HashSet")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// create the builder.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("mut")]),t._v(" builder "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenizerBuilder")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("new")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// create a set of stop words.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" stop_words "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Set")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("from_iter")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"the"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("iter")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("unwrap")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// configurate stop words.")]),t._v("\n builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("stop_words")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),t._v("stop_words"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// build the tokenizer passing the text to tokenize.")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" tokenizer "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("build")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("_key"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" record"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("iter_mut")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" old_value "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token namespace"}},[t._v("mem"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")])]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("take")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// reuse tokenizer at each iteration")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" tokens "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" tokenizer"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("reconstruct")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),t._v("old_value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("original"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" tokens "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("is_word")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" to_highlight "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" words"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("contains")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),t._v("token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("text")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" to_highlight "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push_str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push_str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("original"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" to_highlight "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push_str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push_str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("original"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"language-rust extra-class"},[a("pre",{pre:!0,attrs:{class:"language-rust"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// original")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("fn")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function-definition function"}},[t._v("highlight_record")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("record"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("mut")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("IndexMap")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" words"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("HashSet")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("_key"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" record"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("iter_mut")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" old_value "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token namespace"}},[t._v("mem"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")])]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("take")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("token_type"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("simple_tokenizer")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),t._v("old_value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" token_type "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TokenType")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("::")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Word")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" lowercase_token "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("to_lowercase")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" to_highlight "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" words"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("contains")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),t._v("lowercase_token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" to_highlight "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push_str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push_str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" to_highlight "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push_str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push_str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("token"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("As we can see, the changes that need to be made are very minimal: this is because efforts have been made to make its API close to the previous one.")]),t._v(" "),a("h3",{attrs:{id:"impact-on-documentation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#impact-on-documentation"}},[t._v("#")]),t._v(" Impact on documentation")]),t._v(" "),a("p",[t._v("This feature should not impact meilisearch users' documentation.\nIn future versions, we will probably provide a way to configure tokenizer and this will be discussed in a new specification.")]),t._v(" "),a("h2",{attrs:{id:"technical-specifications"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#technical-specifications"}},[t._v("#")]),t._v(" Technical Specifications")]),t._v(" "),a("h3",{attrs:{id:"architecture"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#architecture"}},[t._v("#")]),t._v(" Architecture")]),t._v(" "),a("p",[t._v("The new version of the tokenizer will replace the current version as a "),a("a",{attrs:{href:"https://crates.io/crates/charabia",target:"_blank",rel:"noopener noreferrer"}},[t._v("standalone library named charabia"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h3",{attrs:{id:"implementation-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#implementation-details"}},[t._v("#")]),t._v(" Implementation Details")]),t._v(" "),a("p",[t._v("We want to support different tokenizers based on the language of the text that needs to be indexed. For this, we may need to change the tokenizer we are using while indexing, depending on the language and the script, detected by "),a("code",[t._v("whatlang")]),t._v(". The Tokenizer provides an interface that abstracts this need away from the consumer of the tokens.")]),t._v(" "),a("p",[t._v("See "),a("a",{attrs:{href:"https://docs.rs/charabia",target:"_blank",rel:"noopener noreferrer"}},[t._v("the official documentation"),a("OutboundLink")],1),t._v(" to know more about the API of the library.")]),t._v(" "),a("p",[t._v("See the repository "),a("a",{attrs:{href:"https://github.com/meilisearch/charabia/blob/main/CONTRIBUTING.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("Contributing.md"),a("OutboundLink")],1),t._v(" to know more about contribution that can be made by the community.")]),t._v(" "),a("h2",{attrs:{id:"future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#future-possibilities"}},[t._v("#")]),t._v(" Future possibilities")]),t._v(" "),a("ul",[a("li",[t._v("We should add a way to configure the tokenizer to enforce a specific language/script")]),t._v(" "),a("li",[t._v("We should add a way to configure tokenizer whitelisting/blacklisting separators")]),t._v(" "),a("li",[t._v("The tokenizer specified here is based on scripts, we should base it on languages to be able to have default stop-words for each language")]),t._v(" "),a("li",[t._v("We will want in the future to allow user configuration for the tokenizer. This is taken into account in the design of the new Tokenizer.")])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/15.3f1414b9.js b/docs/assets/js/15.095125b3.js similarity index 99% rename from docs/assets/js/15.3f1414b9.js rename to docs/assets/js/15.095125b3.js index 4716ba4e4..6deb3d61a 100644 --- a/docs/assets/js/15.3f1414b9.js +++ b/docs/assets/js/15.095125b3.js @@ -1 +1 @@ -(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 +(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 diff --git a/docs/assets/js/16.a7c6842a.js b/docs/assets/js/16.8f686f44.js similarity index 99% rename from docs/assets/js/16.a7c6842a.js rename to docs/assets/js/16.8f686f44.js index bcf8e466e..3ff90ef9a 100644 --- a/docs/assets/js/16.a7c6842a.js +++ b/docs/assets/js/16.8f686f44.js @@ -1 +1 @@ -(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 +(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{443: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.2bfcfa03.js similarity index 99% rename from docs/assets/js/17.052e3dd6.js rename to docs/assets/js/17.2bfcfa03.js index 36eff06c2..26064e7ab 100644 --- a/docs/assets/js/17.052e3dd6.js +++ b/docs/assets/js/17.2bfcfa03.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],{440: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/19.9e814d58.js b/docs/assets/js/19.455f3c41.js similarity index 99% rename from docs/assets/js/19.9e814d58.js rename to docs/assets/js/19.455f3c41.js index 4e6818135..cfa0e368e 100644 --- a/docs/assets/js/19.9e814d58.js +++ b/docs/assets/js/19.455f3c41.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{444:function(e,t,_){"use strict";_.r(t);var v=_(62),d=Object(v.a)({},(function(){var e=this,t=e.$createElement,_=e._self._c||t;return _("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[_("h1",{attrs:{id:"anonymous-analytics-policy"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#anonymous-analytics-policy"}},[e._v("#")]),e._v(" Anonymous Analytics Policy")]),e._v(" "),_("h2",{attrs:{id:"_1-functional-specification"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#_1-functional-specification"}},[e._v("#")]),e._v(" 1. Functional Specification")]),e._v(" "),_("h3",{attrs:{id:"i-summary"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#i-summary"}},[e._v("#")]),e._v(" I. Summary")]),e._v(" "),_("p",[e._v("This specification describes an exhaustive list of anonymous metrics collected by the MeiliSearch binary. It also describes the tools we use for this collection and how we identify a Meilisearch instance.")]),e._v(" "),_("h3",{attrs:{id:"ii-motivation"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#ii-motivation"}},[e._v("#")]),e._v(" II. Motivation")]),e._v(" "),_("p",[e._v("At MeiliSearch, our vision is to provide an easy-to-use search solution that meets the essential needs of our users. At all times, we strive to understand our users better and meet their expectations in the best possible way.")]),e._v(" "),_("p",[e._v("Although we can gather needs and understand our users through several channels such as Github, Slack, surveys, interviews or roadmap votes, we realize that this is not enough to have a complete view of MeiliSearch usage and features adoption. By cross-referencing our product discovery phases with aggregated quantitative data, we want to make the product much better than what it is today. Our decision-making will be taken a step further to make a product that users love.")]),e._v(" "),_("h3",{attrs:{id:"iii-explanation"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#iii-explanation"}},[e._v("#")]),e._v(" III. Explanation")]),e._v(" "),_("h4",{attrs:{id:"general-data-protection-regulation-gdpr"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#general-data-protection-regulation-gdpr"}},[e._v("#")]),e._v(" General Data Protection Regulation (GDPR)")]),e._v(" "),_("p",[e._v("The metrics collected are non-sensitive, non-personal and do not identify an individual or a group of individuals using MeiliSearch. The data collected is secured and anonymized. We do not collect any data from the values stored in the documents.")]),e._v(" "),_("p",[e._v("We, the MeiliSearch team, provide an email address so that users can request the removal of their data: privacy@meilisearch.com."),_("br"),e._v("\nThanks to the unique identifier generated for their MeiliSearch installation ("),_("code",[e._v("Instance UID")]),e._v(" when launching MeiliSearch), we can remove the corresponding data from all the tools we describe below. Any questions regarding the management of the data collected can be sent to the email address as well.")]),e._v(" "),_("h4",{attrs:{id:"tools"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#tools"}},[e._v("#")]),e._v(" Tools")]),e._v(" "),_("h5",{attrs:{id:"segment"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#segment"}},[e._v("#")]),e._v(" Segment")]),e._v(" "),_("p",[e._v("The collected data is sent to "),_("a",{attrs:{href:"https://segment.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Segment"),_("OutboundLink")],1),e._v(". Segment is a platform for data collection and provides data management tools.")]),e._v(" "),_("h5",{attrs:{id:"amplitude"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#amplitude"}},[e._v("#")]),e._v(" Amplitude")]),e._v(" "),_("p",[_("a",{attrs:{href:"https://amplitude.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Amplitude"),_("OutboundLink")],1),e._v(" is a tool for graphing and highlighting collected data. Segment feeds Amplitude so that we can build visualizations according to our needs.")]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"events-table"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#events-table"}},[e._v("#")]),e._v(" Events table")]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Event name")]),e._v(" "),_("th",[e._v("Description")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("Launched")]),e._v(" "),_("td",[e._v("Occurs when MeiliSearch is launched the first time.")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Searched POST")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("indexes/:indexUid/search")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Searched GET")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("GET")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/search")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Facet Searched POST")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/facet-search")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Searched by Multi-Search POST")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("POST")]),e._v("- "),_("code",[e._v("/multi-search")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Added")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Updated")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("PUT")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Fetched GET")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("GET")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents")]),e._v(" or "),_("code",[e._v("GET")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents/:doc_id")]),e._v(" routes during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Fetched POST")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents/fetch")]),e._v(" routes during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Deleted")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("DELETE")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents")]),e._v(", "),_("code",[e._v("DELETE")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents/:documentId")]),e._v(", "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("indexes/:indexUid/documents/delete-batch")]),e._v(", and "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("indexes/:indexUid/documents/delete")]),e._v(" routes during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Index Created")]),e._v(" "),_("td",[e._v("Occurs when an index is created via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Index Updated")]),e._v(" "),_("td",[e._v("Occurs when an index is updated via "),_("code",[e._v("PUT")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Indexes Swapped")]),e._v(" "),_("td",[e._v("Occurs when indexes are swapped via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/swap-indexes")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Settings Updated")]),e._v(" "),_("td",[e._v("Occurs when the settings are updated via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/settings")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("SearchableAttributes Updated")]),e._v(" "),_("td",[e._v("Occurs when searchable attributes are updated via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/settings/searchable-attributes")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("RankingRules Updated")]),e._v(" "),_("td",[e._v("Occurs when ranking rules are updated via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/settings/ranking-rules")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("FilterableAttributes Updated")]),e._v(" "),_("td",[e._v("Occurs when filterable attributes are updated via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/settings/filterable-attributes")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("SortableAttributes Updated")]),e._v(" "),_("td",[e._v("Occurs when sortable attributes are updated via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/settings/sortable-attributes")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("TypoTolerance Updated")]),e._v(" "),_("td",[e._v("Occurs when typo tolerance settings are updated via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/settings/typo-tolerance")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Pagination Updated")]),e._v(" "),_("td",[e._v("Occurs when pagination settings are updated via "),_("code",[e._v("PATCH")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/pagination")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Faceting Updated")]),e._v(" "),_("td",[e._v("Occurs when faceting settings are updated via "),_("code",[e._v("PATCH")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/faceting")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("DistinctAttribute Updated")]),e._v(" "),_("td",[e._v("Occurs when distinct attribute setting is updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/distinct-attribute")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("ProximityPrecision Updated")]),e._v(" "),_("td",[e._v("Occurs when proximity precision setting is updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/proximity-precision")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("DisplayedAttributes Updated")]),e._v(" "),_("td",[e._v("Occurs when displayed attributes are updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/displayed-attributes")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("StopWords Updated")]),e._v(" "),_("td",[e._v("Occurs when stop words are updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/stop-words")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("SeparatorTokens Updated")]),e._v(" "),_("td",[e._v("Occurs when separator tokens are updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/separator-tokens")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("NonSeparatorTokens Updated")]),e._v(" "),_("td",[e._v("Occurs when non separator tokens are updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/non-separator-tokens")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Synonyms Updated")]),e._v(" "),_("td",[e._v("Occurs when synonyms are updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/synonyms")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Dump Created")]),e._v(" "),_("td",[e._v("Occurs when a dump is created via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/dumps")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Snapshot Created")]),e._v(" "),_("td",[e._v("Occurs when a snapshot is created via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/snapshots")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Tasks Canceled")]),e._v(" "),_("td",[e._v("Occurs when tasks are requested to be canceled via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/tasks/cancel")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Tasks Deleted")]),e._v(" "),_("td",[e._v("Occurs when tasks are requested to be deleted via "),_("code",[e._v("DELETE")]),e._v("- "),_("code",[e._v("/tasks")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Tasks Seen")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("GET")]),e._v(" - "),_("code",[e._v("/tasks")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Stats Seen")]),e._v(" "),_("td",[e._v("Occurs when stats are fetched via "),_("code",[e._v("GET")]),e._v(" - "),_("code",[e._v("/stats")]),e._v(" or "),_("code",[e._v("/indexes/:indexUid/stats")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Health Seen")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("GET - /health")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Version Seen")]),e._v(" "),_("td",[e._v("Occurs when "),_("code",[e._v("GET - /version")]),e._v(" is fetched.")])]),e._v(" "),_("tr",[_("td",[e._v("Experimental features Seen")]),e._v(" "),_("td",[e._v("Occurs when "),_("code",[e._v("GET - /experimental-features")]),e._v(" is fetched.")])]),e._v(" "),_("tr",[_("td",[e._v("Experimental features Updated")]),e._v(" "),_("td",[e._v("Occurs when experimental features are updated via "),_("code",[e._v("PATCH - /experimental-features")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"summarized-metrics-events-table"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#summarized-metrics-events-table"}},[e._v("#")]),e._v(" Summarized Metrics/Events table")]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Metric name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")]),e._v(" "),_("th",[e._v("Triggered by")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[_("code",[e._v("context.app.version")])]),e._v(" "),_("td",[e._v("MeiliSearch version number")]),e._v(" "),_("td",[e._v("0.23.0")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.env")])]),e._v(" "),_("td",[e._v("MeiliSearch env")]),e._v(" "),_("td",[e._v("production")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.db_path")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--db-path")]),e._v("/"),_("code",[e._v("MEILI_DB_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.import_dump")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--import-dump")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.dump_dir")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--dump-dir")]),e._v("/"),_("code",[e._v("MEILI_DUMP_DIR")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ignore_missing_dump")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore-missing-dump")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ignore_dump_if_db_exists")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore-dump-if-db-exists")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.import_snapshot")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--import-snapshot")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.schedule_snapshot")])]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--schedule_snapshot")]),e._v("/"),_("code",[e._v("MEILI_SCHEDULE_SNAPSHOT")]),e._v(" if scheduled snapshots are enabled, otherwise "),_("code",[e._v("None")])]),e._v(" "),_("td",[e._v("86400")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.snapshot_dir")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--snapshot-dir")]),e._v("/"),_("code",[e._v("MEILI_SNAPSHOT_DIR")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ignore_missing_snapshot")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore_missing_snapshot")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ignore_snapshot_if_db_exists")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore_snapshot_if_db_exists")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.http_addr")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--http-addr")]),e._v("/"),_("code",[e._v("MEILI_HTTP_ADDR")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.http_payload_size_limit")])]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--http-payload-size-limit")]),e._v("/"),_("code",[e._v("MEILI_HTTP_PAYLOAD_SIZE_LIMIT")]),e._v(" in bytes")]),e._v(" "),_("td",[e._v("336042103")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.log_level")])]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--log-level")]),e._v("/"),_("code",[e._v("MEILI_LOG_LEVEL")])]),e._v(" "),_("td",[e._v("debug")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.max_indexing_memory")])]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--max-indexing-memory")]),e._v("/"),_("code",[e._v("MEILI_MAX_INDEXING_MEMORY")]),e._v(" in bytes")]),e._v(" "),_("td",[e._v("336042103")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.max_indexing_threads")])]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--max-indexing-threads")]),e._v("/"),_("code",[e._v("MEILI_MAX_INDEXING_THREADS")]),e._v(" in integer")]),e._v(" "),_("td",[e._v("4")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_auth_path")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-auth-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_AUTH_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_cert_path")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-cert-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_CERT_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_key_path")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-key-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_KEY_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_ocsp_path")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-ocsp-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_OCSP_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_require_auth")])]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--ssl-require-auth")]),e._v("/"),_("code",[e._v("MEILI_SSL_REQUIRE_AUTH")]),e._v(" as a boolean")]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_resumption")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-resumption")]),e._v("/"),_("code",[e._v("MEILI_SSL_RESUMPTION")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_tickets")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-tickets")]),e._v("/"),_("code",[e._v("MEILI_SSL_TICKETS")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.with_configuration_file")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the instance is launched with a configuration file, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.task_queue_webhook")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the instance is launched with a task queue webhook, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.experimental_enable_metrics")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-enable-metrics")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_ENABLE_METRICS")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.experimental_replication_parameters")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-replication-parameters")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_REPLICATION_PARAMETERS")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.experimental_logs_mode")])]),e._v(" "),_("td",[_("code",[e._v("human")]),e._v(" or "),_("code",[e._v("json")]),e._v(" depending on the value specified.")]),e._v(" "),_("td",[_("code",[e._v("human")])]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.experimental_enable_logs_route")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-enable-logs-route")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_ENABLE_LOGS_ROUTE")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.experimental_reduce_indexing_memory_usage")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-reduce-indexing-memory-usage")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_REDUCE_INDEXING_MEMORY_USAGE")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.gpu_enabled")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if Meilisearch was compiled with CUDA support, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("system.distribution")])]),e._v(" "),_("td",[e._v("Distribution on which MeiliSearch is launched")]),e._v(" "),_("td",[e._v("Arch Linux")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("system.kernel_version")])]),e._v(" "),_("td",[e._v("Kernel version on which MeiliSearch is launched")]),e._v(" "),_("td",[e._v("5.14.10")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("system.cores")])]),e._v(" "),_("td",[e._v("Number of cores")]),e._v(" "),_("td",[e._v("24")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("system.ram_size")])]),e._v(" "),_("td",[e._v("Total RAM capacity. Expressed in "),_("code",[e._v("KB")])]),e._v(" "),_("td",[e._v("16777216")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("system.disk_size")])]),e._v(" "),_("td",[e._v("Total capacity of the largest disk. Expressed in "),_("code",[e._v("Bytes")])]),e._v(" "),_("td",[e._v("1048576000")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("system.server_prodiver")])]),e._v(" "),_("td",[e._v("Users can tell us on which provider MeiliSearch is hosted by filling the "),_("code",[e._v("MEILI_SERVER_PROVIDER")]),e._v(" env var. This is also filled by our cloud deploy scripts, e.g. "),_("a",{attrs:{href:"https://github.com/meilisearch/cloud-scripts/blob/56a7c2630c1a508e5ad0c0ba1d8cfeb8d2fa9ae0/scripts/providers/gcp/cloud-config.yaml#L33",target:"_blank",rel:"noopener noreferrer"}},[e._v("GCP cloud-config.yaml"),_("OutboundLink")],1)]),e._v(" "),_("td",[e._v("gcp")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("stats.database_size")])]),e._v(" "),_("td",[e._v("Database size. Expressed in "),_("code",[e._v("Bytes")])]),e._v(" "),_("td",[e._v("2621440")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("stats.indexes_number")])]),e._v(" "),_("td",[e._v("Number of indexes")]),e._v(" "),_("td",[e._v("2")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("start_since_days")])]),e._v(" "),_("td",[e._v("Number of days since instance was launched")]),e._v(" "),_("td",[e._v("365")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("user_agent")])]),e._v(" "),_("td",[e._v("User-agent header encountered during one or more API calls")]),e._v(" "),_("td",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Index Created")]),e._v(", "),_("code",[e._v("Index Updated")]),e._v(", "),_("code",[e._v("Documents Added")]),e._v(", "),_("code",[e._v("Documents Updated")]),e._v(", "),_("code",[e._v("Documents Deleted")]),e._v(", "),_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")]),e._v(", "),_("code",[e._v("SortableAttributes Updated")]),e._v(", "),_("code",[e._v("FilterableAttributes Updated")]),e._v(", "),_("code",[e._v("SearchableAttributes Updated")]),e._v(", "),_("code",[e._v("TypoTolerance Updated")]),e._v(", "),_("code",[e._v("Pagination Updated")]),e._v(", "),_("code",[e._v("Faceting Updated")]),e._v(", "),_("code",[e._v("DistinctAttribute Updated")]),e._v(", "),_("code",[e._v("DisplayedAttributes Updated")]),e._v(", "),_("code",[e._v("StopWords Updated")]),e._v(", "),_("code",[e._v("Synonyms Updated")]),e._v(", "),_("code",[e._v("Dump Created")]),e._v(", "),_("code",[e._v("Snapshot Created")]),e._v(", "),_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Stats Seen")]),e._v(", "),_("code",[e._v("Health Seen")]),e._v(", "),_("code",[e._v("Version Seen")]),e._v(", "),_("code",[e._v("Documents Searched by Multi-Search POST")]),e._v(", "),_("code",[e._v("Experimental features Seen")]),e._v(", "),_("code",[e._v("Experimental features Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("requests.99th_response_time")])]),e._v(" "),_("td",[e._v("Highest latency from among the fastest 99% of successful search requests")]),e._v(" "),_("td",[e._v("57ms")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("requests.total_succeeded")])]),e._v(" "),_("td",[e._v("Total number of successful requests in this batch")]),e._v(" "),_("td",[e._v("3456")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("requests.total_failed")])]),e._v(" "),_("td",[e._v("Total number of failed requests in this batch")]),e._v(" "),_("td",[e._v("24")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("requests.total_received")])]),e._v(" "),_("td",[e._v("Total number of received requests in this batch")]),e._v(" "),_("td",[e._v("3480")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Deleted")]),e._v(", "),_("code",[e._v("Documents Fetched GET")]),e._v(", "),_("code",[e._v("Documents Fetched POST")]),e._v(", "),_("code",[e._v("Health Seen")]),e._v(", "),_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("sort.with_geoPoint")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the sort rule "),_("code",[e._v("_geoPoint")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("sort.avg_criteria_number")])]),e._v(" "),_("td",[e._v("Average number of sort criteria among all requests containing the "),_("code",[e._v("sort")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("2")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filter.with_geoRadius")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the filter rule "),_("code",[e._v("_geoRadius")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filter.with_geoBoundingBox")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the filter rule "),_("code",[e._v("_geoBoundingBox")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filter.most_used_syntax")])]),e._v(" "),_("td",[e._v("Most used filter syntax among all requests containing the "),_("code",[e._v("filter")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("string")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("attributes_to_search_on.total_number_of_uses")])]),e._v(" "),_("td",[e._v("Total number of queries where "),_("code",[e._v("attributesToSearchOn")]),e._v(" is set")]),e._v(" "),_("td",[e._v("5")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("q.max_terms_number")])]),e._v(" "),_("td",[e._v("Highest number of terms given for the "),_("code",[e._v("q")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("5")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("vector.max_vector_size")])]),e._v(" "),_("td",[e._v("Highest number of dimensions given for the "),_("code",[e._v("vector")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("1536")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_limit")])]),e._v(" "),_("td",[e._v("Highest value given for the "),_("code",[e._v("limit")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("60")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Fetched GET")]),e._v(", "),_("code",[e._v("Documents Fetched POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_offset")])]),e._v(" "),_("td",[e._v("Highest value given for the "),_("code",[e._v("offset")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("1000")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Fetched GET")]),e._v(", "),_("code",[e._v("Documents Fetched POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.most_used_navigation")])]),e._v(" "),_("td",[e._v("Most used search results navigation among all search requests in this batch. "),_("code",[e._v("estimated")]),e._v(" / "),_("code",[e._v("exhaustive")])]),e._v(" "),_("td",[_("code",[e._v("estimated")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.max_attributes_to_retrieve")])]),e._v(" "),_("td",[e._v("The maximum number of attributes to retrieve encountered among all requests in this batch.")]),e._v(" "),_("td",[e._v("100")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.max_attributes_to_highlight")])]),e._v(" "),_("td",[e._v("The maximum number of attributes to highlight encountered among all requests in this batch.")]),e._v(" "),_("td",[e._v("100")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.highlight_pre_tag")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("highlightPreTag")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.highlight_post_tag")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("highlightPostTag")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.max_attributes_to_crop")])]),e._v(" "),_("td",[e._v("The maximum number of attributes to crop encountered among all requests in this batch.")]),e._v(" "),_("td",[e._v("100")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.crop_length")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("cropLength")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.crop_marker")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("cropMarker")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.show_matches_position")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("showMatchesPosition")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("facets.avg_facets_number")])]),e._v(" "),_("td",[e._v("The average number of facets among all the requests containing the "),_("code",[e._v("facets")]),e._v(" parameter in this batch. "),_("code",[e._v('"facets": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("facets")]),e._v(" does not influence the average in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("10")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("primary_key")])]),e._v(" "),_("td",[e._v("Value given for the "),_("code",[e._v("primaryKey")]),e._v(" parameter if used, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[e._v("id")]),e._v(" "),_("td",[_("code",[e._v("Index Created")]),e._v(", "),_("code",[e._v("Index Updated")]),e._v(", "),_("code",[e._v("Documents Added")]),e._v(", "),_("code",[e._v("Documents Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("payload_type")])]),e._v(" "),_("td",[e._v("All "),_("code",[e._v("payload_type")]),e._v(" encountered in this batch")]),e._v(" "),_("td",[e._v('["application/json", "text/plain", "application/x-ndjson"]')]),e._v(" "),_("td",[_("code",[e._v("Documents Added")]),e._v(", "),_("code",[e._v("Documents Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("index_creation")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if a document addition or update request triggered index creation in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[_("code",[e._v("Documents Added")]),e._v(", "),_("code",[e._v("Documents Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.words_position")])]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("words")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("1")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.typo_position")])]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("typo")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("2")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.proximity_position")])]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("proximity")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.attribute_position")])]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("attribute")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("4")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.sort_position")])]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("sort")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("5")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.exactness_position")])]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("exactness")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("6")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.values")])]),e._v(" "),_("td",[e._v("A string representing the ranking rules without the custom asc-desc rules.")]),e._v(" "),_("td",[_("code",[e._v('"words, typo, attribute, sort, exactness"')])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("sortable_attributes.total")])]),e._v(" "),_("td",[e._v("Number of sortable attributes")]),e._v(" "),_("td",[e._v("3")]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("SortableAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("sortable_attributes.has_geo")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("_geo")]),e._v(" is set as a sortable attribute, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("SortableAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filterable_attributes.total")])]),e._v(" "),_("td",[e._v("Number of filterable attributes")]),e._v(" "),_("td",[e._v("3")]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("FilterableAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filterable_attributes.has_geo")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("_geo")]),e._v(" is set as a filterable attribute, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("FilterableAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("searchable_attributes.total")])]),e._v(" "),_("td",[e._v("Number of searchable attributes")]),e._v(" "),_("td",[e._v("4")]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("SearchableAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("searchable_attributes.with_wildcard")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("*")]),e._v(" is specified as a searchable attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("SearchableAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("typo_tolerance.enabled")])]),e._v(" "),_("td",[e._v("Whether the typo tolerance is enabled")]),e._v(" "),_("td",[_("code",[e._v("true")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("TypoTolerance Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("typo_tolerance.disable_on_attributes")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if at least one value is defined")]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("TypoTolerance Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("typo_tolerance.disable_on_words")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if at least one value is defined")]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("TypoTolerance Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("typo_tolerance.min_word_size_for_typos.one_typo")])]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("minWordSizeForTypos.oneTypo")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("5")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("TypoTolerance Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("typo_tolerance.min_word_size_for_typos.two_typos")])]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("minWordSizeForTypos.twoTypos")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("9")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("TypoTolerance Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_total_hits")])]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("pagination.maxTotalHits")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("1000")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Pagination Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("faceting.max_values_per_facet")])]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("faceting.maxValuesPerFacet")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("100")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Faceting Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("faceting.sort_facet_values_by_star_count")])]),e._v(" "),_("td",[e._v("Whether the user set all fields to be sort by count")]),e._v(" "),_("td",[_("code",[e._v("true")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Faceting Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("faceting.sort_facet_values_by_total")])]),e._v(" "),_("td",[e._v("The number of different values that were set")]),e._v(" "),_("td",[_("code",[e._v("10")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Faceting Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("distinct_attribute.set")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if a field name is specified as a distrinct attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("DistinctAttribute Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("proximity_precision.set")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" the setting has been manually set, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("ProximityPrecision Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("proximity_precision.value")])]),e._v(" "),_("td",[_("code",[e._v("byWord")]),e._v(" or "),_("code",[e._v("byAttribute")]),e._v(" if the setting has been set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("ProximityPrecision Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("displayed_attributes.total")])]),e._v(" "),_("td",[e._v("Number of displayed attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("SettingUpdated")]),e._v(", "),_("code",[e._v("DisplayedAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("displayed_attributes.with_wildcard")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("*")]),e._v(" is specified as a displayed attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("SettingUpdated")]),e._v(", "),_("code",[e._v("DisplayedAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("stop_words.total")])]),e._v(" "),_("td",[e._v("Number of stop words.")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("StopWords Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("separator_tokens.total")])]),e._v(" "),_("td",[e._v("Number of separator tokens.")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("SeparatorTokens Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("non_separator_tokens.total")])]),e._v(" "),_("td",[e._v("Number of non separator tokens.")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("NonSeparatorTokens Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("dictionary.total")])]),e._v(" "),_("td",[e._v("Number of words in the dictionary.")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Dictionary Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("synonyms.total")])]),e._v(" "),_("td",[e._v("Number of synonyms.")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Synonyms Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_task_uid")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if an uid is used to fetch a particular task resource, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_uid")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("uids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_index_uid")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("indexUids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_type")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("types")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_status")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("statuses")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_canceled_by")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("canceledBy")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_before_enqueued_at")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_after_enqueued_at")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_before_started_at")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_after_started_at")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_before_finished_at")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_after_finished_at")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_index_uid")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if an uid is used to fetch an index stat resource, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Stats Seen")])])]),e._v(" "),_("tr",[_("td",[e._v("searches.avg_search_count")]),e._v(" "),_("td",[e._v("The average number of search queries received per call for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("4.2")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[e._v("searches.total_search_count")]),e._v(" "),_("td",[e._v("The total number of search queries received for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("16023")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[e._v("indexes.avg_distinct_index_count")]),e._v(" "),_("td",[e._v("The average number of queried indexes received per call for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("1.2")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[e._v("indexes.total_distinct_index_count")]),e._v(" "),_("td",[e._v("The total number of distinct indexes queries for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("6023")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[e._v("indexes.total_single_index")]),e._v(" "),_("td",[e._v("The total number of calls where only one index where queried.")]),e._v(" "),_("td",[_("code",[e._v("2007")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("swap_operation_number")])]),e._v(" "),_("td",[e._v("The number of swap operation given in "),_("code",[e._v("POST /swap-indexes")]),e._v(" API call")]),e._v(" "),_("td",[e._v("2")]),e._v(" "),_("td",[_("code",[e._v("Indexes Swapped")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("matching_strategy.most_used_strategy")])]),e._v(" "),_("td",[e._v("Most used word matching strategy among all search requests in this batch")]),e._v(" "),_("td",[_("code",[e._v("last")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_document_id")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("DELETE /indexes/:indexUid/documents/:documentUid")]),e._v(" endpoint was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_batch")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("POST /indexes/:indexUid/documents/delete-batch")]),e._v(" endpoint was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_filter")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("POST /indexes/:indexUid/documents/delete")]),e._v(" endpoint was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Fetched GET")]),e._v(", "),_("code",[e._v("Documents Fetched POST")]),e._v(", "),_("code",[e._v("Documents Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("clear_all")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("DELETE /indexes/:indexUid/documents")]),e._v(" endpoint was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Deleted")])])]),e._v(" "),_("tr",[_("td",[e._v("vector_store")]),e._v(" "),_("td",[e._v("Whether the "),_("RouterLink",{attrs:{to:"/specifications/text/0193-experimental-features.html#vector-store"}},[e._v("vector store")]),e._v(" feature is enabled.")],1),e._v(" "),_("td",[_("code",[e._v("true")])]),e._v(" "),_("td",[_("code",[e._v("Experimental features Updated")])])]),e._v(" "),_("tr",[_("td",[e._v("scoring.show_ranking_score")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showRankingScore")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(", otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[e._v("scoring.show_ranking_score_details")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showRankingScoreDetails")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(", otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("facets.total_distinct_facet_count")])]),e._v(" "),_("td",[e._v("The total number of distinct facets queried for the aggregated event")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Facet Searched POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("facets.additional_search_parameters_provided")])]),e._v(" "),_("td",[e._v("Were additional search parameters provided for the aggregated event")]),e._v(" "),_("td",[_("code",[e._v("true")])]),e._v(" "),_("td",[_("code",[e._v("Facet Searched POST")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"detailed-list-of-instance-metrics-and-events-with-their-metrics"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#detailed-list-of-instance-metrics-and-events-with-their-metrics"}},[e._v("#")]),e._v(" Detailed list of Instance metrics and, events with their metrics")]),e._v(" "),_("h5",{attrs:{id:"system-configuration-system"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#system-configuration-system"}},[e._v("#")]),e._v(" System Configuration "),_("code",[e._v("system")])]),e._v(" "),_("p",[e._v("This property allows us to gather essential information to better understand on which type of machine MeiliSearch is used. This allows us to better advise users on the machines to choose according to their data volume and their use-cases.")]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("system.distribution")]),e._v(" "),_("td",[e._v("Distribution on which MeiliSearch is launched")]),e._v(" "),_("td",[_("code",[e._v("Arch Linux")])])]),e._v(" "),_("tr",[_("td",[e._v("system.kernel_version")]),e._v(" "),_("td",[e._v("Kernel version on which MeiliSearch is launched")]),e._v(" "),_("td",[_("code",[e._v("5.14.10-arch1-1")])])]),e._v(" "),_("tr",[_("td",[e._v("system.cores")]),e._v(" "),_("td",[e._v("Number of cores")]),e._v(" "),_("td",[_("code",[e._v("24")])])]),e._v(" "),_("tr",[_("td",[e._v("system.ram_size")]),e._v(" "),_("td",[e._v("Total RAM capacity. Expressed in "),_("code",[e._v("KB")])]),e._v(" "),_("td",[_("code",[e._v("33604210")])])]),e._v(" "),_("tr",[_("td",[e._v("system.disk_size")]),e._v(" "),_("td",[e._v("Total capacity of the largest disk. Expressed in "),_("code",[e._v("Bytes")])]),e._v(" "),_("td",[_("code",[e._v("336042103")])])]),e._v(" "),_("tr",[_("td",[e._v("system.server_provider")]),e._v(" "),_("td",[e._v("Users can tell us on which provider MeiliSearch is hosted by filling the "),_("code",[e._v("MEILI_SERVER_PROVIDER")]),e._v(" env var. This is also filled by our providers deploy scripts. e.g. "),_("a",{attrs:{href:"https://github.com/meilisearch/cloud-scripts/blob/56a7c2630c1a508e5ad0c0ba1d8cfeb8d2fa9ae0/scripts/providers/gcp/cloud-config.yaml#L33",target:"_blank",rel:"noopener noreferrer"}},[e._v("GCP cloud-config.yaml"),_("OutboundLink")],1)]),e._v(" "),_("td",[_("code",[e._v("gcp")])])])])]),e._v(" "),_("h5",{attrs:{id:"meilisearch-configuration-context-and-infos"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#meilisearch-configuration-context-and-infos"}},[e._v("#")]),e._v(" MeiliSearch Configuration "),_("code",[e._v("context")]),e._v(" and "),_("code",[e._v("infos")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("context.app.version")]),e._v(" "),_("td",[e._v("MeiliSearch version number. Sent in a "),_("code",[e._v("context")]),e._v(" object instead of "),_("code",[e._v("properties")]),e._v(" to match Amplitude requirement")]),e._v(" "),_("td",[e._v("0.23.0")])]),e._v(" "),_("tr",[_("td",[e._v("infos.env")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--env")]),e._v("/"),_("code",[e._v("MEILI_ENV")])]),e._v(" "),_("td",[_("code",[e._v("production")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.db_path")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--db-path")]),e._v("/"),_("code",[e._v("MEILI_DB_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.import_dump")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--import-dump")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.dump_dir")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--dump-dir")]),e._v("/"),_("code",[e._v("MEILI_DUMP_DIR")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.ignore_missing_dump")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore-missing-dump")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.ignore_dump_if_db_exists")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore-dump-if-db-exists")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.import_snapshot")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--import-snapshot")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.schedule_snapshot")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--schedule_snapshot")]),e._v("/"),_("code",[e._v("MEILI_SCHEDULE_SNAPSHOT")]),e._v(" if scheduled snapshots are enabled, otherwise "),_("code",[e._v("None")])]),e._v(" "),_("td",[_("code",[e._v("86400")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.snapshot_dir")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--snapshot-dir")]),e._v("/"),_("code",[e._v("MEILI_SNAPSHOT_DIR")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.ignore_missing_snapshot")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore-missing-snapshot")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.ignore_snapshot_if_db_exists")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore-snapshot-if-db-exists")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.http_addr")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--http-addr")]),e._v("/"),_("code",[e._v("MEILI_HTTP_ADDR")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.http_payload_size_limit")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--http-payload-size-limit")]),e._v("/"),_("code",[e._v("MEILI_HTTP_PAYLOAD_SIZE_LIMIT")]),e._v(" in bytes")]),e._v(" "),_("td",[_("code",[e._v("336042103")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.log_level")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--log-level")]),e._v("/"),_("code",[e._v("MEILI_LOG_LEVEL")])]),e._v(" "),_("td",[_("code",[e._v("debug")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.max_indexing_memory")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--max-indexing-memory")]),e._v("/"),_("code",[e._v("MEILI_MAX_INDEXING_MEMORY")]),e._v(" in bytes")]),e._v(" "),_("td",[_("code",[e._v("336042103")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.max_indexing_threads")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--max-indexing-threads")]),e._v("/"),_("code",[e._v("MEILI_MAX_INDEXING_THREADS")]),e._v(" in integer")]),e._v(" "),_("td",[_("code",[e._v("4")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_auth_path")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-auth-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_AUTH_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_cert_path")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-cert-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_CERT_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_key_path")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-key-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_KEY_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_ocsp_path")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-ocsp-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_OCSP_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_require_auth")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--ssl-require-auth")]),e._v("/"),_("code",[e._v("MEILI_SSL_REQUIRE_AUTH")]),e._v(" as a boolean")]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_resumption")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-resumption")]),e._v("/"),_("code",[e._v("MEILI_SSL_RESUMPTION")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_tickets")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-tickets")]),e._v("/"),_("code",[e._v("MEILI_SSL_TICKETS")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.with_configuration_file")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the instance is launched with a configuration file, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.task_queue_webhook")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the instance is launched with a task queue webhook, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.experimental_enable_metrics")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-enable-metrics")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_ENABLE_METRICS")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.experimental_replication_parameters")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-replication-parameters")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_REPLICATION_PARAMETERS")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.experimental_logs_mode")]),e._v(" "),_("td",[_("code",[e._v("human")]),e._v(" or "),_("code",[e._v("json")]),e._v(" depending on the value specified.")]),e._v(" "),_("td",[_("code",[e._v("human")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.experimental_enable_logs_route")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-enable-logs-route")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_ENABLE_LOGS_ROUTE")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.experimental_reduce_indexing_memory_usage")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-reduce-indexing-memory-usage")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_REDUCE_INDEXING_MEMORY_USAGE")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.gpu_enabled")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if Meilisearch was compiled with CUDA support, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("h5",{attrs:{id:"meilisearch-statistics-stats"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#meilisearch-statistics-stats"}},[e._v("#")]),e._v(" MeiliSearch Statistics "),_("code",[e._v("stats")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("stats.database_size")]),e._v(" "),_("td",[e._v("Database size. Expressed in "),_("code",[e._v("Bytes")])]),e._v(" "),_("td",[_("code",[e._v("180230")])])]),e._v(" "),_("tr",[_("td",[e._v("stats.indexes_number")]),e._v(" "),_("td",[e._v("Number of indexes")]),e._v(" "),_("td",[_("code",[e._v("2")])])]),e._v(" "),_("tr",[_("td",[e._v("stats.documents_number")]),e._v(" "),_("td",[e._v("Number of indexed documents")]),e._v(" "),_("td",[_("code",[e._v("165847")])])]),e._v(" "),_("tr",[_("td",[e._v("start_since_days")]),e._v(" "),_("td",[e._v("Number of days since instance was launched")]),e._v(" "),_("td",[_("code",[e._v("328")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"launched"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#launched"}},[e._v("#")]),e._v(" "),_("code",[e._v("Launched")])]),e._v(" "),_("blockquote",[_("p",[e._v("This is the first event sent to mark that MeiliSearch is launched a first time.")])]),e._v(" "),_("h4",{attrs:{id:"documents-searched-post"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-searched-post"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Searched POST")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Searched event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(". The event's properties are averaged over all requests on "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/search")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.99th_response_time")]),e._v(" "),_("td",[e._v("The maximum latency, in "),_("code",[e._v("ms")]),e._v(", for the fastest 99% of succeeded requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("57ms")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_succeeded")]),e._v(" "),_("td",[e._v("The total number of succeeded search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3456")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_failed")]),e._v(" "),_("td",[e._v("The total number of failed search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("24")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The total number of received search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])]),e._v(" "),_("tr",[_("td",[e._v("sort.with_geoPoint")]),e._v(" "),_("td",[e._v("Does the built-in sort rule _geoPoint rule has been used in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("sort.avg_criteria_number")]),e._v(" "),_("td",[e._v("The average number of sort criteria among all the requests containing the "),_("code",[e._v("sort")]),e._v(" parameter in the aggregated event. "),_("code",[e._v('"sort": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("sort")]),e._v(" does not influence the average.")]),e._v(" "),_("td",[_("code",[e._v("2")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.with_geoRadius")]),e._v(" "),_("td",[e._v("Does the built-in filter rule _geoRadius has been used in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.with_geoBoundingBox")]),e._v(" "),_("td",[e._v("Does the built-in filter rule _geoBoundingBox has been used in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.avg_criteria_number")]),e._v(" "),_("td",[e._v("The average number of filter criteria among all the requests containing the "),_("code",[e._v("filter")]),e._v(" parameter in the aggregated event. "),_("code",[e._v('"filter": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("filter")]),e._v(" does not influence the average in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("4")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.most_used_syntax")]),e._v(" "),_("td",[e._v("The most used filter syntax among all the requests containing the requests containing the "),_("code",[e._v("filter")]),e._v(" parameter in the aggregated event. "),_("code",[e._v("string")]),e._v(" / "),_("code",[e._v("array")]),e._v(" / "),_("code",[e._v("mixed")])]),e._v(" "),_("td",[_("code",[e._v("mixed")])])]),e._v(" "),_("tr",[_("td",[e._v("attributes_to_search_on.total_number_of_uses")]),e._v(" "),_("td",[e._v("Total number of queries where "),_("code",[e._v("attributesToSearchOn")]),e._v(" is set")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("q.max_terms_number")]),e._v(" "),_("td",[e._v("The maximum number of terms for the "),_("code",[e._v("q")]),e._v(" parameter among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("vector.max_vector_size")]),e._v(" "),_("td",[e._v("The maximum number of dimensions for the "),_("code",[e._v("vector")]),e._v(" parameter among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("1536")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.max_limit")]),e._v(" "),_("td",[e._v("The maximum limit encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("20")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.max_offset")]),e._v(" "),_("td",[e._v("The maximum offset encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("1000")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.most_used_navigation")]),e._v(" "),_("td",[e._v("Most used search results navigation among all requests in the aggregated event. "),_("code",[e._v("estimated")]),e._v(" / "),_("code",[e._v("exhaustive")])]),e._v(" "),_("td",[_("code",[e._v("estimated")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.max_attributes_to_retrieve")]),e._v(" "),_("td",[e._v("The maximum number of attributes to retrieve encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.max_attributes_to_highlight")]),e._v(" "),_("td",[e._v("The maximum number of attributes to highlight encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.highlight_pre_tag")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("highlightPreTag")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.highlight_post_tag")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("highlightPostTag")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.max_attributes_to_crop")]),e._v(" "),_("td",[e._v("The maximum number of attributes to crop encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.crop_length")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("cropLength")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.crop_marker")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("cropMarker")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.show_matches_position")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showMatchesPosition")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("facets.avg_facets_number")]),e._v(" "),_("td",[e._v("The average number of facets among all the requests containing the "),_("code",[e._v("facets")]),e._v(" parameter in the aggregated event. "),_("code",[e._v('"facets": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("facets")]),e._v(" does not influence the average in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("10")])])]),e._v(" "),_("tr",[_("td",[e._v("matching_strategy.most_used_strategy")]),e._v(" "),_("td",[e._v("Most used word matching strategy among all search requests in the aggregated event. "),_("code",[e._v("last")]),e._v(" / "),_("code",[e._v("all")])]),e._v(" "),_("td",[_("code",[e._v("last")])])]),e._v(" "),_("tr",[_("td",[e._v("scoring.show_ranking_score")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showRankingScore")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(", otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("scoring.show_ranking_score_details")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showRankingScoreDetails")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(", otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"documents-searched-get"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-searched-get"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Searched GET")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Searched event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(". The event's properties are averaged over all requests on "),_("code",[e._v("GET")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/search")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.99th_response_time")]),e._v(" "),_("td",[e._v("Highest latency from among the fastest 99% of successful search requests.")]),e._v(" "),_("td",[_("code",[e._v("57ms")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_succeeded")]),e._v(" "),_("td",[e._v("The total number of succeeded search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3456")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_failed")]),e._v(" "),_("td",[e._v("The total number of failed search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("24")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The total number of received search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])]),e._v(" "),_("tr",[_("td",[e._v("sort.with_geoPoint")]),e._v(" "),_("td",[e._v("Does the built-in sort rule _geoPoint rule has been used in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("sort.avg_criteria_number")]),e._v(" "),_("td",[e._v("The average number of sort criteria among all the requests containing the "),_("code",[e._v("sort")]),e._v(" parameter in the aggregated event. "),_("code",[e._v('"sort": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("sort")]),e._v(" does not influence the average.")]),e._v(" "),_("td",[_("code",[e._v("2")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.with_geoRadius")]),e._v(" "),_("td",[e._v("Does the built-in filter rule _geoRadius has been used in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.with_geoBoundingBox")]),e._v(" "),_("td",[e._v("Does the built-in filter rule _geoBoundingBox has been used in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.avg_criteria_number")]),e._v(" "),_("td",[e._v("The average number of filter criteria among all the requests containing the "),_("code",[e._v("filter")]),e._v(" parameter in the aggregated event. "),_("code",[e._v('"filter": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("filter")]),e._v(" does not influence the average in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("4")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.most_used_syntax")]),e._v(" "),_("td",[e._v("The most used filter syntax among all the requests containing the requests containing the "),_("code",[e._v("filter")]),e._v(" parameter in the aggregated event. "),_("code",[e._v("string")]),e._v(" / "),_("code",[e._v("array")]),e._v(" / "),_("code",[e._v("mixed")])]),e._v(" "),_("td",[_("code",[e._v("mixed")])])]),e._v(" "),_("tr",[_("td",[e._v("attributes_to_search_on.total_number_of_uses")]),e._v(" "),_("td",[e._v("Total number of queries where "),_("code",[e._v("attributesToSearchOn")]),e._v(" is set")]),e._v(" "),_("td",[e._v("5")])]),e._v(" "),_("tr",[_("td",[e._v("q.max_terms_number")]),e._v(" "),_("td",[e._v("The maximum number of terms for the "),_("code",[e._v("q")]),e._v(" parameter among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.max_limit")]),e._v(" "),_("td",[e._v("The maximum limit encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("20")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.max_offset")]),e._v(" "),_("td",[e._v("The maximum offset encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("1000")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.most_used_navigation")]),e._v(" "),_("td",[e._v("Most used search results navigation among all requests in the aggregated event. "),_("code",[e._v("estimated")]),e._v(" / "),_("code",[e._v("exhaustive")])]),e._v(" "),_("td",[_("code",[e._v("estimated")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.max_attributes_to_retrieve")]),e._v(" "),_("td",[e._v("The maximum number of attributes to retrieve encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.max_attributes_to_highlight")]),e._v(" "),_("td",[e._v("The maximum number of attributes to highlight encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.highlight_pre_tag")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("highlightPreTag")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.highlight_post_tag")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("highlightPostTag")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.max_attributes_to_crop")]),e._v(" "),_("td",[e._v("The maximum number of attributes to crop encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.crop_length")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("cropLength")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.crop_marker")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("cropMarker")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.show_matches_position")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("showMatchesPosition")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("facets.avg_facets_number")]),e._v(" "),_("td",[e._v("The average number of facets among all the requests containing the "),_("code",[e._v("facets")]),e._v(" parameter in the aggregated event. "),_("code",[e._v('"facets": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("facets")]),e._v(" does not influence the average in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("10")])])]),e._v(" "),_("tr",[_("td",[e._v("matching_strategy.most_used_strategy")]),e._v(" "),_("td",[e._v("Most used word matching strategy among all search requests in the aggregated event. "),_("code",[e._v("last")]),e._v(" / "),_("code",[e._v("all")])]),e._v(" "),_("td",[_("code",[e._v("last")])])]),e._v(" "),_("tr",[_("td",[e._v("scoring.show_ranking_score")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showRankingScore")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(", otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("scoring.show_ranking_score_details")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showRankingScoreDetails")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(", otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"facet-searched-post"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#facet-searched-post"}},[e._v("#")]),e._v(" "),_("code",[e._v("Facet Searched POST")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Facet Searched event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(". The event's properties are averaged over all requests on "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/facet-search")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.99th_response_time")]),e._v(" "),_("td",[e._v("Highest latency from among the fastest 99% of successful search requests.")]),e._v(" "),_("td",[_("code",[e._v("57ms")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_succeeded")]),e._v(" "),_("td",[e._v("The total number of succeeded search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3456")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_failed")]),e._v(" "),_("td",[e._v("The total number of failed search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("24")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The total number of received search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])]),e._v(" "),_("tr",[_("td",[e._v("facets.total_distinct_facet_count")]),e._v(" "),_("td",[e._v("The total number of distinct facets queried for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("facets.additional_search_parameters_provided")]),e._v(" "),_("td",[e._v("Were additional search parameters provided for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("true")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"documents-searched-by-multi-search-post"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-searched-by-multi-search-post"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Searched by Multi-Search POST")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Searched event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(". The event's properties are averaged over all requests on "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/multi-search")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_succeeded")]),e._v(" "),_("td",[e._v("The number of succeeded calls on the endpoint for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3456")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_failed")]),e._v(" "),_("td",[e._v("The number of calls on the endpoint for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("24")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The number of calls on the endpoint for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])]),e._v(" "),_("tr",[_("td",[e._v("searches.avg_search_count")]),e._v(" "),_("td",[e._v("The average number of search queries received per call for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("4.2")])])]),e._v(" "),_("tr",[_("td",[e._v("searches.total_search_count")]),e._v(" "),_("td",[e._v("The total number of search queries received for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("16023")])])]),e._v(" "),_("tr",[_("td",[e._v("indexes.avg_distinct_index_count")]),e._v(" "),_("td",[e._v("The average number of queried indexes received per call for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("1.2")])])]),e._v(" "),_("tr",[_("td",[e._v("indexes.total_distinct_index_count")]),e._v(" "),_("td",[e._v("The total number of distinct indexes queries for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("6023")])])]),e._v(" "),_("tr",[_("td",[e._v("indexes.total_single_index")]),e._v(" "),_("td",[e._v("The total number of calls where only one index where queried.")]),e._v(" "),_("td",[_("code",[e._v("2007")])])])])]),e._v(" "),_("h2",{attrs:{id:"index-created"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#index-created"}},[e._v("#")]),e._v(" "),_("code",[e._v("Index Created")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered for this API call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("primary_key")]),e._v(" "),_("td",[e._v("The field's name used as a primary key if set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("id")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"index-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#index-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Index Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered for this API call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("primary_key")]),e._v(" "),_("td",[e._v("The field's name used as a primary key if set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("id")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"indexes-swapped"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#indexes-swapped"}},[e._v("#")]),e._v(" "),_("code",[e._v("Indexes Swapped")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered for this API call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("swap_operation_number")]),e._v(" "),_("td",[e._v("The number of swap operation given for this API call.")]),e._v(" "),_("td",[_("code",[e._v("2")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"documents-added"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-added"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Added")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Added event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(". The event's properties are averaged over all requests on "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("payload_type")]),e._v(" "),_("td",[e._v("Represents all the payload_type encountered on this endpoint in the aggregated event as a set. "),_("code",[e._v("application/json")]),e._v("/ "),_("code",[e._v("application/x-ndjson")]),e._v("/ "),_("code",[e._v("text/plain")]),e._v(" or any non-supported content-type.")]),e._v(" "),_("td",[e._v("["),_("code",[e._v("text/plain")]),e._v(", "),_("code",[e._v("application/json")]),e._v("]")])]),e._v(" "),_("tr",[_("td",[e._v("primary_key")]),e._v(" "),_("td",[e._v("Represents all the "),_("code",[e._v("primaryKey")]),e._v(" query parameters encountered in the aggregated event as a set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v('["id"]')])])]),e._v(" "),_("tr",[_("td",[e._v("index_creation")]),e._v(" "),_("td",[e._v("Does an index creation happened among all requests in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"documents-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Updated")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Updated event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(". The event's properties are averaged over all requests on "),_("code",[e._v("PUT")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("payload_type")]),e._v(" "),_("td",[e._v("Represents all the payload_type encountered on this endpoint in the aggregated event as a set. "),_("code",[e._v("application/json")]),e._v("/ "),_("code",[e._v("application/x-ndjson")]),e._v("/ "),_("code",[e._v("text/plain")]),e._v(" or any non-supported content-type.")]),e._v(" "),_("td",[e._v("["),_("code",[e._v("text/plain")]),e._v(", "),_("code",[e._v("application/json")]),e._v("]")])]),e._v(" "),_("tr",[_("td",[e._v("primary_key")]),e._v(" "),_("td",[e._v("Represents all the "),_("code",[e._v("primaryKey")]),e._v(" query parameters encountered in the aggregated event as a set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v('["id"]')])])]),e._v(" "),_("tr",[_("td",[e._v("index_creation")]),e._v(" "),_("td",[e._v("Does an index creation happened among all requests in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"documents-deleted"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-deleted"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Deleted")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Deleted event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The total number of received requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])]),e._v(" "),_("tr",[_("td",[e._v("per_document_id")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("DELETE /indexes/:indexUid/documents/:documentUid")]),e._v(" endpoint is called in the aggregated event, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("clear_all")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("DELETE /indexes/:indexUid/documents")]),e._v(" endpoint is called in the aggregated event, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("per_batch")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("POST /indexes/:indexUid/documents/delete-batch")]),e._v(" endpoint is called in the aggregated event, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("per_filter")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("POST /indexes/:indexUid/documents/delete")]),e._v(" endpoint is called in the aggregated event, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("h2",{attrs:{id:"documents-fetched-get"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-fetched-get"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Fetched GET")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Fetched GET event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[_("code",[e._v("requests.total_received")])]),e._v(" "),_("td",[e._v("Total number of request received in this batch")]),e._v(" "),_("td",[e._v("325")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_document_id")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("GET /indexes/:indexUid/documents/:doc_id")]),e._v(" endpoint was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_filter")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("GET /indexes/:indexUid/documents")]),e._v(" endpoint was used with a filter in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_limit")])]),e._v(" "),_("td",[e._v("Highest value given for the "),_("code",[e._v("limit")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("60")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_offset")])]),e._v(" "),_("td",[e._v("Highest value given for the "),_("code",[e._v("offset")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("1000")])])])]),e._v(" "),_("h2",{attrs:{id:"documents-fetched-post"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-fetched-post"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Fetched POST")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Fetched POST event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[_("code",[e._v("requests.total_received")])]),e._v(" "),_("td",[e._v("Total number of request received in this batch")]),e._v(" "),_("td",[e._v("325")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_document_id")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_filter")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("POST /indexes/:indexUid/documents/fetch")]),e._v(" endpoint was used with a filter in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_limit")])]),e._v(" "),_("td",[e._v("Highest value given for the "),_("code",[e._v("limit")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("60")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_offset")])]),e._v(" "),_("td",[e._v("Highest value given for the "),_("code",[e._v("offset")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("1000")])])])]),e._v(" "),_("h2",{attrs:{id:"settings-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#settings-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Settings Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("searchable_attributes.total")]),e._v(" "),_("td",[e._v("Number of searchable attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("searchable_attributes.with_wildcard")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("*")]),e._v(" is specified as a searchable attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.words_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("words")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("1")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.typo_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("typo")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("2")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.proximity_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("proximity")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.attribute_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("attribute")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("4")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.sort_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("sort")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.exactness_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("exactness")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("6")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.values")]),e._v(" "),_("td",[e._v("A string representing the ranking rules without the custom asc-desc rules.")]),e._v(" "),_("td",[_("code",[e._v('"words, typo, attribute, sort, exactness"')])])]),e._v(" "),_("tr",[_("td",[e._v("sortable_attributes.total")]),e._v(" "),_("td",[e._v("Number of sortable attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("sortable_attributes.has_geo")]),e._v(" "),_("td",[e._v("Indicate if "),_("code",[e._v("_geo")]),e._v(" is set as a sortable attribute.")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("filterable_attributes.total")]),e._v(" "),_("td",[e._v("Number of filterable attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("filterable_attributes.has_geo")]),e._v(" "),_("td",[e._v("Indicate if "),_("code",[e._v("_geo")]),e._v(" is set as a filterable attribute.")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.enabled")]),e._v(" "),_("td",[e._v("Whether the typo tolerance is enabled.")]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.disable_on_attributes")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if at least one value is defined for "),_("code",[e._v("disableOnAttributes")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.disable_on_words")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if at least one value is defined for "),_("code",[e._v("disableOnWords")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.min_word_size_for_typos.one_typo")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("minWordSizeForTypos.oneTypo")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.min_word_size_for_typos.two_typos")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("minWordSizeForTypos.twoTypos")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("9")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.max_total_hits")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("pagination.maxTotalHits")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("1000")])])]),e._v(" "),_("tr",[_("td",[e._v("faceting.max_values_per_facet")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("faceting.maxValuesPerFacet")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("faceting.sort_facet_values_by_star_count")]),e._v(" "),_("td",[e._v("Whether the user set all fields to be sort by count")]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("faceting.sort_facet_values_by_total")]),e._v(" "),_("td",[e._v("The number of different values that were set")]),e._v(" "),_("td",[_("code",[e._v("10")])])]),e._v(" "),_("tr",[_("td",[e._v("distinct_attribute.set")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if a field name is specified, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("proximity_precision.set")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" the setting has been manually set, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("proximity_precision.value")]),e._v(" "),_("td",[_("code",[e._v("byWord")]),e._v(" or "),_("code",[e._v("byAttribute")]),e._v(" if the setting has been set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("null")])])]),e._v(" "),_("tr",[_("td",[e._v("displayed_attributes.total")]),e._v(" "),_("td",[e._v("Number of displayed attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("displayed_attributes.with_wildcard")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("*")]),e._v(" is specified as a displayed attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("stop_words.total")]),e._v(" "),_("td",[e._v("Number of stop words.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("separator_tokens.total")]),e._v(" "),_("td",[e._v("Number of separator tokens.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("non_separator_tokens.total")]),e._v(" "),_("td",[e._v("Number of non separator tokens.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("dictionary.total")]),e._v(" "),_("td",[e._v("Number of words in the dictionary.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("synonyms.total")]),e._v(" "),_("td",[e._v("Number of synonyms.")]),e._v(" "),_("td",[_("code",[e._v("3")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"rankingrules-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#rankingrules-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("RankingRules Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.words_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("words")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("1")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.typo_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("typo")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("2")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.proximity_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("proximity")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.attribute_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("attribute")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("4")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.sort_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("sort")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.exactness_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("exactness")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("6")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.values")]),e._v(" "),_("td",[e._v("A string representing the ranking rules without the custom asc-desc rules.")]),e._v(" "),_("td",[_("code",[e._v('"words, typo, attribute, sort, exactness"')])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"sortableattributes-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#sortableattributes-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("SortableAttributes Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("sortable_attributes.total")]),e._v(" "),_("td",[e._v("Number of sortable attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("sortable_attributes.has_geo")]),e._v(" "),_("td",[e._v("Indicate if "),_("code",[e._v("_geo")]),e._v(" is set as a sortable attribute.")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"filterableattributes-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#filterableattributes-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("FilterableAttributes Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("filterable_attributes.total")]),e._v(" "),_("td",[e._v("Number of filterable attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("filterable_attributes.has_geo")]),e._v(" "),_("td",[e._v("Indicate if "),_("code",[e._v("_geo")]),e._v(" is set as a filterable attribute.")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("h2",{attrs:{id:"searchableattributes-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#searchableattributes-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("SearchableAttributes Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("searchable_attributes.total")]),e._v(" "),_("td",[e._v("Number of searchable attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("searchable_attributes.with_wildcard")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("*")]),e._v(" is specified as a searchable attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("h2",{attrs:{id:"typotolerance-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#typotolerance-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("TypoTolerance Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.enabled")]),e._v(" "),_("td",[e._v("Whether the typo tolerance is enabled")]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.disable_on_attributes")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if at least one value is defined for "),_("code",[e._v("disableOnAttributes")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.disable_on_words")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if at least one value is defined for "),_("code",[e._v("disableOnWords")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.min_word_size_for_typos.one_typo")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("minWordSizeForTypos.oneTypo")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.min_word_size_for_typos.two_typos")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("minWordSizeForTypos.twoTypos")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("9")])])])])]),e._v(" "),_("h2",{attrs:{id:"pagination-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#pagination-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Pagination Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.max_total_hits")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("maxTotalHits")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("1000")])])])])]),e._v(" "),_("h2",{attrs:{id:"faceting-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#faceting-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Faceting Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("faceting.max_values_per_facet")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("maxValuesPerFacet")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("faceting.sort_facet_values_by_star_count")]),e._v(" "),_("td",[e._v("Whether the user set all fields to be sort by count")]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("faceting.sort_facet_values_by_total")]),e._v(" "),_("td",[e._v("The number of different values that were set")]),e._v(" "),_("td",[_("code",[e._v("10")])])])])]),e._v(" "),_("h2",{attrs:{id:"distinctattribute-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#distinctattribute-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("DistinctAttribute Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("distinct_attribute.set")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if a field name is specified, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("h2",{attrs:{id:"proximityprecision-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#proximityprecision-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("ProximityPrecision Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("proximity_precision.set")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" the setting has been manually set, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("proximity_precision.value")]),e._v(" "),_("td",[_("code",[e._v("byWord")]),e._v(" or "),_("code",[e._v("byAttribute")]),e._v(" if the setting has been set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("byWord")])])])])]),e._v(" "),_("h2",{attrs:{id:"displayedattributes-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#displayedattributes-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("DisplayedAttributes Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("displayed_attributes.total")]),e._v(" "),_("td",[e._v("Number of displayed attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("displayed_attributes.with_wildcard")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("*")]),e._v(" is specified as a displayed attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("h2",{attrs:{id:"stopwords-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#stopwords-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("StopWords Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("stop_words.total")]),e._v(" "),_("td",[e._v("Number of stop words.")]),e._v(" "),_("td",[_("code",[e._v("3")])])])])]),e._v(" "),_("h2",{attrs:{id:"separatortokens-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#separatortokens-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("SeparatorTokens Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("separator_tokens.total")]),e._v(" "),_("td",[e._v("Number of separator tokens.")]),e._v(" "),_("td",[_("code",[e._v("3")])])])])]),e._v(" "),_("h2",{attrs:{id:"nonseparatortokens-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#nonseparatortokens-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("NonSeparatorTokens Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("non_separator_tokens.total")]),e._v(" "),_("td",[e._v("Number of non separator tokens.")]),e._v(" "),_("td",[_("code",[e._v("3")])])])])]),e._v(" "),_("h2",{attrs:{id:"dictionary-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#dictionary-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Dictionary Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("dictionary.total")]),e._v(" "),_("td",[e._v("Number of words in the dictionary.")]),e._v(" "),_("td",[_("code",[e._v("3")])])])])]),e._v(" "),_("h2",{attrs:{id:"synonyms-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#synonyms-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Synonyms Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("synonyms.total")]),e._v(" "),_("td",[e._v("Number of synonyms.")]),e._v(" "),_("td",[_("code",[e._v("3")])])])])]),e._v(" "),_("h2",{attrs:{id:"dump-created"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#dump-created"}},[e._v("#")]),e._v(" "),_("code",[e._v("Dump Created")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])])])]),e._v(" "),_("h2",{attrs:{id:"snapshot-created"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#snapshot-created"}},[e._v("#")]),e._v(" "),_("code",[e._v("Snapshot Created")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])])])]),e._v(" "),_("h2",{attrs:{id:"tasks-seen"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#tasks-seen"}},[e._v("#")]),e._v(" "),_("code",[e._v("Tasks Seen")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Tasks Seen event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The total number of received requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])]),e._v(" "),_("tr",[_("td",[e._v("per_task_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if an uid is used to fetch a particular task resource, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("uids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_index_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("indexUids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_type")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("types")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_status")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("statuses")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_canceled_by")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("canceledBy")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_enqueued_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_enqueued_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_started_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_started_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_finished_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_finished_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])])])]),e._v(" "),_("h2",{attrs:{id:"tasks-canceled"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#tasks-canceled"}},[e._v("#")]),e._v(" "),_("code",[e._v("Tasks Canceled")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("uids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_index_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("indexUids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_type")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("types")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_status")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("statuses")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_canceled_by")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("canceledBy")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_enqueued_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_enqueued_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_started_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_started_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_finished_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_finished_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])])])]),e._v(" "),_("h2",{attrs:{id:"tasks-deleted"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#tasks-deleted"}},[e._v("#")]),e._v(" "),_("code",[e._v("Tasks Deleted")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("uids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_index_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("indexUids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_type")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("types")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_status")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("statuses")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_canceled_by")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("canceledBy")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_enqueued_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_enqueued_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_started_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_started_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_finished_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_finished_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])])])]),e._v(" "),_("h2",{attrs:{id:"stats-seen"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#stats-seen"}},[e._v("#")]),e._v(" "),_("code",[e._v("Stats Seen")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("per_index_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if an uid is used to fetch an index stat resource, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])])])]),e._v(" "),_("h2",{attrs:{id:"health-seen"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#health-seen"}},[e._v("#")]),e._v(" "),_("code",[e._v("Health Seen")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Health Seen event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The total number of received requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])])])]),e._v(" "),_("h2",{attrs:{id:"version-seen"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#version-seen"}},[e._v("#")]),e._v(" "),_("code",[e._v("Version Seen")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])])])]),e._v(" "),_("h2",{attrs:{id:"experimental-features-seen"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#experimental-features-seen"}},[e._v("#")]),e._v(" "),_("code",[e._v("Experimental features Seen")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])])])]),e._v(" "),_("h2",{attrs:{id:"experimental-features-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#experimental-features-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Experimental features Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("vector_store")]),e._v(" "),_("td",[e._v("Whether the "),_("RouterLink",{attrs:{to:"/specifications/text/0193-experimental-features.html#vector-store"}},[e._v("vector store")]),e._v(" feature is enabled.")],1),e._v(" "),_("td",[_("code",[e._v("true")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"user-interface"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#user-interface"}},[e._v("#")]),e._v(" User-interface")]),e._v(" "),_("p",[e._v("Analytics are enabled by default while leaving the option for users to disable it with the "),_("code",[e._v("--no-analytics")]),e._v(" option.")]),e._v(" "),_("p",[_("strong",[e._v("Message displayed on the CLI at launch if analytics are enabled")])]),e._v(" "),_("blockquote",[_("p",[e._v("Thank you for using MeiliSearch!")]),e._v(" "),_("p",[e._v("We collect anonymized analytics to improve our product and your experience. To learn more, including how to turn off analytics, visit our dedicated documentation page: https://docs.meilisearch.com/learn/what_is_meilisearch/telemetry.html.")]),e._v(" "),_("p",[e._v('Anonymous telemetry:\t"Enabled"')]),e._v(" "),_("p",[e._v('Instance UID: ":uidGeneratedAtFirstLaunch"')])]),e._v(" "),_("p",[_("strong",[e._v("Message displayed on the CLI at launch if analytics are disabled after being activated")])]),e._v(" "),_("p",[e._v("The unique identifier of the instance remains displayed even if analytics are disabled so that it does not reactivate the analytics to obtain it after having stopped it. The user can still ask us to remove the data previously collected by giving us his "),_("code",[e._v("Instance UID")]),e._v(".")]),e._v(" "),_("blockquote",[_("p",[e._v("Thank you for using MeiliSearch!")]),e._v(" "),_("p",[e._v('Anonymous telemetry:\t"Disabled"')]),e._v(" "),_("p",[e._v('Instance UID: ":uidGeneratedAtFirstLaunch"')])]),e._v(" "),_("p",[_("strong",[e._v("Message displayed on the CLI at launch if analytics are disabled at first launch")])]),e._v(" "),_("blockquote",[_("p",[e._v("Thank you for using MeiliSearch!")]),e._v(" "),_("p",[e._v('Anonymous telemetry:\t"Disabled"')])]),e._v(" "),_("h2",{attrs:{id:"_2-technical-aspects"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-aspects"}},[e._v("#")]),e._v(" 2. Technical Aspects")]),e._v(" "),_("h3",{attrs:{id:"i-technical-details"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#i-technical-details"}},[e._v("#")]),e._v(" I. Technical Details")]),e._v(" "),_("h4",{attrs:{id:"user-agent-case"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#user-agent-case"}},[e._v("#")]),e._v(" User-Agent case")]),e._v(" "),_("p",[e._v("The "),_("code",[e._v("User-Agent")]),e._v(" header is tracked on the events listed below. Our official SDKs/integrations should always contain "),_("code",[e._v("MeiliSearch")]),e._v(" in their names.")]),e._v(" "),_("p",[e._v("Each endpoint API tracked sends the "),_("code",[e._v("User-Agent")]),e._v(" as a "),_("code",[e._v("user_agent")]),e._v(" event property as an array. If several values are contained in the "),_("code",[e._v("User-Agent")]),e._v(" header, they are split by the "),_("code",[e._v(";")]),e._v(" character.")]),e._v(" "),_("h5",{attrs:{id:"x-meilisearch-client-header"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#x-meilisearch-client-header"}},[e._v("#")]),e._v(" "),_("code",[e._v("X-Meilisearch-Client")]),e._v(" Header")]),e._v(" "),_("p",[e._v("Some browser engines prevent overloading the User-Agent header. To track the calls made by some clients concerned by this fact, e.g. the JavaScript SDK, it is possible to use the "),_("code",[e._v("X-Meilisearch-Client")]),e._v(" custom header.")]),e._v(" "),_("p",[e._v("If the "),_("code",[e._v("X-Meilisearch-Client")]),e._v(" is encountered, it overrides the presence of the "),_("code",[e._v("User-Agent")]),e._v(" header.")]),e._v(" "),_("h4",{attrs:{id:"telemetry-endpoint"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#telemetry-endpoint"}},[e._v("#")]),e._v(" Telemetry Endpoint")]),e._v(" "),_("p",[e._v("Telemetric data are sent to the domain "),_("code",[e._v("telemetry.meilisearch.com")]),e._v(" which then redirects it to Segment.")]),e._v(" "),_("p",[e._v("This transit domain allows us to change the telemetry collection solution in the future without impacting older versions of Meilisearch.")]),e._v(" "),_("h5",{attrs:{id:"identifying-meilisearch-installation"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#identifying-meilisearch-installation"}},[e._v("#")]),e._v(" Identifying MeiliSearch installation")]),e._v(" "),_("p",[e._v("To identify instances, we generate a unique identifier at first launch if analytics are not disabled.")]),e._v(" "),_("ul",[_("li",[e._v("This unique identifier is inserted in the data.ms folder to be kept in case of version upgrades.")]),e._v(" "),_("li",[e._v("A file named following the given pattern "),_("code",[e._v(":MeiliSearchData.msPath-:instanceUid")]),e._v(" is generated in a "),_("code",[e._v("MeiliSearch")]),e._v(" folder to recover an identifier in case of corruption of the data.ms folder, causing it to be deleted and recreated. This "),_("code",[e._v("MeiliSearch")]),e._v(" folder is created in the "),_("code",[e._v("config_dir")]),e._v(" of each platform.")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Directory")]),e._v(" "),_("th",[e._v("Windows")]),e._v(" "),_("th",[e._v("Linux/*BSD")]),e._v(" "),_("th",[e._v("macOS")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("config_dir")]),e._v(" "),_("td",[e._v("%APPDATA% (C:\\Users%USERNAME%\\AppData\\Roaming)")]),e._v(" "),_("td",[e._v("$XDG_CONFIG_HOME (~/.config)")]),e._v(" "),_("td",[e._v("~/Library/Application Support")])])])]),e._v(" "),_("h5",{attrs:{id:"segment-identify-call"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#segment-identify-call"}},[e._v("#")]),e._v(" Segment Identify Call")]),e._v(" "),_("p",[e._v("The "),_("code",[e._v("identify")]),e._v(" method of Segment permits identifying an instance by sending a unique identifier. It groups the information of a MeiliSearch binary such as "),_("code",[e._v("system")]),e._v(", "),_("code",[e._v("stats")]),e._v(", and general properties related below in this specification.")]),e._v(" "),_("p",[e._v("The segment identify call is only sent after the first hour if the instance is still running. At the first launch, MeiliSearch sends a "),_("code",[e._v("Launched")]),e._v(" event on an instance ID equal to "),_("code",[e._v("total_launch")]),e._v(" in order to avoid tracking instances usage for nothing when they could be shut down and never restarted.")]),e._v(" "),_("h5",{attrs:{id:"segment-track-call"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#segment-track-call"}},[e._v("#")]),e._v(" Segment Track Call")]),e._v(" "),_("p",[e._v("The "),_("code",[e._v("track")]),e._v(" calls of Segment allow tracking the events passed on the instance.")]),e._v(" "),_("h5",{attrs:{id:"batching"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#batching"}},[e._v("#")]),e._v(" Batching")]),e._v(" "),_("p",[e._v("A batch is sent every hour or when it reaches the maximum size of "),_("code",[e._v("500Kb")]),e._v(" to avoid sending analytics in real-time and preserve network exchanges.")]),e._v(" "),_("p",[e._v("This batch contains an identify payload and all tracked events that occurred during this hour.")]),e._v(" "),_("h5",{attrs:{id:"logging"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#logging"}},[e._v("#")]),e._v(" Logging")]),e._v(" "),_("p",[e._v("Errors occurring when sending metrics to Segment should be silent. In general, the impact of data collection should be minimized as much as possible concerning performance and be entirely transparent for the user during its use.")]),e._v(" "),_("h4",{attrs:{id:"debug-build"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#debug-build"}},[e._v("#")]),e._v(" Debug build")]),e._v(" "),_("p",[e._v("In debug build, no analytics are collected.")]),e._v(" "),_("h2",{attrs:{id:"_3-future-possibilities"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[e._v("#")]),e._v(" 3. Future possibilities")]),e._v(" "),_("p",[e._v("n/a")])])}),[],!1,null,null,null);t.default=d.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{442:function(e,t,_){"use strict";_.r(t);var v=_(62),d=Object(v.a)({},(function(){var e=this,t=e.$createElement,_=e._self._c||t;return _("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[_("h1",{attrs:{id:"anonymous-analytics-policy"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#anonymous-analytics-policy"}},[e._v("#")]),e._v(" Anonymous Analytics Policy")]),e._v(" "),_("h2",{attrs:{id:"_1-functional-specification"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#_1-functional-specification"}},[e._v("#")]),e._v(" 1. Functional Specification")]),e._v(" "),_("h3",{attrs:{id:"i-summary"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#i-summary"}},[e._v("#")]),e._v(" I. Summary")]),e._v(" "),_("p",[e._v("This specification describes an exhaustive list of anonymous metrics collected by the MeiliSearch binary. It also describes the tools we use for this collection and how we identify a Meilisearch instance.")]),e._v(" "),_("h3",{attrs:{id:"ii-motivation"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#ii-motivation"}},[e._v("#")]),e._v(" II. Motivation")]),e._v(" "),_("p",[e._v("At MeiliSearch, our vision is to provide an easy-to-use search solution that meets the essential needs of our users. At all times, we strive to understand our users better and meet their expectations in the best possible way.")]),e._v(" "),_("p",[e._v("Although we can gather needs and understand our users through several channels such as Github, Slack, surveys, interviews or roadmap votes, we realize that this is not enough to have a complete view of MeiliSearch usage and features adoption. By cross-referencing our product discovery phases with aggregated quantitative data, we want to make the product much better than what it is today. Our decision-making will be taken a step further to make a product that users love.")]),e._v(" "),_("h3",{attrs:{id:"iii-explanation"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#iii-explanation"}},[e._v("#")]),e._v(" III. Explanation")]),e._v(" "),_("h4",{attrs:{id:"general-data-protection-regulation-gdpr"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#general-data-protection-regulation-gdpr"}},[e._v("#")]),e._v(" General Data Protection Regulation (GDPR)")]),e._v(" "),_("p",[e._v("The metrics collected are non-sensitive, non-personal and do not identify an individual or a group of individuals using MeiliSearch. The data collected is secured and anonymized. We do not collect any data from the values stored in the documents.")]),e._v(" "),_("p",[e._v("We, the MeiliSearch team, provide an email address so that users can request the removal of their data: privacy@meilisearch.com."),_("br"),e._v("\nThanks to the unique identifier generated for their MeiliSearch installation ("),_("code",[e._v("Instance UID")]),e._v(" when launching MeiliSearch), we can remove the corresponding data from all the tools we describe below. Any questions regarding the management of the data collected can be sent to the email address as well.")]),e._v(" "),_("h4",{attrs:{id:"tools"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#tools"}},[e._v("#")]),e._v(" Tools")]),e._v(" "),_("h5",{attrs:{id:"segment"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#segment"}},[e._v("#")]),e._v(" Segment")]),e._v(" "),_("p",[e._v("The collected data is sent to "),_("a",{attrs:{href:"https://segment.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Segment"),_("OutboundLink")],1),e._v(". Segment is a platform for data collection and provides data management tools.")]),e._v(" "),_("h5",{attrs:{id:"amplitude"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#amplitude"}},[e._v("#")]),e._v(" Amplitude")]),e._v(" "),_("p",[_("a",{attrs:{href:"https://amplitude.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Amplitude"),_("OutboundLink")],1),e._v(" is a tool for graphing and highlighting collected data. Segment feeds Amplitude so that we can build visualizations according to our needs.")]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"events-table"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#events-table"}},[e._v("#")]),e._v(" Events table")]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Event name")]),e._v(" "),_("th",[e._v("Description")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("Launched")]),e._v(" "),_("td",[e._v("Occurs when MeiliSearch is launched the first time.")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Searched POST")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("indexes/:indexUid/search")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Searched GET")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("GET")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/search")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Facet Searched POST")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/facet-search")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Searched by Multi-Search POST")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("POST")]),e._v("- "),_("code",[e._v("/multi-search")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Added")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Updated")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("PUT")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Fetched GET")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("GET")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents")]),e._v(" or "),_("code",[e._v("GET")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents/:doc_id")]),e._v(" routes during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Fetched POST")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents/fetch")]),e._v(" routes during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Documents Deleted")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("DELETE")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents")]),e._v(", "),_("code",[e._v("DELETE")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents/:documentId")]),e._v(", "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("indexes/:indexUid/documents/delete-batch")]),e._v(", and "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("indexes/:indexUid/documents/delete")]),e._v(" routes during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Index Created")]),e._v(" "),_("td",[e._v("Occurs when an index is created via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Index Updated")]),e._v(" "),_("td",[e._v("Occurs when an index is updated via "),_("code",[e._v("PUT")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Indexes Swapped")]),e._v(" "),_("td",[e._v("Occurs when indexes are swapped via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/swap-indexes")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Settings Updated")]),e._v(" "),_("td",[e._v("Occurs when the settings are updated via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/settings")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("SearchableAttributes Updated")]),e._v(" "),_("td",[e._v("Occurs when searchable attributes are updated via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/settings/searchable-attributes")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("RankingRules Updated")]),e._v(" "),_("td",[e._v("Occurs when ranking rules are updated via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/settings/ranking-rules")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("FilterableAttributes Updated")]),e._v(" "),_("td",[e._v("Occurs when filterable attributes are updated via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/settings/filterable-attributes")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("SortableAttributes Updated")]),e._v(" "),_("td",[e._v("Occurs when sortable attributes are updated via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/settings/sortable-attributes")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("TypoTolerance Updated")]),e._v(" "),_("td",[e._v("Occurs when typo tolerance settings are updated via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/settings/typo-tolerance")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Pagination Updated")]),e._v(" "),_("td",[e._v("Occurs when pagination settings are updated via "),_("code",[e._v("PATCH")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/pagination")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Faceting Updated")]),e._v(" "),_("td",[e._v("Occurs when faceting settings are updated via "),_("code",[e._v("PATCH")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/faceting")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("DistinctAttribute Updated")]),e._v(" "),_("td",[e._v("Occurs when distinct attribute setting is updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/distinct-attribute")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("ProximityPrecision Updated")]),e._v(" "),_("td",[e._v("Occurs when proximity precision setting is updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/proximity-precision")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("DisplayedAttributes Updated")]),e._v(" "),_("td",[e._v("Occurs when displayed attributes are updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/displayed-attributes")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("StopWords Updated")]),e._v(" "),_("td",[e._v("Occurs when stop words are updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/stop-words")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("SeparatorTokens Updated")]),e._v(" "),_("td",[e._v("Occurs when separator tokens are updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/separator-tokens")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("NonSeparatorTokens Updated")]),e._v(" "),_("td",[e._v("Occurs when non separator tokens are updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/non-separator-tokens")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Synonyms Updated")]),e._v(" "),_("td",[e._v("Occurs when synonyms are updated via "),_("code",[e._v("PUT")]),e._v(" — "),_("code",[e._v("/indexes/:indexUid/settings/synonyms")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Dump Created")]),e._v(" "),_("td",[e._v("Occurs when a dump is created via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/dumps")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Snapshot Created")]),e._v(" "),_("td",[e._v("Occurs when a snapshot is created via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/snapshots")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Tasks Canceled")]),e._v(" "),_("td",[e._v("Occurs when tasks are requested to be canceled via "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/tasks/cancel")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Tasks Deleted")]),e._v(" "),_("td",[e._v("Occurs when tasks are requested to be deleted via "),_("code",[e._v("DELETE")]),e._v("- "),_("code",[e._v("/tasks")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Tasks Seen")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("GET")]),e._v(" - "),_("code",[e._v("/tasks")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Stats Seen")]),e._v(" "),_("td",[e._v("Occurs when stats are fetched via "),_("code",[e._v("GET")]),e._v(" - "),_("code",[e._v("/stats")]),e._v(" or "),_("code",[e._v("/indexes/:indexUid/stats")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Health Seen")]),e._v(" "),_("td",[e._v("Aggregated event on all received requests via the "),_("code",[e._v("GET - /health")]),e._v(" route during one hour or until a batch size reaches "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("tr",[_("td",[e._v("Version Seen")]),e._v(" "),_("td",[e._v("Occurs when "),_("code",[e._v("GET - /version")]),e._v(" is fetched.")])]),e._v(" "),_("tr",[_("td",[e._v("Experimental features Seen")]),e._v(" "),_("td",[e._v("Occurs when "),_("code",[e._v("GET - /experimental-features")]),e._v(" is fetched.")])]),e._v(" "),_("tr",[_("td",[e._v("Experimental features Updated")]),e._v(" "),_("td",[e._v("Occurs when experimental features are updated via "),_("code",[e._v("PATCH - /experimental-features")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"summarized-metrics-events-table"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#summarized-metrics-events-table"}},[e._v("#")]),e._v(" Summarized Metrics/Events table")]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Metric name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")]),e._v(" "),_("th",[e._v("Triggered by")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[_("code",[e._v("context.app.version")])]),e._v(" "),_("td",[e._v("MeiliSearch version number")]),e._v(" "),_("td",[e._v("0.23.0")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.env")])]),e._v(" "),_("td",[e._v("MeiliSearch env")]),e._v(" "),_("td",[e._v("production")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.db_path")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--db-path")]),e._v("/"),_("code",[e._v("MEILI_DB_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.import_dump")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--import-dump")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.dump_dir")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--dump-dir")]),e._v("/"),_("code",[e._v("MEILI_DUMP_DIR")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ignore_missing_dump")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore-missing-dump")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ignore_dump_if_db_exists")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore-dump-if-db-exists")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.import_snapshot")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--import-snapshot")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.schedule_snapshot")])]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--schedule_snapshot")]),e._v("/"),_("code",[e._v("MEILI_SCHEDULE_SNAPSHOT")]),e._v(" if scheduled snapshots are enabled, otherwise "),_("code",[e._v("None")])]),e._v(" "),_("td",[e._v("86400")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.snapshot_dir")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--snapshot-dir")]),e._v("/"),_("code",[e._v("MEILI_SNAPSHOT_DIR")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ignore_missing_snapshot")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore_missing_snapshot")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ignore_snapshot_if_db_exists")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore_snapshot_if_db_exists")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.http_addr")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--http-addr")]),e._v("/"),_("code",[e._v("MEILI_HTTP_ADDR")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.http_payload_size_limit")])]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--http-payload-size-limit")]),e._v("/"),_("code",[e._v("MEILI_HTTP_PAYLOAD_SIZE_LIMIT")]),e._v(" in bytes")]),e._v(" "),_("td",[e._v("336042103")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.log_level")])]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--log-level")]),e._v("/"),_("code",[e._v("MEILI_LOG_LEVEL")])]),e._v(" "),_("td",[e._v("debug")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.max_indexing_memory")])]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--max-indexing-memory")]),e._v("/"),_("code",[e._v("MEILI_MAX_INDEXING_MEMORY")]),e._v(" in bytes")]),e._v(" "),_("td",[e._v("336042103")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.max_indexing_threads")])]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--max-indexing-threads")]),e._v("/"),_("code",[e._v("MEILI_MAX_INDEXING_THREADS")]),e._v(" in integer")]),e._v(" "),_("td",[e._v("4")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_auth_path")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-auth-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_AUTH_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_cert_path")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-cert-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_CERT_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_key_path")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-key-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_KEY_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_ocsp_path")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-ocsp-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_OCSP_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_require_auth")])]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--ssl-require-auth")]),e._v("/"),_("code",[e._v("MEILI_SSL_REQUIRE_AUTH")]),e._v(" as a boolean")]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_resumption")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-resumption")]),e._v("/"),_("code",[e._v("MEILI_SSL_RESUMPTION")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.ssl_tickets")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-tickets")]),e._v("/"),_("code",[e._v("MEILI_SSL_TICKETS")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.with_configuration_file")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the instance is launched with a configuration file, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.task_queue_webhook")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the instance is launched with a task queue webhook, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.experimental_enable_metrics")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-enable-metrics")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_ENABLE_METRICS")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.experimental_replication_parameters")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-replication-parameters")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_REPLICATION_PARAMETERS")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.experimental_logs_mode")])]),e._v(" "),_("td",[_("code",[e._v("human")]),e._v(" or "),_("code",[e._v("json")]),e._v(" depending on the value specified.")]),e._v(" "),_("td",[_("code",[e._v("human")])]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.experimental_enable_logs_route")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-enable-logs-route")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_ENABLE_LOGS_ROUTE")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.experimental_reduce_indexing_memory_usage")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-reduce-indexing-memory-usage")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_REDUCE_INDEXING_MEMORY_USAGE")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.gpu_enabled")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if Meilisearch was compiled with CUDA support, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("Every Hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("system.distribution")])]),e._v(" "),_("td",[e._v("Distribution on which MeiliSearch is launched")]),e._v(" "),_("td",[e._v("Arch Linux")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("system.kernel_version")])]),e._v(" "),_("td",[e._v("Kernel version on which MeiliSearch is launched")]),e._v(" "),_("td",[e._v("5.14.10")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("system.cores")])]),e._v(" "),_("td",[e._v("Number of cores")]),e._v(" "),_("td",[e._v("24")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("system.ram_size")])]),e._v(" "),_("td",[e._v("Total RAM capacity. Expressed in "),_("code",[e._v("KB")])]),e._v(" "),_("td",[e._v("16777216")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("system.disk_size")])]),e._v(" "),_("td",[e._v("Total capacity of the largest disk. Expressed in "),_("code",[e._v("Bytes")])]),e._v(" "),_("td",[e._v("1048576000")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("system.server_prodiver")])]),e._v(" "),_("td",[e._v("Users can tell us on which provider MeiliSearch is hosted by filling the "),_("code",[e._v("MEILI_SERVER_PROVIDER")]),e._v(" env var. This is also filled by our cloud deploy scripts, e.g. "),_("a",{attrs:{href:"https://github.com/meilisearch/cloud-scripts/blob/56a7c2630c1a508e5ad0c0ba1d8cfeb8d2fa9ae0/scripts/providers/gcp/cloud-config.yaml#L33",target:"_blank",rel:"noopener noreferrer"}},[e._v("GCP cloud-config.yaml"),_("OutboundLink")],1)]),e._v(" "),_("td",[e._v("gcp")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("stats.database_size")])]),e._v(" "),_("td",[e._v("Database size. Expressed in "),_("code",[e._v("Bytes")])]),e._v(" "),_("td",[e._v("2621440")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("stats.indexes_number")])]),e._v(" "),_("td",[e._v("Number of indexes")]),e._v(" "),_("td",[e._v("2")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("start_since_days")])]),e._v(" "),_("td",[e._v("Number of days since instance was launched")]),e._v(" "),_("td",[e._v("365")]),e._v(" "),_("td",[e._v("Every hour")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("user_agent")])]),e._v(" "),_("td",[e._v("User-agent header encountered during one or more API calls")]),e._v(" "),_("td",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Index Created")]),e._v(", "),_("code",[e._v("Index Updated")]),e._v(", "),_("code",[e._v("Documents Added")]),e._v(", "),_("code",[e._v("Documents Updated")]),e._v(", "),_("code",[e._v("Documents Deleted")]),e._v(", "),_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")]),e._v(", "),_("code",[e._v("SortableAttributes Updated")]),e._v(", "),_("code",[e._v("FilterableAttributes Updated")]),e._v(", "),_("code",[e._v("SearchableAttributes Updated")]),e._v(", "),_("code",[e._v("TypoTolerance Updated")]),e._v(", "),_("code",[e._v("Pagination Updated")]),e._v(", "),_("code",[e._v("Faceting Updated")]),e._v(", "),_("code",[e._v("DistinctAttribute Updated")]),e._v(", "),_("code",[e._v("DisplayedAttributes Updated")]),e._v(", "),_("code",[e._v("StopWords Updated")]),e._v(", "),_("code",[e._v("Synonyms Updated")]),e._v(", "),_("code",[e._v("Dump Created")]),e._v(", "),_("code",[e._v("Snapshot Created")]),e._v(", "),_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Stats Seen")]),e._v(", "),_("code",[e._v("Health Seen")]),e._v(", "),_("code",[e._v("Version Seen")]),e._v(", "),_("code",[e._v("Documents Searched by Multi-Search POST")]),e._v(", "),_("code",[e._v("Experimental features Seen")]),e._v(", "),_("code",[e._v("Experimental features Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("requests.99th_response_time")])]),e._v(" "),_("td",[e._v("Highest latency from among the fastest 99% of successful search requests")]),e._v(" "),_("td",[e._v("57ms")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("requests.total_succeeded")])]),e._v(" "),_("td",[e._v("Total number of successful requests in this batch")]),e._v(" "),_("td",[e._v("3456")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("requests.total_failed")])]),e._v(" "),_("td",[e._v("Total number of failed requests in this batch")]),e._v(" "),_("td",[e._v("24")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("requests.total_received")])]),e._v(" "),_("td",[e._v("Total number of received requests in this batch")]),e._v(" "),_("td",[e._v("3480")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Deleted")]),e._v(", "),_("code",[e._v("Documents Fetched GET")]),e._v(", "),_("code",[e._v("Documents Fetched POST")]),e._v(", "),_("code",[e._v("Health Seen")]),e._v(", "),_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("sort.with_geoPoint")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the sort rule "),_("code",[e._v("_geoPoint")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("sort.avg_criteria_number")])]),e._v(" "),_("td",[e._v("Average number of sort criteria among all requests containing the "),_("code",[e._v("sort")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("2")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filter.with_geoRadius")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the filter rule "),_("code",[e._v("_geoRadius")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filter.with_geoBoundingBox")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the filter rule "),_("code",[e._v("_geoBoundingBox")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filter.most_used_syntax")])]),e._v(" "),_("td",[e._v("Most used filter syntax among all requests containing the "),_("code",[e._v("filter")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("string")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("attributes_to_search_on.total_number_of_uses")])]),e._v(" "),_("td",[e._v("Total number of queries where "),_("code",[e._v("attributesToSearchOn")]),e._v(" is set")]),e._v(" "),_("td",[e._v("5")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("q.max_terms_number")])]),e._v(" "),_("td",[e._v("Highest number of terms given for the "),_("code",[e._v("q")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("5")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("vector.max_vector_size")])]),e._v(" "),_("td",[e._v("Highest number of dimensions given for the "),_("code",[e._v("vector")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("1536")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_limit")])]),e._v(" "),_("td",[e._v("Highest value given for the "),_("code",[e._v("limit")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("60")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Fetched GET")]),e._v(", "),_("code",[e._v("Documents Fetched POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_offset")])]),e._v(" "),_("td",[e._v("Highest value given for the "),_("code",[e._v("offset")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("1000")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Fetched GET")]),e._v(", "),_("code",[e._v("Documents Fetched POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.most_used_navigation")])]),e._v(" "),_("td",[e._v("Most used search results navigation among all search requests in this batch. "),_("code",[e._v("estimated")]),e._v(" / "),_("code",[e._v("exhaustive")])]),e._v(" "),_("td",[_("code",[e._v("estimated")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.max_attributes_to_retrieve")])]),e._v(" "),_("td",[e._v("The maximum number of attributes to retrieve encountered among all requests in this batch.")]),e._v(" "),_("td",[e._v("100")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.max_attributes_to_highlight")])]),e._v(" "),_("td",[e._v("The maximum number of attributes to highlight encountered among all requests in this batch.")]),e._v(" "),_("td",[e._v("100")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.highlight_pre_tag")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("highlightPreTag")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.highlight_post_tag")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("highlightPostTag")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.max_attributes_to_crop")])]),e._v(" "),_("td",[e._v("The maximum number of attributes to crop encountered among all requests in this batch.")]),e._v(" "),_("td",[e._v("100")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.crop_length")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("cropLength")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.crop_marker")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("cropMarker")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("formatting.show_matches_position")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("showMatchesPosition")]),e._v(" was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("facets.avg_facets_number")])]),e._v(" "),_("td",[e._v("The average number of facets among all the requests containing the "),_("code",[e._v("facets")]),e._v(" parameter in this batch. "),_("code",[e._v('"facets": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("facets")]),e._v(" does not influence the average in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("10")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("primary_key")])]),e._v(" "),_("td",[e._v("Value given for the "),_("code",[e._v("primaryKey")]),e._v(" parameter if used, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[e._v("id")]),e._v(" "),_("td",[_("code",[e._v("Index Created")]),e._v(", "),_("code",[e._v("Index Updated")]),e._v(", "),_("code",[e._v("Documents Added")]),e._v(", "),_("code",[e._v("Documents Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("payload_type")])]),e._v(" "),_("td",[e._v("All "),_("code",[e._v("payload_type")]),e._v(" encountered in this batch")]),e._v(" "),_("td",[e._v('["application/json", "text/plain", "application/x-ndjson"]')]),e._v(" "),_("td",[_("code",[e._v("Documents Added")]),e._v(", "),_("code",[e._v("Documents Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("index_creation")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if a document addition or update request triggered index creation in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[_("code",[e._v("Documents Added")]),e._v(", "),_("code",[e._v("Documents Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.words_position")])]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("words")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("1")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.typo_position")])]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("typo")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("2")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.proximity_position")])]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("proximity")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.attribute_position")])]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("attribute")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("4")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.sort_position")])]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("sort")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("5")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.exactness_position")])]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("exactness")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("6")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("ranking_rules.values")])]),e._v(" "),_("td",[e._v("A string representing the ranking rules without the custom asc-desc rules.")]),e._v(" "),_("td",[_("code",[e._v('"words, typo, attribute, sort, exactness"')])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Ranking Rules Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("sortable_attributes.total")])]),e._v(" "),_("td",[e._v("Number of sortable attributes")]),e._v(" "),_("td",[e._v("3")]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("SortableAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("sortable_attributes.has_geo")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("_geo")]),e._v(" is set as a sortable attribute, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("SortableAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filterable_attributes.total")])]),e._v(" "),_("td",[e._v("Number of filterable attributes")]),e._v(" "),_("td",[e._v("3")]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("FilterableAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filterable_attributes.has_geo")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("_geo")]),e._v(" is set as a filterable attribute, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("FilterableAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("searchable_attributes.total")])]),e._v(" "),_("td",[e._v("Number of searchable attributes")]),e._v(" "),_("td",[e._v("4")]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("SearchableAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("searchable_attributes.with_wildcard")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("*")]),e._v(" is specified as a searchable attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("SearchableAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("typo_tolerance.enabled")])]),e._v(" "),_("td",[e._v("Whether the typo tolerance is enabled")]),e._v(" "),_("td",[_("code",[e._v("true")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("TypoTolerance Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("typo_tolerance.disable_on_attributes")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if at least one value is defined")]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("TypoTolerance Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("typo_tolerance.disable_on_words")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if at least one value is defined")]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("TypoTolerance Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("typo_tolerance.min_word_size_for_typos.one_typo")])]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("minWordSizeForTypos.oneTypo")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("5")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("TypoTolerance Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("typo_tolerance.min_word_size_for_typos.two_typos")])]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("minWordSizeForTypos.twoTypos")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("9")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("TypoTolerance Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_total_hits")])]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("pagination.maxTotalHits")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("1000")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Pagination Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("faceting.max_values_per_facet")])]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("faceting.maxValuesPerFacet")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("100")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Faceting Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("faceting.sort_facet_values_by_star_count")])]),e._v(" "),_("td",[e._v("Whether the user set all fields to be sort by count")]),e._v(" "),_("td",[_("code",[e._v("true")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Faceting Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("faceting.sort_facet_values_by_total")])]),e._v(" "),_("td",[e._v("The number of different values that were set")]),e._v(" "),_("td",[_("code",[e._v("10")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Faceting Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("distinct_attribute.set")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if a field name is specified as a distrinct attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("DistinctAttribute Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("proximity_precision.set")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" the setting has been manually set, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("ProximityPrecision Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("proximity_precision.value")])]),e._v(" "),_("td",[_("code",[e._v("byWord")]),e._v(" or "),_("code",[e._v("byAttribute")]),e._v(" if the setting has been set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("ProximityPrecision Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("displayed_attributes.total")])]),e._v(" "),_("td",[e._v("Number of displayed attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("SettingUpdated")]),e._v(", "),_("code",[e._v("DisplayedAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("displayed_attributes.with_wildcard")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("*")]),e._v(" is specified as a displayed attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("SettingUpdated")]),e._v(", "),_("code",[e._v("DisplayedAttributes Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("stop_words.total")])]),e._v(" "),_("td",[e._v("Number of stop words.")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("StopWords Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("separator_tokens.total")])]),e._v(" "),_("td",[e._v("Number of separator tokens.")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("SeparatorTokens Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("non_separator_tokens.total")])]),e._v(" "),_("td",[e._v("Number of non separator tokens.")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("NonSeparatorTokens Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("dictionary.total")])]),e._v(" "),_("td",[e._v("Number of words in the dictionary.")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Dictionary Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("synonyms.total")])]),e._v(" "),_("td",[e._v("Number of synonyms.")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Settings Updated")]),e._v(", "),_("code",[e._v("Synonyms Updated")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_task_uid")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if an uid is used to fetch a particular task resource, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("true")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_uid")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("uids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_index_uid")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("indexUids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_type")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("types")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_status")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("statuses")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_canceled_by")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("canceledBy")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_before_enqueued_at")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_after_enqueued_at")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_before_started_at")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_after_started_at")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_before_finished_at")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("filtered_by_after_finished_at")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Tasks Seen")]),e._v(", "),_("code",[e._v("Tasks Canceled")]),e._v(", "),_("code",[e._v("Tasks Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_index_uid")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if an uid is used to fetch an index stat resource, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Stats Seen")])])]),e._v(" "),_("tr",[_("td",[e._v("searches.avg_search_count")]),e._v(" "),_("td",[e._v("The average number of search queries received per call for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("4.2")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[e._v("searches.total_search_count")]),e._v(" "),_("td",[e._v("The total number of search queries received for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("16023")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[e._v("indexes.avg_distinct_index_count")]),e._v(" "),_("td",[e._v("The average number of queried indexes received per call for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("1.2")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[e._v("indexes.total_distinct_index_count")]),e._v(" "),_("td",[e._v("The total number of distinct indexes queries for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("6023")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[e._v("indexes.total_single_index")]),e._v(" "),_("td",[e._v("The total number of calls where only one index where queried.")]),e._v(" "),_("td",[_("code",[e._v("2007")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("swap_operation_number")])]),e._v(" "),_("td",[e._v("The number of swap operation given in "),_("code",[e._v("POST /swap-indexes")]),e._v(" API call")]),e._v(" "),_("td",[e._v("2")]),e._v(" "),_("td",[_("code",[e._v("Indexes Swapped")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("matching_strategy.most_used_strategy")])]),e._v(" "),_("td",[e._v("Most used word matching strategy among all search requests in this batch")]),e._v(" "),_("td",[_("code",[e._v("last")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_document_id")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("DELETE /indexes/:indexUid/documents/:documentUid")]),e._v(" endpoint was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_batch")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("POST /indexes/:indexUid/documents/delete-batch")]),e._v(" endpoint was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_filter")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("POST /indexes/:indexUid/documents/delete")]),e._v(" endpoint was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Fetched GET")]),e._v(", "),_("code",[e._v("Documents Fetched POST")]),e._v(", "),_("code",[e._v("Documents Deleted")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("clear_all")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("DELETE /indexes/:indexUid/documents")]),e._v(" endpoint was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")]),e._v(" "),_("td",[_("code",[e._v("Documents Deleted")])])]),e._v(" "),_("tr",[_("td",[e._v("vector_store")]),e._v(" "),_("td",[e._v("Whether the "),_("RouterLink",{attrs:{to:"/specifications/text/0193-experimental-features.html#vector-store"}},[e._v("vector store")]),e._v(" feature is enabled.")],1),e._v(" "),_("td",[_("code",[e._v("true")])]),e._v(" "),_("td",[_("code",[e._v("Experimental features Updated")])])]),e._v(" "),_("tr",[_("td",[e._v("scoring.show_ranking_score")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showRankingScore")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(", otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Searched by Multi-Search POST")])])]),e._v(" "),_("tr",[_("td",[e._v("scoring.show_ranking_score_details")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showRankingScoreDetails")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(", otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("Documents Searched POST")]),e._v(", "),_("code",[e._v("Documents Searched GET")]),e._v(", "),_("code",[e._v("Documents Searched GET")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("facets.total_distinct_facet_count")])]),e._v(" "),_("td",[e._v("The total number of distinct facets queried for the aggregated event")]),e._v(" "),_("td",[_("code",[e._v("3")])]),e._v(" "),_("td",[_("code",[e._v("Facet Searched POST")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("facets.additional_search_parameters_provided")])]),e._v(" "),_("td",[e._v("Were additional search parameters provided for the aggregated event")]),e._v(" "),_("td",[_("code",[e._v("true")])]),e._v(" "),_("td",[_("code",[e._v("Facet Searched POST")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"detailed-list-of-instance-metrics-and-events-with-their-metrics"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#detailed-list-of-instance-metrics-and-events-with-their-metrics"}},[e._v("#")]),e._v(" Detailed list of Instance metrics and, events with their metrics")]),e._v(" "),_("h5",{attrs:{id:"system-configuration-system"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#system-configuration-system"}},[e._v("#")]),e._v(" System Configuration "),_("code",[e._v("system")])]),e._v(" "),_("p",[e._v("This property allows us to gather essential information to better understand on which type of machine MeiliSearch is used. This allows us to better advise users on the machines to choose according to their data volume and their use-cases.")]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("system.distribution")]),e._v(" "),_("td",[e._v("Distribution on which MeiliSearch is launched")]),e._v(" "),_("td",[_("code",[e._v("Arch Linux")])])]),e._v(" "),_("tr",[_("td",[e._v("system.kernel_version")]),e._v(" "),_("td",[e._v("Kernel version on which MeiliSearch is launched")]),e._v(" "),_("td",[_("code",[e._v("5.14.10-arch1-1")])])]),e._v(" "),_("tr",[_("td",[e._v("system.cores")]),e._v(" "),_("td",[e._v("Number of cores")]),e._v(" "),_("td",[_("code",[e._v("24")])])]),e._v(" "),_("tr",[_("td",[e._v("system.ram_size")]),e._v(" "),_("td",[e._v("Total RAM capacity. Expressed in "),_("code",[e._v("KB")])]),e._v(" "),_("td",[_("code",[e._v("33604210")])])]),e._v(" "),_("tr",[_("td",[e._v("system.disk_size")]),e._v(" "),_("td",[e._v("Total capacity of the largest disk. Expressed in "),_("code",[e._v("Bytes")])]),e._v(" "),_("td",[_("code",[e._v("336042103")])])]),e._v(" "),_("tr",[_("td",[e._v("system.server_provider")]),e._v(" "),_("td",[e._v("Users can tell us on which provider MeiliSearch is hosted by filling the "),_("code",[e._v("MEILI_SERVER_PROVIDER")]),e._v(" env var. This is also filled by our providers deploy scripts. e.g. "),_("a",{attrs:{href:"https://github.com/meilisearch/cloud-scripts/blob/56a7c2630c1a508e5ad0c0ba1d8cfeb8d2fa9ae0/scripts/providers/gcp/cloud-config.yaml#L33",target:"_blank",rel:"noopener noreferrer"}},[e._v("GCP cloud-config.yaml"),_("OutboundLink")],1)]),e._v(" "),_("td",[_("code",[e._v("gcp")])])])])]),e._v(" "),_("h5",{attrs:{id:"meilisearch-configuration-context-and-infos"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#meilisearch-configuration-context-and-infos"}},[e._v("#")]),e._v(" MeiliSearch Configuration "),_("code",[e._v("context")]),e._v(" and "),_("code",[e._v("infos")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("context.app.version")]),e._v(" "),_("td",[e._v("MeiliSearch version number. Sent in a "),_("code",[e._v("context")]),e._v(" object instead of "),_("code",[e._v("properties")]),e._v(" to match Amplitude requirement")]),e._v(" "),_("td",[e._v("0.23.0")])]),e._v(" "),_("tr",[_("td",[e._v("infos.env")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--env")]),e._v("/"),_("code",[e._v("MEILI_ENV")])]),e._v(" "),_("td",[_("code",[e._v("production")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.db_path")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--db-path")]),e._v("/"),_("code",[e._v("MEILI_DB_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.import_dump")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--import-dump")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.dump_dir")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--dump-dir")]),e._v("/"),_("code",[e._v("MEILI_DUMP_DIR")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.ignore_missing_dump")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore-missing-dump")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.ignore_dump_if_db_exists")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore-dump-if-db-exists")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.import_snapshot")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--import-snapshot")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.schedule_snapshot")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--schedule_snapshot")]),e._v("/"),_("code",[e._v("MEILI_SCHEDULE_SNAPSHOT")]),e._v(" if scheduled snapshots are enabled, otherwise "),_("code",[e._v("None")])]),e._v(" "),_("td",[_("code",[e._v("86400")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.snapshot_dir")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--snapshot-dir")]),e._v("/"),_("code",[e._v("MEILI_SNAPSHOT_DIR")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.ignore_missing_snapshot")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore-missing-snapshot")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.ignore_snapshot_if_db_exists")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ignore-snapshot-if-db-exists")]),e._v(" is specified to true, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.http_addr")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--http-addr")]),e._v("/"),_("code",[e._v("MEILI_HTTP_ADDR")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.http_payload_size_limit")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--http-payload-size-limit")]),e._v("/"),_("code",[e._v("MEILI_HTTP_PAYLOAD_SIZE_LIMIT")]),e._v(" in bytes")]),e._v(" "),_("td",[_("code",[e._v("336042103")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.log_level")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--log-level")]),e._v("/"),_("code",[e._v("MEILI_LOG_LEVEL")])]),e._v(" "),_("td",[_("code",[e._v("debug")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.max_indexing_memory")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--max-indexing-memory")]),e._v("/"),_("code",[e._v("MEILI_MAX_INDEXING_MEMORY")]),e._v(" in bytes")]),e._v(" "),_("td",[_("code",[e._v("336042103")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.max_indexing_threads")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--max-indexing-threads")]),e._v("/"),_("code",[e._v("MEILI_MAX_INDEXING_THREADS")]),e._v(" in integer")]),e._v(" "),_("td",[_("code",[e._v("4")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_auth_path")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-auth-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_AUTH_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_cert_path")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-cert-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_CERT_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_key_path")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-key-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_KEY_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_ocsp_path")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-ocsp-path")]),e._v("/"),_("code",[e._v("MEILI_SSL_OCSP_PATH")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_require_auth")]),e._v(" "),_("td",[e._v("Value of "),_("code",[e._v("--ssl-require-auth")]),e._v("/"),_("code",[e._v("MEILI_SSL_REQUIRE_AUTH")]),e._v(" as a boolean")]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_resumption")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-resumption")]),e._v("/"),_("code",[e._v("MEILI_SSL_RESUMPTION")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.ssl_tickets")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--ssl-tickets")]),e._v("/"),_("code",[e._v("MEILI_SSL_TICKETS")]),e._v(" is specified, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("infos.with_configuration_file")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the instance is launched with a configuration file, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.task_queue_webhook")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if the instance is launched with a task queue webhook, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.experimental_enable_metrics")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-enable-metrics")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_ENABLE_METRICS")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.experimental_replication_parameters")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-replication-parameters")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_REPLICATION_PARAMETERS")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.experimental_logs_mode")]),e._v(" "),_("td",[_("code",[e._v("human")]),e._v(" or "),_("code",[e._v("json")]),e._v(" depending on the value specified.")]),e._v(" "),_("td",[_("code",[e._v("human")])])]),e._v(" "),_("tr",[_("td",[e._v("infos.experimental_enable_logs_route")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-enable-logs-route")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_ENABLE_LOGS_ROUTE")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.experimental_reduce_indexing_memory_usage")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("--experimental-reduce-indexing-memory-usage")]),e._v("/"),_("code",[e._v("MEILI_EXPERIMENTAL_REDUCE_INDEXING_MEMORY_USAGE")]),e._v(" is specified at launch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("infos.gpu_enabled")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if Meilisearch was compiled with CUDA support, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("h5",{attrs:{id:"meilisearch-statistics-stats"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#meilisearch-statistics-stats"}},[e._v("#")]),e._v(" MeiliSearch Statistics "),_("code",[e._v("stats")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("stats.database_size")]),e._v(" "),_("td",[e._v("Database size. Expressed in "),_("code",[e._v("Bytes")])]),e._v(" "),_("td",[_("code",[e._v("180230")])])]),e._v(" "),_("tr",[_("td",[e._v("stats.indexes_number")]),e._v(" "),_("td",[e._v("Number of indexes")]),e._v(" "),_("td",[_("code",[e._v("2")])])]),e._v(" "),_("tr",[_("td",[e._v("stats.documents_number")]),e._v(" "),_("td",[e._v("Number of indexed documents")]),e._v(" "),_("td",[_("code",[e._v("165847")])])]),e._v(" "),_("tr",[_("td",[e._v("start_since_days")]),e._v(" "),_("td",[e._v("Number of days since instance was launched")]),e._v(" "),_("td",[_("code",[e._v("328")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"launched"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#launched"}},[e._v("#")]),e._v(" "),_("code",[e._v("Launched")])]),e._v(" "),_("blockquote",[_("p",[e._v("This is the first event sent to mark that MeiliSearch is launched a first time.")])]),e._v(" "),_("h4",{attrs:{id:"documents-searched-post"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-searched-post"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Searched POST")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Searched event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(". The event's properties are averaged over all requests on "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/search")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.99th_response_time")]),e._v(" "),_("td",[e._v("The maximum latency, in "),_("code",[e._v("ms")]),e._v(", for the fastest 99% of succeeded requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("57ms")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_succeeded")]),e._v(" "),_("td",[e._v("The total number of succeeded search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3456")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_failed")]),e._v(" "),_("td",[e._v("The total number of failed search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("24")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The total number of received search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])]),e._v(" "),_("tr",[_("td",[e._v("sort.with_geoPoint")]),e._v(" "),_("td",[e._v("Does the built-in sort rule _geoPoint rule has been used in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("sort.avg_criteria_number")]),e._v(" "),_("td",[e._v("The average number of sort criteria among all the requests containing the "),_("code",[e._v("sort")]),e._v(" parameter in the aggregated event. "),_("code",[e._v('"sort": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("sort")]),e._v(" does not influence the average.")]),e._v(" "),_("td",[_("code",[e._v("2")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.with_geoRadius")]),e._v(" "),_("td",[e._v("Does the built-in filter rule _geoRadius has been used in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.with_geoBoundingBox")]),e._v(" "),_("td",[e._v("Does the built-in filter rule _geoBoundingBox has been used in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.avg_criteria_number")]),e._v(" "),_("td",[e._v("The average number of filter criteria among all the requests containing the "),_("code",[e._v("filter")]),e._v(" parameter in the aggregated event. "),_("code",[e._v('"filter": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("filter")]),e._v(" does not influence the average in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("4")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.most_used_syntax")]),e._v(" "),_("td",[e._v("The most used filter syntax among all the requests containing the requests containing the "),_("code",[e._v("filter")]),e._v(" parameter in the aggregated event. "),_("code",[e._v("string")]),e._v(" / "),_("code",[e._v("array")]),e._v(" / "),_("code",[e._v("mixed")])]),e._v(" "),_("td",[_("code",[e._v("mixed")])])]),e._v(" "),_("tr",[_("td",[e._v("attributes_to_search_on.total_number_of_uses")]),e._v(" "),_("td",[e._v("Total number of queries where "),_("code",[e._v("attributesToSearchOn")]),e._v(" is set")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("q.max_terms_number")]),e._v(" "),_("td",[e._v("The maximum number of terms for the "),_("code",[e._v("q")]),e._v(" parameter among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("vector.max_vector_size")]),e._v(" "),_("td",[e._v("The maximum number of dimensions for the "),_("code",[e._v("vector")]),e._v(" parameter among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("1536")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.max_limit")]),e._v(" "),_("td",[e._v("The maximum limit encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("20")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.max_offset")]),e._v(" "),_("td",[e._v("The maximum offset encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("1000")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.most_used_navigation")]),e._v(" "),_("td",[e._v("Most used search results navigation among all requests in the aggregated event. "),_("code",[e._v("estimated")]),e._v(" / "),_("code",[e._v("exhaustive")])]),e._v(" "),_("td",[_("code",[e._v("estimated")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.max_attributes_to_retrieve")]),e._v(" "),_("td",[e._v("The maximum number of attributes to retrieve encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.max_attributes_to_highlight")]),e._v(" "),_("td",[e._v("The maximum number of attributes to highlight encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.highlight_pre_tag")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("highlightPreTag")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.highlight_post_tag")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("highlightPostTag")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.max_attributes_to_crop")]),e._v(" "),_("td",[e._v("The maximum number of attributes to crop encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.crop_length")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("cropLength")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.crop_marker")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("cropMarker")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.show_matches_position")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showMatchesPosition")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("facets.avg_facets_number")]),e._v(" "),_("td",[e._v("The average number of facets among all the requests containing the "),_("code",[e._v("facets")]),e._v(" parameter in the aggregated event. "),_("code",[e._v('"facets": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("facets")]),e._v(" does not influence the average in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("10")])])]),e._v(" "),_("tr",[_("td",[e._v("matching_strategy.most_used_strategy")]),e._v(" "),_("td",[e._v("Most used word matching strategy among all search requests in the aggregated event. "),_("code",[e._v("last")]),e._v(" / "),_("code",[e._v("all")])]),e._v(" "),_("td",[_("code",[e._v("last")])])]),e._v(" "),_("tr",[_("td",[e._v("scoring.show_ranking_score")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showRankingScore")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(", otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("scoring.show_ranking_score_details")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showRankingScoreDetails")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(", otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"documents-searched-get"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-searched-get"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Searched GET")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Searched event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(". The event's properties are averaged over all requests on "),_("code",[e._v("GET")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/search")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.99th_response_time")]),e._v(" "),_("td",[e._v("Highest latency from among the fastest 99% of successful search requests.")]),e._v(" "),_("td",[_("code",[e._v("57ms")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_succeeded")]),e._v(" "),_("td",[e._v("The total number of succeeded search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3456")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_failed")]),e._v(" "),_("td",[e._v("The total number of failed search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("24")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The total number of received search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])]),e._v(" "),_("tr",[_("td",[e._v("sort.with_geoPoint")]),e._v(" "),_("td",[e._v("Does the built-in sort rule _geoPoint rule has been used in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("sort.avg_criteria_number")]),e._v(" "),_("td",[e._v("The average number of sort criteria among all the requests containing the "),_("code",[e._v("sort")]),e._v(" parameter in the aggregated event. "),_("code",[e._v('"sort": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("sort")]),e._v(" does not influence the average.")]),e._v(" "),_("td",[_("code",[e._v("2")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.with_geoRadius")]),e._v(" "),_("td",[e._v("Does the built-in filter rule _geoRadius has been used in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.with_geoBoundingBox")]),e._v(" "),_("td",[e._v("Does the built-in filter rule _geoBoundingBox has been used in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.avg_criteria_number")]),e._v(" "),_("td",[e._v("The average number of filter criteria among all the requests containing the "),_("code",[e._v("filter")]),e._v(" parameter in the aggregated event. "),_("code",[e._v('"filter": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("filter")]),e._v(" does not influence the average in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("4")])])]),e._v(" "),_("tr",[_("td",[e._v("filter.most_used_syntax")]),e._v(" "),_("td",[e._v("The most used filter syntax among all the requests containing the requests containing the "),_("code",[e._v("filter")]),e._v(" parameter in the aggregated event. "),_("code",[e._v("string")]),e._v(" / "),_("code",[e._v("array")]),e._v(" / "),_("code",[e._v("mixed")])]),e._v(" "),_("td",[_("code",[e._v("mixed")])])]),e._v(" "),_("tr",[_("td",[e._v("attributes_to_search_on.total_number_of_uses")]),e._v(" "),_("td",[e._v("Total number of queries where "),_("code",[e._v("attributesToSearchOn")]),e._v(" is set")]),e._v(" "),_("td",[e._v("5")])]),e._v(" "),_("tr",[_("td",[e._v("q.max_terms_number")]),e._v(" "),_("td",[e._v("The maximum number of terms for the "),_("code",[e._v("q")]),e._v(" parameter among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.max_limit")]),e._v(" "),_("td",[e._v("The maximum limit encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("20")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.max_offset")]),e._v(" "),_("td",[e._v("The maximum offset encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("1000")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.most_used_navigation")]),e._v(" "),_("td",[e._v("Most used search results navigation among all requests in the aggregated event. "),_("code",[e._v("estimated")]),e._v(" / "),_("code",[e._v("exhaustive")])]),e._v(" "),_("td",[_("code",[e._v("estimated")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.max_attributes_to_retrieve")]),e._v(" "),_("td",[e._v("The maximum number of attributes to retrieve encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.max_attributes_to_highlight")]),e._v(" "),_("td",[e._v("The maximum number of attributes to highlight encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.highlight_pre_tag")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("highlightPreTag")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.highlight_post_tag")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("highlightPostTag")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.max_attributes_to_crop")]),e._v(" "),_("td",[e._v("The maximum number of attributes to crop encountered among all requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.crop_length")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("cropLength")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.crop_marker")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("cropMarker")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("formatting.show_matches_position")]),e._v(" "),_("td",[e._v("Does "),_("code",[e._v("showMatchesPosition")]),e._v(" has been used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(" otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("facets.avg_facets_number")]),e._v(" "),_("td",[e._v("The average number of facets among all the requests containing the "),_("code",[e._v("facets")]),e._v(" parameter in the aggregated event. "),_("code",[e._v('"facets": []')]),e._v(" equals to "),_("code",[e._v("0")]),e._v(" while not sending "),_("code",[e._v("facets")]),e._v(" does not influence the average in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("10")])])]),e._v(" "),_("tr",[_("td",[e._v("matching_strategy.most_used_strategy")]),e._v(" "),_("td",[e._v("Most used word matching strategy among all search requests in the aggregated event. "),_("code",[e._v("last")]),e._v(" / "),_("code",[e._v("all")])]),e._v(" "),_("td",[_("code",[e._v("last")])])]),e._v(" "),_("tr",[_("td",[e._v("scoring.show_ranking_score")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showRankingScore")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(", otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("scoring.show_ranking_score_details")]),e._v(" "),_("td",[e._v("Was "),_("code",[e._v("showRankingScoreDetails")]),e._v(" used in the aggregated event? If yes, "),_("code",[e._v("true")]),e._v(", otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"facet-searched-post"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#facet-searched-post"}},[e._v("#")]),e._v(" "),_("code",[e._v("Facet Searched POST")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Facet Searched event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(". The event's properties are averaged over all requests on "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/facet-search")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.99th_response_time")]),e._v(" "),_("td",[e._v("Highest latency from among the fastest 99% of successful search requests.")]),e._v(" "),_("td",[_("code",[e._v("57ms")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_succeeded")]),e._v(" "),_("td",[e._v("The total number of succeeded search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3456")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_failed")]),e._v(" "),_("td",[e._v("The total number of failed search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("24")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The total number of received search requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])]),e._v(" "),_("tr",[_("td",[e._v("facets.total_distinct_facet_count")]),e._v(" "),_("td",[e._v("The total number of distinct facets queried for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("facets.additional_search_parameters_provided")]),e._v(" "),_("td",[e._v("Were additional search parameters provided for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("true")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"documents-searched-by-multi-search-post"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-searched-by-multi-search-post"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Searched by Multi-Search POST")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Searched event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(". The event's properties are averaged over all requests on "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/multi-search")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_succeeded")]),e._v(" "),_("td",[e._v("The number of succeeded calls on the endpoint for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3456")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_failed")]),e._v(" "),_("td",[e._v("The number of calls on the endpoint for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("24")])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The number of calls on the endpoint for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])]),e._v(" "),_("tr",[_("td",[e._v("searches.avg_search_count")]),e._v(" "),_("td",[e._v("The average number of search queries received per call for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("4.2")])])]),e._v(" "),_("tr",[_("td",[e._v("searches.total_search_count")]),e._v(" "),_("td",[e._v("The total number of search queries received for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("16023")])])]),e._v(" "),_("tr",[_("td",[e._v("indexes.avg_distinct_index_count")]),e._v(" "),_("td",[e._v("The average number of queried indexes received per call for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("1.2")])])]),e._v(" "),_("tr",[_("td",[e._v("indexes.total_distinct_index_count")]),e._v(" "),_("td",[e._v("The total number of distinct indexes queries for the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("6023")])])]),e._v(" "),_("tr",[_("td",[e._v("indexes.total_single_index")]),e._v(" "),_("td",[e._v("The total number of calls where only one index where queried.")]),e._v(" "),_("td",[_("code",[e._v("2007")])])])])]),e._v(" "),_("h2",{attrs:{id:"index-created"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#index-created"}},[e._v("#")]),e._v(" "),_("code",[e._v("Index Created")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered for this API call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("primary_key")]),e._v(" "),_("td",[e._v("The field's name used as a primary key if set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("id")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"index-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#index-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Index Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered for this API call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("primary_key")]),e._v(" "),_("td",[e._v("The field's name used as a primary key if set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("id")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"indexes-swapped"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#indexes-swapped"}},[e._v("#")]),e._v(" "),_("code",[e._v("Indexes Swapped")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered for this API call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("swap_operation_number")]),e._v(" "),_("td",[e._v("The number of swap operation given for this API call.")]),e._v(" "),_("td",[_("code",[e._v("2")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"documents-added"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-added"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Added")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Added event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(". The event's properties are averaged over all requests on "),_("code",[e._v("POST")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("payload_type")]),e._v(" "),_("td",[e._v("Represents all the payload_type encountered on this endpoint in the aggregated event as a set. "),_("code",[e._v("application/json")]),e._v("/ "),_("code",[e._v("application/x-ndjson")]),e._v("/ "),_("code",[e._v("text/plain")]),e._v(" or any non-supported content-type.")]),e._v(" "),_("td",[e._v("["),_("code",[e._v("text/plain")]),e._v(", "),_("code",[e._v("application/json")]),e._v("]")])]),e._v(" "),_("tr",[_("td",[e._v("primary_key")]),e._v(" "),_("td",[e._v("Represents all the "),_("code",[e._v("primaryKey")]),e._v(" query parameters encountered in the aggregated event as a set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v('["id"]')])])]),e._v(" "),_("tr",[_("td",[e._v("index_creation")]),e._v(" "),_("td",[e._v("Does an index creation happened among all requests in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"documents-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Updated")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Updated event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(". The event's properties are averaged over all requests on "),_("code",[e._v("PUT")]),e._v(" - "),_("code",[e._v("/indexes/:indexUid/documents")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("payload_type")]),e._v(" "),_("td",[e._v("Represents all the payload_type encountered on this endpoint in the aggregated event as a set. "),_("code",[e._v("application/json")]),e._v("/ "),_("code",[e._v("application/x-ndjson")]),e._v("/ "),_("code",[e._v("text/plain")]),e._v(" or any non-supported content-type.")]),e._v(" "),_("td",[e._v("["),_("code",[e._v("text/plain")]),e._v(", "),_("code",[e._v("application/json")]),e._v("]")])]),e._v(" "),_("tr",[_("td",[e._v("primary_key")]),e._v(" "),_("td",[e._v("Represents all the "),_("code",[e._v("primaryKey")]),e._v(" query parameters encountered in the aggregated event as a set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v('["id"]')])])]),e._v(" "),_("tr",[_("td",[e._v("index_creation")]),e._v(" "),_("td",[e._v("Does an index creation happened among all requests in the aggregated event?")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"documents-deleted"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-deleted"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Deleted")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Deleted event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The total number of received requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])]),e._v(" "),_("tr",[_("td",[e._v("per_document_id")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("DELETE /indexes/:indexUid/documents/:documentUid")]),e._v(" endpoint is called in the aggregated event, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("clear_all")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("DELETE /indexes/:indexUid/documents")]),e._v(" endpoint is called in the aggregated event, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("per_batch")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("POST /indexes/:indexUid/documents/delete-batch")]),e._v(" endpoint is called in the aggregated event, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("per_filter")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("POST /indexes/:indexUid/documents/delete")]),e._v(" endpoint is called in the aggregated event, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("h2",{attrs:{id:"documents-fetched-get"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-fetched-get"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Fetched GET")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Fetched GET event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[_("code",[e._v("requests.total_received")])]),e._v(" "),_("td",[e._v("Total number of request received in this batch")]),e._v(" "),_("td",[e._v("325")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_document_id")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("GET /indexes/:indexUid/documents/:doc_id")]),e._v(" endpoint was used in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_filter")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("GET /indexes/:indexUid/documents")]),e._v(" endpoint was used with a filter in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_limit")])]),e._v(" "),_("td",[e._v("Highest value given for the "),_("code",[e._v("limit")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("60")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_offset")])]),e._v(" "),_("td",[e._v("Highest value given for the "),_("code",[e._v("offset")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("1000")])])])]),e._v(" "),_("h2",{attrs:{id:"documents-fetched-post"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#documents-fetched-post"}},[e._v("#")]),e._v(" "),_("code",[e._v("Documents Fetched POST")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Documents Fetched POST event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[_("code",[e._v("requests.total_received")])]),e._v(" "),_("td",[e._v("Total number of request received in this batch")]),e._v(" "),_("td",[e._v("325")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_document_id")])]),e._v(" "),_("td",[_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("per_filter")])]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("POST /indexes/:indexUid/documents/fetch")]),e._v(" endpoint was used with a filter in this batch, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_limit")])]),e._v(" "),_("td",[e._v("Highest value given for the "),_("code",[e._v("limit")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("60")])]),e._v(" "),_("tr",[_("td",[_("code",[e._v("pagination.max_offset")])]),e._v(" "),_("td",[e._v("Highest value given for the "),_("code",[e._v("offset")]),e._v(" parameter in this batch")]),e._v(" "),_("td",[e._v("1000")])])])]),e._v(" "),_("h2",{attrs:{id:"settings-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#settings-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Settings Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("searchable_attributes.total")]),e._v(" "),_("td",[e._v("Number of searchable attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("searchable_attributes.with_wildcard")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("*")]),e._v(" is specified as a searchable attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.words_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("words")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("1")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.typo_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("typo")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("2")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.proximity_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("proximity")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.attribute_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("attribute")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("4")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.sort_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("sort")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.exactness_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("exactness")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("6")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.values")]),e._v(" "),_("td",[e._v("A string representing the ranking rules without the custom asc-desc rules.")]),e._v(" "),_("td",[_("code",[e._v('"words, typo, attribute, sort, exactness"')])])]),e._v(" "),_("tr",[_("td",[e._v("sortable_attributes.total")]),e._v(" "),_("td",[e._v("Number of sortable attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("sortable_attributes.has_geo")]),e._v(" "),_("td",[e._v("Indicate if "),_("code",[e._v("_geo")]),e._v(" is set as a sortable attribute.")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("filterable_attributes.total")]),e._v(" "),_("td",[e._v("Number of filterable attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("filterable_attributes.has_geo")]),e._v(" "),_("td",[e._v("Indicate if "),_("code",[e._v("_geo")]),e._v(" is set as a filterable attribute.")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.enabled")]),e._v(" "),_("td",[e._v("Whether the typo tolerance is enabled.")]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.disable_on_attributes")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if at least one value is defined for "),_("code",[e._v("disableOnAttributes")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.disable_on_words")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if at least one value is defined for "),_("code",[e._v("disableOnWords")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.min_word_size_for_typos.one_typo")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("minWordSizeForTypos.oneTypo")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.min_word_size_for_typos.two_typos")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("minWordSizeForTypos.twoTypos")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("9")])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.max_total_hits")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("pagination.maxTotalHits")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("1000")])])]),e._v(" "),_("tr",[_("td",[e._v("faceting.max_values_per_facet")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("faceting.maxValuesPerFacet")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("faceting.sort_facet_values_by_star_count")]),e._v(" "),_("td",[e._v("Whether the user set all fields to be sort by count")]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("faceting.sort_facet_values_by_total")]),e._v(" "),_("td",[e._v("The number of different values that were set")]),e._v(" "),_("td",[_("code",[e._v("10")])])]),e._v(" "),_("tr",[_("td",[e._v("distinct_attribute.set")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if a field name is specified, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("proximity_precision.set")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" the setting has been manually set, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("proximity_precision.value")]),e._v(" "),_("td",[_("code",[e._v("byWord")]),e._v(" or "),_("code",[e._v("byAttribute")]),e._v(" if the setting has been set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("null")])])]),e._v(" "),_("tr",[_("td",[e._v("displayed_attributes.total")]),e._v(" "),_("td",[e._v("Number of displayed attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("displayed_attributes.with_wildcard")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("*")]),e._v(" is specified as a displayed attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("stop_words.total")]),e._v(" "),_("td",[e._v("Number of stop words.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("separator_tokens.total")]),e._v(" "),_("td",[e._v("Number of separator tokens.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("non_separator_tokens.total")]),e._v(" "),_("td",[e._v("Number of non separator tokens.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("dictionary.total")]),e._v(" "),_("td",[e._v("Number of words in the dictionary.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("synonyms.total")]),e._v(" "),_("td",[e._v("Number of synonyms.")]),e._v(" "),_("td",[_("code",[e._v("3")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"rankingrules-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#rankingrules-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("RankingRules Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.words_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("words")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("1")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.typo_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("typo")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("2")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.proximity_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("proximity")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.attribute_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("attribute")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")])]),e._v(" "),_("td",[_("code",[e._v("4")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.sort_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("sort")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.exactness_position")]),e._v(" "),_("td",[e._v("Position of the "),_("code",[e._v("exactness")]),e._v(" ranking rule if any, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("6")])])]),e._v(" "),_("tr",[_("td",[e._v("ranking_rules.values")]),e._v(" "),_("td",[e._v("A string representing the ranking rules without the custom asc-desc rules.")]),e._v(" "),_("td",[_("code",[e._v('"words, typo, attribute, sort, exactness"')])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"sortableattributes-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#sortableattributes-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("SortableAttributes Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("sortable_attributes.total")]),e._v(" "),_("td",[e._v("Number of sortable attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("sortable_attributes.has_geo")]),e._v(" "),_("td",[e._v("Indicate if "),_("code",[e._v("_geo")]),e._v(" is set as a sortable attribute.")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h2",{attrs:{id:"filterableattributes-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#filterableattributes-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("FilterableAttributes Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("filterable_attributes.total")]),e._v(" "),_("td",[e._v("Number of filterable attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("filterable_attributes.has_geo")]),e._v(" "),_("td",[e._v("Indicate if "),_("code",[e._v("_geo")]),e._v(" is set as a filterable attribute.")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("h2",{attrs:{id:"searchableattributes-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#searchableattributes-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("SearchableAttributes Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("searchable_attributes.total")]),e._v(" "),_("td",[e._v("Number of searchable attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("searchable_attributes.with_wildcard")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("*")]),e._v(" is specified as a searchable attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("h2",{attrs:{id:"typotolerance-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#typotolerance-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("TypoTolerance Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.enabled")]),e._v(" "),_("td",[e._v("Whether the typo tolerance is enabled")]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.disable_on_attributes")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if at least one value is defined for "),_("code",[e._v("disableOnAttributes")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.disable_on_words")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if at least one value is defined for "),_("code",[e._v("disableOnWords")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.min_word_size_for_typos.one_typo")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("minWordSizeForTypos.oneTypo")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("5")])])]),e._v(" "),_("tr",[_("td",[e._v("typo_tolerance.min_word_size_for_typos.two_typos")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("minWordSizeForTypos.twoTypos")]),e._v(" property.")]),e._v(" "),_("td",[_("code",[e._v("9")])])])])]),e._v(" "),_("h2",{attrs:{id:"pagination-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#pagination-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Pagination Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("pagination.max_total_hits")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("maxTotalHits")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("1000")])])])])]),e._v(" "),_("h2",{attrs:{id:"faceting-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#faceting-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Faceting Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("faceting.max_values_per_facet")]),e._v(" "),_("td",[e._v("The defined value for "),_("code",[e._v("maxValuesPerFacet")]),e._v(" property")]),e._v(" "),_("td",[_("code",[e._v("100")])])]),e._v(" "),_("tr",[_("td",[e._v("faceting.sort_facet_values_by_star_count")]),e._v(" "),_("td",[e._v("Whether the user set all fields to be sort by count")]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("faceting.sort_facet_values_by_total")]),e._v(" "),_("td",[e._v("The number of different values that were set")]),e._v(" "),_("td",[_("code",[e._v("10")])])])])]),e._v(" "),_("h2",{attrs:{id:"distinctattribute-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#distinctattribute-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("DistinctAttribute Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("distinct_attribute.set")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if a field name is specified, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("h2",{attrs:{id:"proximityprecision-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#proximityprecision-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("ProximityPrecision Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("proximity_precision.set")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" the setting has been manually set, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])]),e._v(" "),_("tr",[_("td",[e._v("proximity_precision.value")]),e._v(" "),_("td",[_("code",[e._v("byWord")]),e._v(" or "),_("code",[e._v("byAttribute")]),e._v(" if the setting has been set, otherwise "),_("code",[e._v("null")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("byWord")])])])])]),e._v(" "),_("h2",{attrs:{id:"displayedattributes-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#displayedattributes-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("DisplayedAttributes Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("displayed_attributes.total")]),e._v(" "),_("td",[e._v("Number of displayed attributes.")]),e._v(" "),_("td",[_("code",[e._v("3")])])]),e._v(" "),_("tr",[_("td",[e._v("displayed_attributes.with_wildcard")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if "),_("code",[e._v("*")]),e._v(" is specified as a displayed attribute, otherwise "),_("code",[e._v("false")]),e._v(".")]),e._v(" "),_("td",[_("code",[e._v("false")])])])])]),e._v(" "),_("h2",{attrs:{id:"stopwords-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#stopwords-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("StopWords Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("stop_words.total")]),e._v(" "),_("td",[e._v("Number of stop words.")]),e._v(" "),_("td",[_("code",[e._v("3")])])])])]),e._v(" "),_("h2",{attrs:{id:"separatortokens-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#separatortokens-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("SeparatorTokens Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("separator_tokens.total")]),e._v(" "),_("td",[e._v("Number of separator tokens.")]),e._v(" "),_("td",[_("code",[e._v("3")])])])])]),e._v(" "),_("h2",{attrs:{id:"nonseparatortokens-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#nonseparatortokens-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("NonSeparatorTokens Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("non_separator_tokens.total")]),e._v(" "),_("td",[e._v("Number of non separator tokens.")]),e._v(" "),_("td",[_("code",[e._v("3")])])])])]),e._v(" "),_("h2",{attrs:{id:"dictionary-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#dictionary-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Dictionary Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("dictionary.total")]),e._v(" "),_("td",[e._v("Number of words in the dictionary.")]),e._v(" "),_("td",[_("code",[e._v("3")])])])])]),e._v(" "),_("h2",{attrs:{id:"synonyms-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#synonyms-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Synonyms Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("synonyms.total")]),e._v(" "),_("td",[e._v("Number of synonyms.")]),e._v(" "),_("td",[_("code",[e._v("3")])])])])]),e._v(" "),_("h2",{attrs:{id:"dump-created"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#dump-created"}},[e._v("#")]),e._v(" "),_("code",[e._v("Dump Created")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])])])]),e._v(" "),_("h2",{attrs:{id:"snapshot-created"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#snapshot-created"}},[e._v("#")]),e._v(" "),_("code",[e._v("Snapshot Created")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])])])]),e._v(" "),_("h2",{attrs:{id:"tasks-seen"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#tasks-seen"}},[e._v("#")]),e._v(" "),_("code",[e._v("Tasks Seen")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Tasks Seen event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500Kb")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The total number of received requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])]),e._v(" "),_("tr",[_("td",[e._v("per_task_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if an uid is used to fetch a particular task resource, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("uids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_index_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("indexUids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_type")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("types")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_status")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("statuses")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_canceled_by")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("canceledBy")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_enqueued_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_enqueued_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_started_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_started_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_finished_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_finished_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])])])]),e._v(" "),_("h2",{attrs:{id:"tasks-canceled"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#tasks-canceled"}},[e._v("#")]),e._v(" "),_("code",[e._v("Tasks Canceled")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("uids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_index_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("indexUids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_type")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("types")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_status")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("statuses")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_canceled_by")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("canceledBy")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_enqueued_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_enqueued_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_started_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_started_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_finished_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_finished_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])])])]),e._v(" "),_("h2",{attrs:{id:"tasks-deleted"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#tasks-deleted"}},[e._v("#")]),e._v(" "),_("code",[e._v("Tasks Deleted")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("uids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_index_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("indexUids")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_type")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("types")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_status")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("statuses")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_canceled_by")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("canceledBy")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_enqueued_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_enqueued_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterEnqueuedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_started_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_started_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterStartedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_before_finished_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("beforeFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])]),e._v(" "),_("tr",[_("td",[e._v("filtered_by_after_finished_at")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if tasks are filtered by the "),_("code",[e._v("afterFinishedAt")]),e._v(" query parameter, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[e._v("false")])])])]),e._v(" "),_("h2",{attrs:{id:"stats-seen"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#stats-seen"}},[e._v("#")]),e._v(" "),_("code",[e._v("Stats Seen")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("per_index_uid")]),e._v(" "),_("td",[_("code",[e._v("true")]),e._v(" if an uid is used to fetch an index stat resource, otherwise "),_("code",[e._v("false")])]),e._v(" "),_("td",[_("code",[e._v("true")])])])])]),e._v(" "),_("h2",{attrs:{id:"health-seen"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#health-seen"}},[e._v("#")]),e._v(" "),_("code",[e._v("Health Seen")])]),e._v(" "),_("blockquote",[_("p",[e._v("The Health Seen event is sent once an hour or when a batch reaches the maximum size of "),_("code",[e._v("500kb")]),e._v(".")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents all the user-agents encountered on this endpoint in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("requests.total_received")]),e._v(" "),_("td",[e._v("The total number of received requests in the aggregated event.")]),e._v(" "),_("td",[_("code",[e._v("3480")])])])])]),e._v(" "),_("h2",{attrs:{id:"version-seen"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#version-seen"}},[e._v("#")]),e._v(" "),_("code",[e._v("Version Seen")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])])])]),e._v(" "),_("h2",{attrs:{id:"experimental-features-seen"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#experimental-features-seen"}},[e._v("#")]),e._v(" "),_("code",[e._v("Experimental features Seen")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])])])]),e._v(" "),_("h2",{attrs:{id:"experimental-features-updated"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#experimental-features-updated"}},[e._v("#")]),e._v(" "),_("code",[e._v("Experimental features Updated")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Property name")]),e._v(" "),_("th",[e._v("Description")]),e._v(" "),_("th",[e._v("Example")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("user_agent")]),e._v(" "),_("td",[e._v("Represents the user-agent encountered on this call.")]),e._v(" "),_("td",[_("code",[e._v('["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]')])])]),e._v(" "),_("tr",[_("td",[e._v("vector_store")]),e._v(" "),_("td",[e._v("Whether the "),_("RouterLink",{attrs:{to:"/specifications/text/0193-experimental-features.html#vector-store"}},[e._v("vector store")]),e._v(" feature is enabled.")],1),e._v(" "),_("td",[_("code",[e._v("true")])])])])]),e._v(" "),_("hr"),e._v(" "),_("h4",{attrs:{id:"user-interface"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#user-interface"}},[e._v("#")]),e._v(" User-interface")]),e._v(" "),_("p",[e._v("Analytics are enabled by default while leaving the option for users to disable it with the "),_("code",[e._v("--no-analytics")]),e._v(" option.")]),e._v(" "),_("p",[_("strong",[e._v("Message displayed on the CLI at launch if analytics are enabled")])]),e._v(" "),_("blockquote",[_("p",[e._v("Thank you for using MeiliSearch!")]),e._v(" "),_("p",[e._v("We collect anonymized analytics to improve our product and your experience. To learn more, including how to turn off analytics, visit our dedicated documentation page: https://docs.meilisearch.com/learn/what_is_meilisearch/telemetry.html.")]),e._v(" "),_("p",[e._v('Anonymous telemetry:\t"Enabled"')]),e._v(" "),_("p",[e._v('Instance UID: ":uidGeneratedAtFirstLaunch"')])]),e._v(" "),_("p",[_("strong",[e._v("Message displayed on the CLI at launch if analytics are disabled after being activated")])]),e._v(" "),_("p",[e._v("The unique identifier of the instance remains displayed even if analytics are disabled so that it does not reactivate the analytics to obtain it after having stopped it. The user can still ask us to remove the data previously collected by giving us his "),_("code",[e._v("Instance UID")]),e._v(".")]),e._v(" "),_("blockquote",[_("p",[e._v("Thank you for using MeiliSearch!")]),e._v(" "),_("p",[e._v('Anonymous telemetry:\t"Disabled"')]),e._v(" "),_("p",[e._v('Instance UID: ":uidGeneratedAtFirstLaunch"')])]),e._v(" "),_("p",[_("strong",[e._v("Message displayed on the CLI at launch if analytics are disabled at first launch")])]),e._v(" "),_("blockquote",[_("p",[e._v("Thank you for using MeiliSearch!")]),e._v(" "),_("p",[e._v('Anonymous telemetry:\t"Disabled"')])]),e._v(" "),_("h2",{attrs:{id:"_2-technical-aspects"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-aspects"}},[e._v("#")]),e._v(" 2. Technical Aspects")]),e._v(" "),_("h3",{attrs:{id:"i-technical-details"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#i-technical-details"}},[e._v("#")]),e._v(" I. Technical Details")]),e._v(" "),_("h4",{attrs:{id:"user-agent-case"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#user-agent-case"}},[e._v("#")]),e._v(" User-Agent case")]),e._v(" "),_("p",[e._v("The "),_("code",[e._v("User-Agent")]),e._v(" header is tracked on the events listed below. Our official SDKs/integrations should always contain "),_("code",[e._v("MeiliSearch")]),e._v(" in their names.")]),e._v(" "),_("p",[e._v("Each endpoint API tracked sends the "),_("code",[e._v("User-Agent")]),e._v(" as a "),_("code",[e._v("user_agent")]),e._v(" event property as an array. If several values are contained in the "),_("code",[e._v("User-Agent")]),e._v(" header, they are split by the "),_("code",[e._v(";")]),e._v(" character.")]),e._v(" "),_("h5",{attrs:{id:"x-meilisearch-client-header"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#x-meilisearch-client-header"}},[e._v("#")]),e._v(" "),_("code",[e._v("X-Meilisearch-Client")]),e._v(" Header")]),e._v(" "),_("p",[e._v("Some browser engines prevent overloading the User-Agent header. To track the calls made by some clients concerned by this fact, e.g. the JavaScript SDK, it is possible to use the "),_("code",[e._v("X-Meilisearch-Client")]),e._v(" custom header.")]),e._v(" "),_("p",[e._v("If the "),_("code",[e._v("X-Meilisearch-Client")]),e._v(" is encountered, it overrides the presence of the "),_("code",[e._v("User-Agent")]),e._v(" header.")]),e._v(" "),_("h4",{attrs:{id:"telemetry-endpoint"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#telemetry-endpoint"}},[e._v("#")]),e._v(" Telemetry Endpoint")]),e._v(" "),_("p",[e._v("Telemetric data are sent to the domain "),_("code",[e._v("telemetry.meilisearch.com")]),e._v(" which then redirects it to Segment.")]),e._v(" "),_("p",[e._v("This transit domain allows us to change the telemetry collection solution in the future without impacting older versions of Meilisearch.")]),e._v(" "),_("h5",{attrs:{id:"identifying-meilisearch-installation"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#identifying-meilisearch-installation"}},[e._v("#")]),e._v(" Identifying MeiliSearch installation")]),e._v(" "),_("p",[e._v("To identify instances, we generate a unique identifier at first launch if analytics are not disabled.")]),e._v(" "),_("ul",[_("li",[e._v("This unique identifier is inserted in the data.ms folder to be kept in case of version upgrades.")]),e._v(" "),_("li",[e._v("A file named following the given pattern "),_("code",[e._v(":MeiliSearchData.msPath-:instanceUid")]),e._v(" is generated in a "),_("code",[e._v("MeiliSearch")]),e._v(" folder to recover an identifier in case of corruption of the data.ms folder, causing it to be deleted and recreated. This "),_("code",[e._v("MeiliSearch")]),e._v(" folder is created in the "),_("code",[e._v("config_dir")]),e._v(" of each platform.")])]),e._v(" "),_("table",[_("thead",[_("tr",[_("th",[e._v("Directory")]),e._v(" "),_("th",[e._v("Windows")]),e._v(" "),_("th",[e._v("Linux/*BSD")]),e._v(" "),_("th",[e._v("macOS")])])]),e._v(" "),_("tbody",[_("tr",[_("td",[e._v("config_dir")]),e._v(" "),_("td",[e._v("%APPDATA% (C:\\Users%USERNAME%\\AppData\\Roaming)")]),e._v(" "),_("td",[e._v("$XDG_CONFIG_HOME (~/.config)")]),e._v(" "),_("td",[e._v("~/Library/Application Support")])])])]),e._v(" "),_("h5",{attrs:{id:"segment-identify-call"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#segment-identify-call"}},[e._v("#")]),e._v(" Segment Identify Call")]),e._v(" "),_("p",[e._v("The "),_("code",[e._v("identify")]),e._v(" method of Segment permits identifying an instance by sending a unique identifier. It groups the information of a MeiliSearch binary such as "),_("code",[e._v("system")]),e._v(", "),_("code",[e._v("stats")]),e._v(", and general properties related below in this specification.")]),e._v(" "),_("p",[e._v("The segment identify call is only sent after the first hour if the instance is still running. At the first launch, MeiliSearch sends a "),_("code",[e._v("Launched")]),e._v(" event on an instance ID equal to "),_("code",[e._v("total_launch")]),e._v(" in order to avoid tracking instances usage for nothing when they could be shut down and never restarted.")]),e._v(" "),_("h5",{attrs:{id:"segment-track-call"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#segment-track-call"}},[e._v("#")]),e._v(" Segment Track Call")]),e._v(" "),_("p",[e._v("The "),_("code",[e._v("track")]),e._v(" calls of Segment allow tracking the events passed on the instance.")]),e._v(" "),_("h5",{attrs:{id:"batching"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#batching"}},[e._v("#")]),e._v(" Batching")]),e._v(" "),_("p",[e._v("A batch is sent every hour or when it reaches the maximum size of "),_("code",[e._v("500Kb")]),e._v(" to avoid sending analytics in real-time and preserve network exchanges.")]),e._v(" "),_("p",[e._v("This batch contains an identify payload and all tracked events that occurred during this hour.")]),e._v(" "),_("h5",{attrs:{id:"logging"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#logging"}},[e._v("#")]),e._v(" Logging")]),e._v(" "),_("p",[e._v("Errors occurring when sending metrics to Segment should be silent. In general, the impact of data collection should be minimized as much as possible concerning performance and be entirely transparent for the user during its use.")]),e._v(" "),_("h4",{attrs:{id:"debug-build"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#debug-build"}},[e._v("#")]),e._v(" Debug build")]),e._v(" "),_("p",[e._v("In debug build, no analytics are collected.")]),e._v(" "),_("h2",{attrs:{id:"_3-future-possibilities"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[e._v("#")]),e._v(" 3. Future possibilities")]),e._v(" "),_("p",[e._v("n/a")])])}),[],!1,null,null,null);t.default=d.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/20.9f9509a9.js b/docs/assets/js/20.fb03e236.js similarity index 99% rename from docs/assets/js/20.9f9509a9.js rename to docs/assets/js/20.fb03e236.js index 76ea74d96..49f74c848 100644 --- a/docs/assets/js/20.9f9509a9.js +++ b/docs/assets/js/20.fb03e236.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{443: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],{445: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.a9f2f84c.js b/docs/assets/js/22.d2a0a444.js similarity index 98% rename from docs/assets/js/22.a9f2f84c.js rename to docs/assets/js/22.d2a0a444.js index 3de72a44b..628b84a57 100644 --- a/docs/assets/js/22.a9f2f84c.js +++ b/docs/assets/js/22.d2a0a444.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{448: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],{447: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/25.686e52de.js b/docs/assets/js/25.96849fe5.js similarity index 99% rename from docs/assets/js/25.686e52de.js rename to docs/assets/js/25.96849fe5.js index 33a989a8a..34fcd818a 100644 --- a/docs/assets/js/25.686e52de.js +++ b/docs/assets/js/25.96849fe5.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[25],{447: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],{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 diff --git a/docs/assets/js/27.07dfbf7c.js b/docs/assets/js/27.178e5c36.js similarity index 99% rename from docs/assets/js/27.07dfbf7c.js rename to docs/assets/js/27.178e5c36.js index ba8107d0e..43229726b 100644 --- a/docs/assets/js/27.07dfbf7c.js +++ b/docs/assets/js/27.178e5c36.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[27],{455: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.8111d4f5.js b/docs/assets/js/28.d2c2cee7.js similarity index 98% rename from docs/assets/js/28.8111d4f5.js rename to docs/assets/js/28.d2c2cee7.js index 27f60a688..80dbea0bd 100644 --- a/docs/assets/js/28.8111d4f5.js +++ b/docs/assets/js/28.d2c2cee7.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{451:function(t,i,e){"use strict";e.r(i);var s=e(62),a=Object(s.a)({},(function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("ul",[e("li",[t._v("Title: Words position limit")]),t._v(" "),e("li",[t._v("Start Date: 2021-10-06")]),t._v(" "),e("li",[t._v("Specification PR: "),e("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/77",target:"_blank",rel:"noopener noreferrer"}},[t._v("#77"),e("OutboundLink")],1)]),t._v(" "),e("li",[t._v("Discovery Issue: "),e("a",{attrs:{href:"https://github.com/meilisearch/product/issues/202",target:"_blank",rel:"noopener noreferrer"}},[t._v("#202"),e("OutboundLink")],1)])]),t._v(" "),e("h1",{attrs:{id:"words-position-limit"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#words-position-limit"}},[t._v("#")]),t._v(" Words position limit")]),t._v(" "),e("h2",{attrs:{id:"_1-functional-specification"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_1-functional-specification"}},[t._v("#")]),t._v(" 1. Functional Specification")]),t._v(" "),e("h3",{attrs:{id:"i-summary"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#i-summary"}},[t._v("#")]),t._v(" I. Summary")]),t._v(" "),e("p",[t._v("The purpose of this specification is to remove the limit of 1000 positions per attribute.")]),t._v(" "),e("h4",{attrs:{id:"summary-key-points"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#summary-key-points"}},[t._v("#")]),t._v(" Summary Key points")]),t._v(" "),e("ul",[e("li",[t._v("1000 positions limit per document field is now raised at 65535.")])]),t._v(" "),e("h3",{attrs:{id:"ii-motivation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ii-motivation"}},[t._v("#")]),t._v(" II. Motivation")]),t._v(" "),e("p",[t._v("We've seen many users denormalizing fields into multiple fields to index all the words because of the initial limit. This change will increases the limit to 65535, which should greatly reduce frictions on this issue. We expect to reduce the changes to be made to the document schema in order to use MeiliSearch more quickly and easily.")]),t._v(" "),e("h3",{attrs:{id:"iii-technical-explanations"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#iii-technical-explanations"}},[t._v("#")]),t._v(" III. Technical Explanations")]),t._v(" "),e("p",[t._v("n/a")]),t._v(" "),e("h2",{attrs:{id:"_2-technical-aspects"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-aspects"}},[t._v("#")]),t._v(" 2. Technical Aspects")]),t._v(" "),e("p",[t._v("When MeiliSearch indexes a document, it indexes several word positions per field until a limit is reached.")]),t._v(" "),e("p",[t._v("It is important to note that the limit is not strictly related to the number of words. Indeed, soft separators are also counted as "),e("code",[t._v("1")]),t._v(" position while hard separators are counted as "),e("code",[t._v("8")]),t._v(" positions.")]),t._v(" "),e("h2",{attrs:{id:"_3-future-possibilities"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[t._v("#")]),t._v(" 3. Future Possibilities")]),t._v(" "),e("ul",[e("li",[t._v("Expose a configurable default limit up to 65535.")])])])}),[],!1,null,null,null);i.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{452: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/30.704af26a.js b/docs/assets/js/30.ffe8feb9.js similarity index 99% rename from docs/assets/js/30.704af26a.js rename to docs/assets/js/30.ffe8feb9.js index 6ab7298a6..a4d8eae70 100644 --- a/docs/assets/js/30.704af26a.js +++ b/docs/assets/js/30.ffe8feb9.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[30],{452:function(e,t,a){"use strict";a.r(t);var s=a(62),n=Object(s.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("ul",[a("li",[e._v("Title: Tenant Tokens")])]),e._v(" "),a("h1",{attrs:{id:"tenant-tokens"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#tenant-tokens"}},[e._v("#")]),e._v(" Tenant Tokens")]),e._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("A "),a("code",[e._v("Tenant token")]),e._v(" is generated by the user code to be used by an end-user when making search queries.")]),e._v(" "),a("p",[e._v("It allows users to have multi-tenant indexes and thus restricts access to documents depending on the end-user making the search request.")]),e._v(" "),a("p",[e._v("A Tenant Token is a JWT containing the information necessary for Meilisearch to verify it and extract permission/rules to apply it to the end user's search.")]),e._v(" "),a("h3",{attrs:{id:"_1-1-key-points"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-1-key-points"}},[e._v("#")]),e._v(" 1.1. Key Points")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("Tenant tokens")]),e._v(" are JWTs generated on the user side by using Meilisearch SDKs or their custom code. "),a("code",[e._v("Tenant tokens")]),e._v(" are not stored nor retrievable on the Meilisearch side.")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" contain rules that ensure that a "),a("code",[e._v("Tenant token")]),e._v(" holder (e.g. an end-user) only has access to documents matching rules chosen at the "),a("code",[e._v("tenant token")]),e._v(" creation.")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" are signed from a Meilisearch "),a("code",[e._v("API key")]),e._v(" resource on the user's code.")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" must not be signed by the master key.")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" cannot be more permissive than the signing "),a("code",[e._v("API key")]),e._v(".")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" must be signed by an "),a("code",[e._v("API Key")]),e._v(" having the "),a("code",[e._v("search")]),e._v(" action defined.")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" can have different rules for each index accessible by the signing API key. These rules are described in the "),a("code",[e._v("searchRules")]),e._v(" JSON object.")]),e._v(" "),a("li",[e._v("The only rule available in the "),a("code",[e._v("searchRules")]),e._v(" object is the search parameter "),a("code",[e._v("filter")]),e._v(".")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" are sent to Meilisearch via the "),a("code",[e._v("Authorization")]),e._v(" header like any "),a("code",[e._v("API Keys")]),e._v(" or the master key.")]),e._v(" "),a("li",[e._v("When Meilisearch receives a search query emitted with a "),a("code",[e._v("Tenant token")]),e._v(", the "),a("code",[e._v("tenant token")]),e._v(" is decoded, then the "),a("code",[e._v("searchRules")]),e._v(" are applied for the search request before the search parameters.")])]),e._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[a("code",[e._v("Tenant tokens")]),e._v(" are introduced to solve multi-tenant indexes use-case.")]),e._v(" "),a("blockquote",[a("p",[e._v("Multi-Tenant Indexes Definition: It is an index that stores documents that may belong to different tenants. In our case, a tenant within an index can be a user or a company, etc. In general, the data of one tenant should not be accessible by other tenants.")])]),e._v(" "),a("p",[e._v("Users today need to set up workarounds to have multi-tenant indexes. They have to use server code to implement the access restriction logic before requesting Meilisearch. It isn't easy to maintain, to implement, and the performance is not optimal because the frontend code does not communicate directly with Meilisearch.")]),e._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("h3",{attrs:{id:"_3-1-example-solving-multi-tenancy-with-tenant-tokens"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-example-solving-multi-tenancy-with-tenant-tokens"}},[e._v("#")]),e._v(" 3.1. Example: Solving Multi-Tenancy with "),a("code",[e._v("Tenant tokens")])]),e._v(" "),a("p",[a("img",{attrs:{src:"https://user-images.githubusercontent.com/3692335/151013496-d33ab507-f972-465d-b942-899fc2bd0a22.png",alt:""}})]),e._v(" "),a("p",[a("code",[e._v("Mark")]),e._v(" is a developer for a SaaS platform. He would like to ensure that every end-user can only access their documents at search time.")]),e._v(" "),a("p",[e._v("When an end-user registers, Mark's backend code generates a "),a("code",[e._v("Tenant token")]),e._v(" for that end-user so they can only access their documents at search time.")]),e._v(" "),a("p",[e._v("This tenant-token is signed with a Meilisearch API Key so that Meilisearch can ensure that the tenant-token has been generated from a known entity.")]),e._v(" "),a("p",[e._v("Meilisearch checks if the Tenant Token is authorized to make the search request.")]),e._v(" "),a("p",[e._v("Then Meilisearch extracts the Tenant Token's rules to apply for the search request.")]),e._v(" "),a("h3",{attrs:{id:"_3-2-tenant-token-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-tenant-token-details"}},[e._v("#")]),e._v(" 3.2. "),a("code",[e._v("Tenant Token")]),e._v(" Details")]),e._v(" "),a("p",[e._v("Tenant Tokens are JWTs and must respect several conditions to be understandable by a Meilisearch instance.")]),e._v(" "),a("h4",{attrs:{id:"_3-2-1-header-algorithm-and-token-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-header-algorithm-and-token-type"}},[e._v("#")]),e._v(" 3.2.1. Header: Algorithm and token type")]),e._v(" "),a("p",[e._v("The Tenant Token must be signed with one of the following algorithms:")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("HS256")])]),e._v(" "),a("li",[a("code",[e._v("HS384")])]),e._v(" "),a("li",[a("code",[e._v("HS512")])])]),e._v(" "),a("p",[e._v("e.g. With "),a("code",[e._v("HS256")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"alg"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"HS256"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"typ"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"JWT"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("The secret key that is used to encrypt the JWT token must be the original API Key value (not the UID).")]),e._v(" "),a("h4",{attrs:{id:"_3-2-2-payload-data"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-payload-data"}},[e._v("#")]),e._v(" 3.2.2. Payload: Data")]),e._v(" "),a("p",[e._v("Meilisearch needs information within the tenant token to check its validity and use it to authorize and perform end-user search requests.")]),e._v(" "),a("h5",{attrs:{id:"_3-2-2-1-validity-information"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-validity-information"}},[e._v("#")]),e._v(" 3.2.2.1. Validity Information")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Fields")]),e._v(" "),a("th",[e._v("Required")]),e._v(" "),a("th",[e._v("Description")]),e._v(" "),a("th",[e._v("Comments")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("code",[e._v("apiKeyUid")]),e._v(" (Custom claim)")]),e._v(" "),a("td",[e._v("Required")]),e._v(" "),a("td",[e._v("Must contain the "),a("code",[e._v("uid")]),e._v(" field value of the signing "),a("code",[e._v("Meilisearch API key")]),e._v(" used to generate the JWT")]),e._v(" "),a("td")]),e._v(" "),a("tr",[a("td",[a("code",[e._v("exp")]),e._v(" (Expiration Time claim)")]),e._v(" "),a("td",[e._v("Optional")]),e._v(" "),a("td",[e._v("A JSON numeric value representing the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time.")]),e._v(" "),a("td",[e._v("If the signing API key expires, the Tenant Token also expires. Thus said, the "),a("code",[e._v("exp")]),e._v(" can't be greater than the expiration date of the signing API key.")])])])]),e._v(" "),a("h6",{attrs:{id:"_3-2-2-1-1-apikeyuid-field"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-1-apikeyuid-field"}},[e._v("#")]),e._v(" 3.2.2.1.1. "),a("code",[e._v("apiKeyUid")]),e._v(" field")]),e._v(" "),a("p",[a("code",[e._v("apiKeyUid")]),e._v(" permits to verify that the signing API key of the Token is known and valid within Meilisearch. It must contain the "),a("code",[e._v("uid")]),e._v(" field value of the Meilisearch API key that generates and signs the Tenant Token.")]),e._v(" "),a("p",[e._v("The "),a("code",[e._v("apiKeyUid")]),e._v(" can't be generated from the master key, and the "),a("code",[e._v("API Key")]),e._v(" must have the "),a("code",[e._v("search")]),e._v(" action defined to generate a usable tenant token.")]),e._v(" "),a("h6",{attrs:{id:"_3-2-2-1-2-exp-field"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-2-exp-field"}},[e._v("#")]),e._v(" 3.2.2.1.2. "),a("code",[e._v("exp")]),e._v(" field")]),e._v(" "),a("p",[a("code",[e._v("exp")]),e._v(" is used to specify the expiration date of the Tenant Token if needed. The format is a JSON numeric value representing the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time, ignoring leap seconds.")]),e._v(" "),a("h5",{attrs:{id:"_3-2-2-2-business-logic-information"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-business-logic-information"}},[e._v("#")]),e._v(" 3.2.2.2. Business Logic Information")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Fields")]),e._v(" "),a("th",[e._v("Required")]),e._v(" "),a("th",[e._v("Description")]),e._v(" "),a("th",[e._v("Comments")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("code",[e._v("searchRules")])]),e._v(" "),a("td",[e._v("Required")]),e._v(" "),a("td",[e._v("This JSON object contains rules to apply for search queries performed with the JWT depending on the searched index. A Tenant Token cannot access more indexes at search time than those defined as accessible by the signing API key.")]),e._v(" "),a("td",[e._v("Let's say an index uses a field to separate documents belonging to one end-user from another one, but another index needs to separate belonging using a different field in its schema. Defining specific search rules per accessible index avoids generating several tenant tokens for an end-user.")])])])]),e._v(" "),a("h6",{attrs:{id:"_3-2-2-2-1-searchrules-json-object"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-1-searchrules-json-object"}},[e._v("#")]),e._v(" 3.2.2.2.1. "),a("code",[e._v("searchRules")]),e._v(" JSON object")]),e._v(" "),a("p",[a("code",[e._v("searchRules")]),e._v(" contains the rules to be enforced at search time for all or specific accessible indexes for the signing API Key.")]),e._v(" "),a("p",[e._v("Here are the accepted formats for the "),a("code",[e._v("searchRules")]),e._v(" property.")]),e._v(" "),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("In this case, all indexes on which the signing API Key has permissions are searchable by the tenant token without any restrictions.")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("is equivalent to")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[e._v("null")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("is equivalent to")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("The search is authorized on all accessible indexes from the signing API Key for the Tenant Token without specific rules.")]),e._v(" "),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("In this case, all searchable indexes from the signing API Key are searchable by the tenant token, and Meilisearch applies the "),a("code",[e._v("filter")]),e._v(" search rule before applying the request search parameters.")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"user_id = 1"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("In this case, if the "),a("code",[e._v("medical_records")]),e._v(" index is searchable from the signing API Key, the tenant token is only authorized to search in the "),a("code",[e._v("medical_records")]),e._v(" index.")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"medical_records"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("is equivalent to")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"medical_records"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[e._v("null")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("is equivalent to")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"medical_records"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("In this case, if the "),a("code",[e._v("medical_records")]),e._v(" index is searchable from the signing API Key, the tenant token is only authorized to search in the "),a("code",[e._v("medical_records")]),e._v(" index, and Meilisearch applies the "),a("code",[e._v("filter")]),e._v(" search rule before applying the request search parameters.")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"medical_records"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"user_id = 1"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("In this case, if the "),a("code",[e._v("medical_records")]),e._v(" and "),a("code",[e._v("medical_appointments")]),e._v(" indexes are searchable from the signing API Key, the tenant token is only authorized to search in those indexes, and Meilisearch applies the "),a("code",[e._v("filter")]),e._v(" search rule before applying the request search parameters.")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"medical_records"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"user_id = 1"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"medical_appointments"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"user_id = 1 AND accepted = true"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("In this case, all searchable indexes from the signing API Key are searchable, and Meilisearch applies the "),a("code",[e._v("filter")]),e._v(" search rule before applying the request search parameters for all indexes except for the "),a("code",[e._v("medical_appointments")]),e._v(" index. A dedicated "),a("code",[e._v("filter")]),e._v(" search rule is applied when making a search query on this index.")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"user_id = 1"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"medical_appointments"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"user_id = 1 AND accepted = true"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("The "),a("code",[e._v("filter")]),e._v(" field accepts an array, a string, and the mixed syntax as described in the "),a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#312-filter"}},[e._v("Search Endpoints Specification")]),e._v(".")],1)]),e._v(" "),a("h5",{attrs:{id:"_3-2-2-3-payload-example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-3-payload-example"}},[e._v("#")]),e._v(" 3.2.2.3. Payload example")]),e._v(" "),a("p",[e._v("Given a Meilisearch API Key used to sign the JWT from the user code. Here is an example of a valid payload for a tenant token.")]),e._v(" "),a("p",[e._v("e.g. "),a("code",[e._v("Meilisearch API key: rkDxFUHd02193e120218f72cc51a9db62729fdb4003e271f960d1631b54f3426fa8b2595")])]),e._v(" "),a("div",{staticClass:"language-jsonc extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('{\n "apiKeyUid": "f0ec9882-0184-4303-89f0-d4c4d6912bcf", // The uid field value of the signing Meilisearch API Key\n "exp": 1641835850, // An expiration date in seconds from 1970-01-01T00:00:00Z UTC\n "searchRules": { // The searchRules Json Object definition\n "*": {\n "filter": "user_id = 1"\n }\n }\n}\n')])])]),a("blockquote",[a("p",[e._v("In this example, "),a("code",[e._v('"*"')]),e._v(" allows to specify that no matter which index is searched (among all those accessible by the signing API key that generated the tenant token), the "),a("code",[e._v("filter")]),e._v(" search rule is applied on all search requests.")])]),e._v(" "),a("h3",{attrs:{id:"_3-3-tenant-token-revokation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-tenant-token-revokation"}},[e._v("#")]),e._v(" 3.3. Tenant Token Revokation")]),e._v(" "),a("p",[e._v("It is not possible to revoke a specific tenant token.")]),e._v(" "),a("p",[e._v("The only way to do so is to "),a("strong",[e._v("delete the API key that signed it")]),e._v(" using the "),a("code",[e._v("DELETE - /keys/:apiKey")]),e._v(" endpoints of Meilisearch.")]),e._v(" "),a("p",[e._v("🚨 "),a("strong",[e._v("Doing this revoke all tenant tokens signed by this API Key.")])]),e._v(" "),a("p",[e._v("Another much more drastic method is to modify the "),a("code",[e._v("master key")]),e._v(" of the Meilisearch instance.")]),e._v(" "),a("p",[e._v("🚨🚨 "),a("strong",[e._v("Doing this regenerate all the API Keys and thus revoke all the tenant tokens generated regardless of the signing API Key.")])]),e._v(" "),a("h2",{attrs:{id:"_4-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-future-possibilities"}},[e._v("#")]),e._v(" 4. Future Possibilities")]),e._v(" "),a("ul",[a("li",[e._v("Handle more signing methods for the Tenant Token.")]),e._v(" "),a("li",[e._v("Handle more search parameters restrictions in "),a("code",[e._v("searchRules")]),e._v(".")]),e._v(" "),a("li",[e._v("Add a possibility to revoke a specific Tenant Token.")]),e._v(" "),a("li",[e._v("Introduce an endpoint to generate tenant tokens on the Meilisearch side.")])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[30],{454:function(e,t,a){"use strict";a.r(t);var s=a(62),n=Object(s.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("ul",[a("li",[e._v("Title: Tenant Tokens")])]),e._v(" "),a("h1",{attrs:{id:"tenant-tokens"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#tenant-tokens"}},[e._v("#")]),e._v(" Tenant Tokens")]),e._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("A "),a("code",[e._v("Tenant token")]),e._v(" is generated by the user code to be used by an end-user when making search queries.")]),e._v(" "),a("p",[e._v("It allows users to have multi-tenant indexes and thus restricts access to documents depending on the end-user making the search request.")]),e._v(" "),a("p",[e._v("A Tenant Token is a JWT containing the information necessary for Meilisearch to verify it and extract permission/rules to apply it to the end user's search.")]),e._v(" "),a("h3",{attrs:{id:"_1-1-key-points"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-1-key-points"}},[e._v("#")]),e._v(" 1.1. Key Points")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("Tenant tokens")]),e._v(" are JWTs generated on the user side by using Meilisearch SDKs or their custom code. "),a("code",[e._v("Tenant tokens")]),e._v(" are not stored nor retrievable on the Meilisearch side.")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" contain rules that ensure that a "),a("code",[e._v("Tenant token")]),e._v(" holder (e.g. an end-user) only has access to documents matching rules chosen at the "),a("code",[e._v("tenant token")]),e._v(" creation.")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" are signed from a Meilisearch "),a("code",[e._v("API key")]),e._v(" resource on the user's code.")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" must not be signed by the master key.")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" cannot be more permissive than the signing "),a("code",[e._v("API key")]),e._v(".")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" must be signed by an "),a("code",[e._v("API Key")]),e._v(" having the "),a("code",[e._v("search")]),e._v(" action defined.")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" can have different rules for each index accessible by the signing API key. These rules are described in the "),a("code",[e._v("searchRules")]),e._v(" JSON object.")]),e._v(" "),a("li",[e._v("The only rule available in the "),a("code",[e._v("searchRules")]),e._v(" object is the search parameter "),a("code",[e._v("filter")]),e._v(".")]),e._v(" "),a("li",[a("code",[e._v("Tenant tokens")]),e._v(" are sent to Meilisearch via the "),a("code",[e._v("Authorization")]),e._v(" header like any "),a("code",[e._v("API Keys")]),e._v(" or the master key.")]),e._v(" "),a("li",[e._v("When Meilisearch receives a search query emitted with a "),a("code",[e._v("Tenant token")]),e._v(", the "),a("code",[e._v("tenant token")]),e._v(" is decoded, then the "),a("code",[e._v("searchRules")]),e._v(" are applied for the search request before the search parameters.")])]),e._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[a("code",[e._v("Tenant tokens")]),e._v(" are introduced to solve multi-tenant indexes use-case.")]),e._v(" "),a("blockquote",[a("p",[e._v("Multi-Tenant Indexes Definition: It is an index that stores documents that may belong to different tenants. In our case, a tenant within an index can be a user or a company, etc. In general, the data of one tenant should not be accessible by other tenants.")])]),e._v(" "),a("p",[e._v("Users today need to set up workarounds to have multi-tenant indexes. They have to use server code to implement the access restriction logic before requesting Meilisearch. It isn't easy to maintain, to implement, and the performance is not optimal because the frontend code does not communicate directly with Meilisearch.")]),e._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("h3",{attrs:{id:"_3-1-example-solving-multi-tenancy-with-tenant-tokens"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-example-solving-multi-tenancy-with-tenant-tokens"}},[e._v("#")]),e._v(" 3.1. Example: Solving Multi-Tenancy with "),a("code",[e._v("Tenant tokens")])]),e._v(" "),a("p",[a("img",{attrs:{src:"https://user-images.githubusercontent.com/3692335/151013496-d33ab507-f972-465d-b942-899fc2bd0a22.png",alt:""}})]),e._v(" "),a("p",[a("code",[e._v("Mark")]),e._v(" is a developer for a SaaS platform. He would like to ensure that every end-user can only access their documents at search time.")]),e._v(" "),a("p",[e._v("When an end-user registers, Mark's backend code generates a "),a("code",[e._v("Tenant token")]),e._v(" for that end-user so they can only access their documents at search time.")]),e._v(" "),a("p",[e._v("This tenant-token is signed with a Meilisearch API Key so that Meilisearch can ensure that the tenant-token has been generated from a known entity.")]),e._v(" "),a("p",[e._v("Meilisearch checks if the Tenant Token is authorized to make the search request.")]),e._v(" "),a("p",[e._v("Then Meilisearch extracts the Tenant Token's rules to apply for the search request.")]),e._v(" "),a("h3",{attrs:{id:"_3-2-tenant-token-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-tenant-token-details"}},[e._v("#")]),e._v(" 3.2. "),a("code",[e._v("Tenant Token")]),e._v(" Details")]),e._v(" "),a("p",[e._v("Tenant Tokens are JWTs and must respect several conditions to be understandable by a Meilisearch instance.")]),e._v(" "),a("h4",{attrs:{id:"_3-2-1-header-algorithm-and-token-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-header-algorithm-and-token-type"}},[e._v("#")]),e._v(" 3.2.1. Header: Algorithm and token type")]),e._v(" "),a("p",[e._v("The Tenant Token must be signed with one of the following algorithms:")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("HS256")])]),e._v(" "),a("li",[a("code",[e._v("HS384")])]),e._v(" "),a("li",[a("code",[e._v("HS512")])])]),e._v(" "),a("p",[e._v("e.g. With "),a("code",[e._v("HS256")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"alg"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"HS256"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"typ"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"JWT"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("The secret key that is used to encrypt the JWT token must be the original API Key value (not the UID).")]),e._v(" "),a("h4",{attrs:{id:"_3-2-2-payload-data"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-payload-data"}},[e._v("#")]),e._v(" 3.2.2. Payload: Data")]),e._v(" "),a("p",[e._v("Meilisearch needs information within the tenant token to check its validity and use it to authorize and perform end-user search requests.")]),e._v(" "),a("h5",{attrs:{id:"_3-2-2-1-validity-information"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-validity-information"}},[e._v("#")]),e._v(" 3.2.2.1. Validity Information")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Fields")]),e._v(" "),a("th",[e._v("Required")]),e._v(" "),a("th",[e._v("Description")]),e._v(" "),a("th",[e._v("Comments")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("code",[e._v("apiKeyUid")]),e._v(" (Custom claim)")]),e._v(" "),a("td",[e._v("Required")]),e._v(" "),a("td",[e._v("Must contain the "),a("code",[e._v("uid")]),e._v(" field value of the signing "),a("code",[e._v("Meilisearch API key")]),e._v(" used to generate the JWT")]),e._v(" "),a("td")]),e._v(" "),a("tr",[a("td",[a("code",[e._v("exp")]),e._v(" (Expiration Time claim)")]),e._v(" "),a("td",[e._v("Optional")]),e._v(" "),a("td",[e._v("A JSON numeric value representing the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time.")]),e._v(" "),a("td",[e._v("If the signing API key expires, the Tenant Token also expires. Thus said, the "),a("code",[e._v("exp")]),e._v(" can't be greater than the expiration date of the signing API key.")])])])]),e._v(" "),a("h6",{attrs:{id:"_3-2-2-1-1-apikeyuid-field"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-1-apikeyuid-field"}},[e._v("#")]),e._v(" 3.2.2.1.1. "),a("code",[e._v("apiKeyUid")]),e._v(" field")]),e._v(" "),a("p",[a("code",[e._v("apiKeyUid")]),e._v(" permits to verify that the signing API key of the Token is known and valid within Meilisearch. It must contain the "),a("code",[e._v("uid")]),e._v(" field value of the Meilisearch API key that generates and signs the Tenant Token.")]),e._v(" "),a("p",[e._v("The "),a("code",[e._v("apiKeyUid")]),e._v(" can't be generated from the master key, and the "),a("code",[e._v("API Key")]),e._v(" must have the "),a("code",[e._v("search")]),e._v(" action defined to generate a usable tenant token.")]),e._v(" "),a("h6",{attrs:{id:"_3-2-2-1-2-exp-field"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-1-2-exp-field"}},[e._v("#")]),e._v(" 3.2.2.1.2. "),a("code",[e._v("exp")]),e._v(" field")]),e._v(" "),a("p",[a("code",[e._v("exp")]),e._v(" is used to specify the expiration date of the Tenant Token if needed. The format is a JSON numeric value representing the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time, ignoring leap seconds.")]),e._v(" "),a("h5",{attrs:{id:"_3-2-2-2-business-logic-information"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-business-logic-information"}},[e._v("#")]),e._v(" 3.2.2.2. Business Logic Information")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Fields")]),e._v(" "),a("th",[e._v("Required")]),e._v(" "),a("th",[e._v("Description")]),e._v(" "),a("th",[e._v("Comments")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("code",[e._v("searchRules")])]),e._v(" "),a("td",[e._v("Required")]),e._v(" "),a("td",[e._v("This JSON object contains rules to apply for search queries performed with the JWT depending on the searched index. A Tenant Token cannot access more indexes at search time than those defined as accessible by the signing API key.")]),e._v(" "),a("td",[e._v("Let's say an index uses a field to separate documents belonging to one end-user from another one, but another index needs to separate belonging using a different field in its schema. Defining specific search rules per accessible index avoids generating several tenant tokens for an end-user.")])])])]),e._v(" "),a("h6",{attrs:{id:"_3-2-2-2-1-searchrules-json-object"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-2-1-searchrules-json-object"}},[e._v("#")]),e._v(" 3.2.2.2.1. "),a("code",[e._v("searchRules")]),e._v(" JSON object")]),e._v(" "),a("p",[a("code",[e._v("searchRules")]),e._v(" contains the rules to be enforced at search time for all or specific accessible indexes for the signing API Key.")]),e._v(" "),a("p",[e._v("Here are the accepted formats for the "),a("code",[e._v("searchRules")]),e._v(" property.")]),e._v(" "),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("In this case, all indexes on which the signing API Key has permissions are searchable by the tenant token without any restrictions.")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("is equivalent to")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[e._v("null")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("is equivalent to")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("The search is authorized on all accessible indexes from the signing API Key for the Tenant Token without specific rules.")]),e._v(" "),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("In this case, all searchable indexes from the signing API Key are searchable by the tenant token, and Meilisearch applies the "),a("code",[e._v("filter")]),e._v(" search rule before applying the request search parameters.")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"user_id = 1"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("In this case, if the "),a("code",[e._v("medical_records")]),e._v(" index is searchable from the signing API Key, the tenant token is only authorized to search in the "),a("code",[e._v("medical_records")]),e._v(" index.")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"medical_records"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("is equivalent to")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"medical_records"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[e._v("null")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("p",[e._v("is equivalent to")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"medical_records"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("In this case, if the "),a("code",[e._v("medical_records")]),e._v(" index is searchable from the signing API Key, the tenant token is only authorized to search in the "),a("code",[e._v("medical_records")]),e._v(" index, and Meilisearch applies the "),a("code",[e._v("filter")]),e._v(" search rule before applying the request search parameters.")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"medical_records"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"user_id = 1"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("In this case, if the "),a("code",[e._v("medical_records")]),e._v(" and "),a("code",[e._v("medical_appointments")]),e._v(" indexes are searchable from the signing API Key, the tenant token is only authorized to search in those indexes, and Meilisearch applies the "),a("code",[e._v("filter")]),e._v(" search rule before applying the request search parameters.")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"medical_records"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"user_id = 1"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"medical_appointments"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"user_id = 1 AND accepted = true"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("In this case, all searchable indexes from the signing API Key are searchable, and Meilisearch applies the "),a("code",[e._v("filter")]),e._v(" search rule before applying the request search parameters for all indexes except for the "),a("code",[e._v("medical_appointments")]),e._v(" index. A dedicated "),a("code",[e._v("filter")]),e._v(" search rule is applied when making a search query on this index.")])]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"searchRules"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"*"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"user_id = 1"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"medical_appointments"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"user_id = 1 AND accepted = true"')]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("hr"),e._v(" "),a("blockquote",[a("p",[e._v("The "),a("code",[e._v("filter")]),e._v(" field accepts an array, a string, and the mixed syntax as described in the "),a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#312-filter"}},[e._v("Search Endpoints Specification")]),e._v(".")],1)]),e._v(" "),a("h5",{attrs:{id:"_3-2-2-3-payload-example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-3-payload-example"}},[e._v("#")]),e._v(" 3.2.2.3. Payload example")]),e._v(" "),a("p",[e._v("Given a Meilisearch API Key used to sign the JWT from the user code. Here is an example of a valid payload for a tenant token.")]),e._v(" "),a("p",[e._v("e.g. "),a("code",[e._v("Meilisearch API key: rkDxFUHd02193e120218f72cc51a9db62729fdb4003e271f960d1631b54f3426fa8b2595")])]),e._v(" "),a("div",{staticClass:"language-jsonc extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v('{\n "apiKeyUid": "f0ec9882-0184-4303-89f0-d4c4d6912bcf", // The uid field value of the signing Meilisearch API Key\n "exp": 1641835850, // An expiration date in seconds from 1970-01-01T00:00:00Z UTC\n "searchRules": { // The searchRules Json Object definition\n "*": {\n "filter": "user_id = 1"\n }\n }\n}\n')])])]),a("blockquote",[a("p",[e._v("In this example, "),a("code",[e._v('"*"')]),e._v(" allows to specify that no matter which index is searched (among all those accessible by the signing API key that generated the tenant token), the "),a("code",[e._v("filter")]),e._v(" search rule is applied on all search requests.")])]),e._v(" "),a("h3",{attrs:{id:"_3-3-tenant-token-revokation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-tenant-token-revokation"}},[e._v("#")]),e._v(" 3.3. Tenant Token Revokation")]),e._v(" "),a("p",[e._v("It is not possible to revoke a specific tenant token.")]),e._v(" "),a("p",[e._v("The only way to do so is to "),a("strong",[e._v("delete the API key that signed it")]),e._v(" using the "),a("code",[e._v("DELETE - /keys/:apiKey")]),e._v(" endpoints of Meilisearch.")]),e._v(" "),a("p",[e._v("🚨 "),a("strong",[e._v("Doing this revoke all tenant tokens signed by this API Key.")])]),e._v(" "),a("p",[e._v("Another much more drastic method is to modify the "),a("code",[e._v("master key")]),e._v(" of the Meilisearch instance.")]),e._v(" "),a("p",[e._v("🚨🚨 "),a("strong",[e._v("Doing this regenerate all the API Keys and thus revoke all the tenant tokens generated regardless of the signing API Key.")])]),e._v(" "),a("h2",{attrs:{id:"_4-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-future-possibilities"}},[e._v("#")]),e._v(" 4. Future Possibilities")]),e._v(" "),a("ul",[a("li",[e._v("Handle more signing methods for the Tenant Token.")]),e._v(" "),a("li",[e._v("Handle more search parameters restrictions in "),a("code",[e._v("searchRules")]),e._v(".")]),e._v(" "),a("li",[e._v("Add a possibility to revoke a specific Tenant Token.")]),e._v(" "),a("li",[e._v("Introduce an endpoint to generate tenant tokens on the Meilisearch side.")])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/31.7ce04ec7.js b/docs/assets/js/31.eed11757.js similarity index 99% rename from docs/assets/js/31.7ce04ec7.js rename to docs/assets/js/31.eed11757.js index dc2348acb..65faaebe5 100644 --- a/docs/assets/js/31.7ce04ec7.js +++ b/docs/assets/js/31.eed11757.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[31],{454:function(e,t,a){"use strict";a.r(t);var s=a(62),i=Object(s.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("ul",[a("li",[e._v("Title: Auto-Batching")])]),e._v(" "),a("h1",{attrs:{id:"auto-batching"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#auto-batching"}},[e._v("#")]),e._v(" Auto-Batching")]),e._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("Meilisearch can automatically group consecutive asynchronous "),a("code",[e._v("documentAddition")]),e._v(" or "),a("code",[e._v("documentPartial")]),e._v(" tasks for the same index via an automatic batching mechanism.")]),e._v(" "),a("p",[e._v("The user can disable this auto-batching behavior. See "),a("a",{attrs:{href:"#32-auto-batching-mechanisms-options"}},[e._v("3.2. Auto-batching mechanisms options")]),e._v(" section.")]),e._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[e._v("We have regularly collected user pain points pointing out the slow indexing over the last year. We explained several times to users to make batches containing a maximum of documents to be updated/added to compress the indexing time of specific data structures.")]),e._v(" "),a("p",[e._v("To make Meilisearch easier to use, we explored the idea of automatically creating these batches within Meilisearch before indexing users’ documents.")]),e._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("h3",{attrs:{id:"_3-1-explanations"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-explanations"}},[e._v("#")]),e._v(" 3.1. Explanations")]),e._v(" "),a("p",[e._v("A batch preserves the logical order of the tasks for a given index.")]),e._v(" "),a("p",[e._v("Only consecutive "),a("code",[e._v("documentAdditionOrUpdate")]),e._v(" tasks for the same index can be in the same batch. All "),a("code",[e._v("tasks")]),e._v(" concerning other operations will also be part of a batch having only one task.")]),e._v(" "),a("h4",{attrs:{id:"_3-1-1-grouping-tasks-to-a-single-batch"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-grouping-tasks-to-a-single-batch"}},[e._v("#")]),e._v(" 3.1.1. Grouping tasks to a single batch")]),e._v(" "),a("p",[e._v("The scheduling program that groups tasks within a single batch is triggered when an asynchronous "),a("code",[e._v("task")]),e._v(" currently processed reaches a terminal state as "),a("code",[e._v("succeeded")]),e._v(" or "),a("code",[e._v("failed")]),e._v(".")]),e._v(" "),a("p",[e._v("In other words, when a scheduled "),a("code",[e._v("documentAdditionOrUpdate")]),e._v(" task for a given index is picked from the task queue, the scheduler fetches and groups all "),a("code",[e._v("documentAdditionOrUpdate")]),e._v(" tasks for that same index in a batch.")]),e._v(" "),a("p",[e._v("The more similar consecutive tasks the user sends in a row, the more likely the batching mechanism can group these tasks.")]),e._v(" "),a("h5",{attrs:{id:"_3-1-1-1-schema"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-schema"}},[e._v("#")]),e._v(" 3.1.1.1. Schema")]),e._v(" "),a("p",[a("img",{attrs:{src:"https://user-images.githubusercontent.com/3692335/145787054-4cb07b5e-c80e-498a-8843-d0cc46329e9b.png",alt:"Auto-batching Process"}})]),e._v(" "),a("h5",{attrs:{id:"_3-1-1-2-batchuid-generation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-batchuid-generation"}},[e._v("#")]),e._v(" 3.1.1.2. "),a("code",[e._v("batchUid")]),e._v(" generation")]),e._v(" "),a("p",[e._v("All tasks are part of a batch identified by an internal "),a("code",[e._v("batchUid")]),e._v(" field. A task batch preserves the logical order of the tasks for a given index. The batch identifiers are unique and strictly increasing. The "),a("code",[e._v("batchUid")]),e._v(" field is internal; thus not visible on a "),a("code",[e._v("task")]),e._v(" resource.")]),e._v(" "),a("h4",{attrs:{id:"_3-1-2-impacts-on-task-api-resource"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-impacts-on-task-api-resource"}},[e._v("#")]),e._v(" 3.1.2. Impacts on "),a("code",[e._v("task")]),e._v(" API resource")]),e._v(" "),a("ul",[a("li",[e._v("The different tasks grouped in a batch are processed within the same transaction. But if a task fails within a batch, the whole batch does not fail, only the related task.")]),e._v(" "),a("li",[e._v("Tasks within the same batch share the same values for the "),a("code",[e._v("startedAt")]),e._v(", "),a("code",[e._v("finishedAt")]),e._v(", "),a("code",[e._v("duration")]),e._v(" fields, and the same "),a("code",[e._v("error")]),e._v(" object if an error occurs for a "),a("code",[e._v("task")]),e._v(" during the batch processing.")]),e._v(" "),a("li",[e._v("If a batch contains many "),a("code",[e._v("tasks")]),e._v(", the "),a("code",[e._v("task")]),e._v(" "),a("code",[e._v("details")]),e._v(" "),a("code",[e._v("indexedDocuments")]),e._v(" is identical in all "),a("code",[e._v("tasks")]),e._v(" belonging to the same processed "),a("code",[e._v("batch")]),e._v(".")])]),e._v(" "),a("h2",{attrs:{id:"_4-technical-aspects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-aspects"}},[e._v("#")]),e._v(" 4. Technical Aspects")]),e._v(" "),a("p",[e._v("N/A")]),e._v(" "),a("h2",{attrs:{id:"_5-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),a("ul",[a("li",[e._v("Extends it for all consecutive payload types.")]),e._v(" "),a("li",[e._v("Expose the "),a("code",[e._v("batchUid")]),e._v(" field and add a filter capability on it on the "),a("code",[e._v("/tasks")]),e._v(" endpoints.")]),e._v(" "),a("li",[e._v("Report the documents that could not be indexed to the user in a more precise manner.")]),e._v(" "),a("li",[e._v("Optimize some tasks sequence, for example if there is a document addition followed by an index deletion, we could skip the document addition.")])])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[31],{455:function(e,t,a){"use strict";a.r(t);var s=a(62),i=Object(s.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("ul",[a("li",[e._v("Title: Auto-Batching")])]),e._v(" "),a("h1",{attrs:{id:"auto-batching"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#auto-batching"}},[e._v("#")]),e._v(" Auto-Batching")]),e._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("Meilisearch can automatically group consecutive asynchronous "),a("code",[e._v("documentAddition")]),e._v(" or "),a("code",[e._v("documentPartial")]),e._v(" tasks for the same index via an automatic batching mechanism.")]),e._v(" "),a("p",[e._v("The user can disable this auto-batching behavior. See "),a("a",{attrs:{href:"#32-auto-batching-mechanisms-options"}},[e._v("3.2. Auto-batching mechanisms options")]),e._v(" section.")]),e._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[e._v("We have regularly collected user pain points pointing out the slow indexing over the last year. We explained several times to users to make batches containing a maximum of documents to be updated/added to compress the indexing time of specific data structures.")]),e._v(" "),a("p",[e._v("To make Meilisearch easier to use, we explored the idea of automatically creating these batches within Meilisearch before indexing users’ documents.")]),e._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("h3",{attrs:{id:"_3-1-explanations"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-explanations"}},[e._v("#")]),e._v(" 3.1. Explanations")]),e._v(" "),a("p",[e._v("A batch preserves the logical order of the tasks for a given index.")]),e._v(" "),a("p",[e._v("Only consecutive "),a("code",[e._v("documentAdditionOrUpdate")]),e._v(" tasks for the same index can be in the same batch. All "),a("code",[e._v("tasks")]),e._v(" concerning other operations will also be part of a batch having only one task.")]),e._v(" "),a("h4",{attrs:{id:"_3-1-1-grouping-tasks-to-a-single-batch"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-grouping-tasks-to-a-single-batch"}},[e._v("#")]),e._v(" 3.1.1. Grouping tasks to a single batch")]),e._v(" "),a("p",[e._v("The scheduling program that groups tasks within a single batch is triggered when an asynchronous "),a("code",[e._v("task")]),e._v(" currently processed reaches a terminal state as "),a("code",[e._v("succeeded")]),e._v(" or "),a("code",[e._v("failed")]),e._v(".")]),e._v(" "),a("p",[e._v("In other words, when a scheduled "),a("code",[e._v("documentAdditionOrUpdate")]),e._v(" task for a given index is picked from the task queue, the scheduler fetches and groups all "),a("code",[e._v("documentAdditionOrUpdate")]),e._v(" tasks for that same index in a batch.")]),e._v(" "),a("p",[e._v("The more similar consecutive tasks the user sends in a row, the more likely the batching mechanism can group these tasks.")]),e._v(" "),a("h5",{attrs:{id:"_3-1-1-1-schema"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-schema"}},[e._v("#")]),e._v(" 3.1.1.1. Schema")]),e._v(" "),a("p",[a("img",{attrs:{src:"https://user-images.githubusercontent.com/3692335/145787054-4cb07b5e-c80e-498a-8843-d0cc46329e9b.png",alt:"Auto-batching Process"}})]),e._v(" "),a("h5",{attrs:{id:"_3-1-1-2-batchuid-generation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-batchuid-generation"}},[e._v("#")]),e._v(" 3.1.1.2. "),a("code",[e._v("batchUid")]),e._v(" generation")]),e._v(" "),a("p",[e._v("All tasks are part of a batch identified by an internal "),a("code",[e._v("batchUid")]),e._v(" field. A task batch preserves the logical order of the tasks for a given index. The batch identifiers are unique and strictly increasing. The "),a("code",[e._v("batchUid")]),e._v(" field is internal; thus not visible on a "),a("code",[e._v("task")]),e._v(" resource.")]),e._v(" "),a("h4",{attrs:{id:"_3-1-2-impacts-on-task-api-resource"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-impacts-on-task-api-resource"}},[e._v("#")]),e._v(" 3.1.2. Impacts on "),a("code",[e._v("task")]),e._v(" API resource")]),e._v(" "),a("ul",[a("li",[e._v("The different tasks grouped in a batch are processed within the same transaction. But if a task fails within a batch, the whole batch does not fail, only the related task.")]),e._v(" "),a("li",[e._v("Tasks within the same batch share the same values for the "),a("code",[e._v("startedAt")]),e._v(", "),a("code",[e._v("finishedAt")]),e._v(", "),a("code",[e._v("duration")]),e._v(" fields, and the same "),a("code",[e._v("error")]),e._v(" object if an error occurs for a "),a("code",[e._v("task")]),e._v(" during the batch processing.")]),e._v(" "),a("li",[e._v("If a batch contains many "),a("code",[e._v("tasks")]),e._v(", the "),a("code",[e._v("task")]),e._v(" "),a("code",[e._v("details")]),e._v(" "),a("code",[e._v("indexedDocuments")]),e._v(" is identical in all "),a("code",[e._v("tasks")]),e._v(" belonging to the same processed "),a("code",[e._v("batch")]),e._v(".")])]),e._v(" "),a("h2",{attrs:{id:"_4-technical-aspects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-aspects"}},[e._v("#")]),e._v(" 4. Technical Aspects")]),e._v(" "),a("p",[e._v("N/A")]),e._v(" "),a("h2",{attrs:{id:"_5-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),a("ul",[a("li",[e._v("Extends it for all consecutive payload types.")]),e._v(" "),a("li",[e._v("Expose the "),a("code",[e._v("batchUid")]),e._v(" field and add a filter capability on it on the "),a("code",[e._v("/tasks")]),e._v(" endpoints.")]),e._v(" "),a("li",[e._v("Report the documents that could not be indexed to the user in a more precise manner.")]),e._v(" "),a("li",[e._v("Optimize some tasks sequence, for example if there is a document addition followed by an index deletion, we could skip the document addition.")])])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/34.1ae80f5b.js b/docs/assets/js/34.c87f6484.js similarity index 99% rename from docs/assets/js/34.1ae80f5b.js rename to docs/assets/js/34.c87f6484.js index 4fcd258e3..5871f8f72 100644 --- a/docs/assets/js/34.1ae80f5b.js +++ b/docs/assets/js/34.c87f6484.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[34],{459:function(t,e,a){"use strict";a.r(e);var s=a(62),r=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"search-api"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#search-api"}},[t._v("#")]),t._v(" Search API")]),t._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),a("p",[t._v("The search endpoints retrieve documents from an index. Their returned documents are considered relevant based on the settings of the index and the provided search parameters.")]),t._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),a("p",[t._v("N/A")]),t._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),a("p",[t._v("Meilisearch exposes 2 routes to perform search requests:")]),t._v(" "),a("ul",[a("li",[a("p",[t._v("GET "),a("code",[t._v("indexes/:index_uid/search")])])]),t._v(" "),a("li",[a("p",[t._v("POST "),a("code",[t._v("indexes/:index_uid/search")])])]),t._v(" "),a("li",[a("p",[t._v("🔴 Sending an invalid index uid format for the "),a("code",[t._v(":index_uid")]),t._v(" path parameter returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[t._v("invalid_index_uid")]),t._v(" error.")],1)]),t._v(" "),a("li",[a("p",[t._v("🔴 If the index does not exist, the API returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[t._v("index_not_found")]),t._v(" error.")],1)])]),t._v(" "),a("p",[t._v("If a master key is used to secure a Meilisearch instance, the auth layer returns the following errors:")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Accessing these routes without the "),a("code",[t._v("Authorization")]),t._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Accessing these routes with a key that does not have permissions (i.e. other than the master key) returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),a("p",[a("code",[t._v("POST")]),t._v(" HTTP verb errors:")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Omitting the Content-Type header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[t._v("missing_content_type")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending an empty Content-Type returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[t._v("invalid_content_type")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending a different Content-Type than "),a("code",[t._v("application/json")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[t._v("invalid_content_type")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending an empty payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[t._v("missing_payload")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending an invalid JSON payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[t._v("malformed_payload")]),t._v(" error.")],1)]),t._v(" "),a("h3",{attrs:{id:"_3-1-search-payload-parameters"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-search-payload-parameters"}},[t._v("#")]),t._v(" 3.1. Search Payload Parameters")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Field")]),t._v(" "),a("th",[t._v("Type")]),t._v(" "),a("th",[t._v("Required")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[a("a",{attrs:{href:"#311-q"}},[a("code",[t._v("q")])])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#312-filter"}},[a("code",[t._v("filter")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#313-sort"}},[a("code",[t._v("sort")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#314-facets"}},[a("code",[t._v("facets")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#315-limit"}},[a("code",[t._v("limit")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#316-offset"}},[a("code",[t._v("offset")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#317-page"}},[a("code",[t._v("page")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#318-hitsperpage"}},[a("code",[t._v("hitsPerPage")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#319-attributestoretrieve"}},[a("code",[t._v("attributesToRetrieve")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3110-attributestohighlight"}},[a("code",[t._v("attributesToHighlight")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3111-highlightpretag"}},[a("code",[t._v("highlightPreTag")])])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3112-highlightposttag"}},[a("code",[t._v("highlightPostTag")])])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3113-attributestocrop"}},[a("code",[t._v("attributesToCrop")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3114-croplength"}},[a("code",[t._v("cropLength")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3115-cropmarker"}},[a("code",[t._v("cropMarker")])])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3116-showmatchesposition"}},[a("code",[t._v("showMatchesPosition")])])]),t._v(" "),a("td",[t._v("Boolean")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3117-showrankingscore"}},[a("code",[t._v("showRankingScore")])])]),t._v(" "),a("td",[t._v("Boolean")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3118-showrankingscoredetails"}},[a("code",[t._v("showRankingScoreDetails")])])]),t._v(" "),a("td",[t._v("Boolean")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3119-matchingStrategy"}},[a("code",[t._v("matchingStrategy")])])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3120-attributesToSearchOn"}},[a("code",[t._v("attributesToSearchOn")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3121-vector"}},[a("code",[t._v("vector")])]),t._v(" "),a("code",[t._v("EXPERIMENTAL")])]),t._v(" "),a("td",[t._v("Array of Float")]),t._v(" "),a("td",[t._v("False")])])])]),t._v(" "),a("h4",{attrs:{id:"_3-1-1-q"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-q"}},[t._v("#")]),t._v(" 3.1.1. "),a("code",[t._v("q")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("null")])])]),t._v(" "),a("p",[a("code",[t._v("q")]),t._v(" contains the terms to search within the index documents.")]),t._v(" "),a("blockquote",[a("p",[t._v("When q isn't specified, Meilisearch performs a "),a("strong",[t._v("placeholder search")]),t._v(". A placeholder search returns all searchable documents in an index, modified by any search parameters used and sorted by that index's custom ranking rules. If the index has no sort search parameter or custom ranking rules, the results are returned in the order of their internal database position.")])]),t._v(" "),a("blockquote",[a("p",[t._v("Meilisearch only considers the first ten words of any given search query to deliver a fast search-as-you-type experience.")])]),t._v(" "),a("blockquote",[a("p",[a("code",[t._v("q")]),t._v(" supports the "),a("RouterLink",{attrs:{to:"/specifications/text/0043-phrase-query.html"}},[t._v("Phrase Query")]),t._v(" expression.")],1)]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("String")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("q")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_q"}},[t._v("invalid_search_q")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-2-filter"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-filter"}},[t._v("#")]),t._v(" 3.1.2. "),a("code",[t._v("filter")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String (POST/GET) | Array of (String, Array of String) (POST)")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("[]|null")])])]),t._v(" "),a("p",[a("code",[t._v("filter")]),t._v(" contains a filter expression written as a string or an array of (strings and array of strings). Its purpose is to refine search results by selecting documents that match the given filter and running the search query only on those documents.")]),t._v(" "),a("p",[t._v("Attributes used as filter criteria must be added to the "),a("code",[t._v("filterableAttributes")]),t._v(" list of an index settings. See "),a("RouterLink",{attrs:{to:"/specifications/text/0123-filterable-attributes-setting-api.html"}},[t._v("Filterable Attributes Setting API")]),t._v(".")],1),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("String")]),t._v("(GET/POST), "),a("code",[t._v("Array of (Array of String, String) (POST)")]),t._v(", or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("filter")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_filter"}},[t._v("invalid_search_filter")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending an invalid syntax for "),a("code",[t._v("filter")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_filter"}},[t._v("invalid_search_filter")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending a field not defined as a "),a("code",[t._v("filterableAttributes")]),t._v(" for "),a("code",[t._v("filter")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_filter"}},[t._v("invalid_search_filter")]),t._v(" error.")],1)]),t._v(" "),a("h5",{attrs:{id:"_3-1-2-1-string-syntax"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-string-syntax"}},[t._v("#")]),t._v(" 3.1.2.1. String Syntax")]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-1-grammar"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-1-grammar"}},[t._v("#")]),t._v(" 3.1.2.1.1 Grammar")]),t._v(" "),a("p",[t._v("The grammar of the filter syntax is given below in pseudo-BNF form:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('filter = expression EOF\nexpression = or\nor = and ("OR" WS+ and)*\nand = not ("AND" WS+ not)*\nnot = ("NOT" WS+ not) | primary\nprimary = "(" WS* expression WS* ")" | geoRadius | geoBoundingBox | in | condition | exists | not_exists | to\nin = attribute "IN" WS* "[" value_list "]"\ncondition = attribute ("=" | "!=" | ">" | ">=" | "<" | "<=") value\nexists = attribute "EXISTS"\nnot_exists = attribute "NOT" WS+ "EXISTS"\nto = attribute value "TO" WS+ value\nvalue = WS* ( word | singleQuoted | doubleQuoted) WS+\nattribute = value\nvalue_list = (value ("," value)* ","?)?\nsingleQuoted = "\'" single_quoted_string "\'"\ndoubleQuoted = "\\"" double_quoted_string "\\""\nword = ([a-zA-Z0-9] | "_" | "-" | ".")+\ngeoRadius = "_geoRadius(" WS* float WS* "," WS* float WS* "," float WS* ")"\nfloat = [+-]?[0-9]*("."[0-9]+)?(("E"|"e") [+-]?[0-9]+)?\nWS = \' \' | \'\\t\' | \'\\r\' | \'\\n\'\n')])])]),a("p",[t._v("where "),a("code",[t._v("single_quoted_string")]),t._v(" and "),a("code",[t._v("double_quoted_string")]),t._v(" can contain anything except unescaped single quotes "),a("code",[t._v("'")]),t._v(" and unescaped double quotes "),a("code",[t._v('"')]),t._v(", respectively. Quotes are escaped by a preceding backslash. For example: "),a("code",[t._v('"escaped \\" double quote" "')]),t._v(" and "),a("code",[t._v("escaped \\' single quote")]),t._v(". If a backslash is not followed by the correct quote, it is kept in the string.")]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-2-naming-a-filterable-attribute"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-2-naming-a-filterable-attribute"}},[t._v("#")]),t._v(" 3.1.2.1.2 Naming a filterable attribute")]),t._v(" "),a("p",[t._v("A filterable attribute can appear in a filter by its unquoted name if it only contains ascii alphanumeric characters, dots, hyphens, and underscores.")]),t._v(" "),a("p",[t._v("For example, each filter below selects the documents where the given filterable attribute (on the left side of the equal) is equal to a specific value (on the right side):")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('genres = "film"\ngenre.subgenre = "adventure"\n_geo.lat = 1.23\n101 = "abc"\n')])])]),a("p",[t._v("If the filterable attribute is composed of multiple words or contains other characters, it must be quoted, either using single quotes or double quotes:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('"place of birth" = Berlin\n"∆" = 2.1\n"Friend\'s name" = Albus\n\'opinion on "the best search engine"\' = "meilisearch"\n')])])]),a("p",[t._v("If the filterable attribute contains the same quote character that surrounds the attribute, then this quote character must be escaped by a preceding backslash:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("'Friend\\'s name' = Albus\n")])])]),a("h5",{attrs:{id:"_3-1-2-1-3-naming-the-value-of-a-filterable-attribute"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-3-naming-the-value-of-a-filterable-attribute"}},[t._v("#")]),t._v(" 3.1.2.1.3 Naming the value of a filterable attribute")]),t._v(" "),a("p",[t._v("The grammar for the value of a filterable attribute is the same as the grammar for filterable attributes themselves.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-2-1-4-list-of-supported-operators"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-4-list-of-supported-operators"}},[t._v("#")]),t._v(" 3.1.2.1.4 List of supported operators")]),t._v(" "),a("ul",[a("li",[t._v("Equality: "),a("code",[t._v("attribute = value")])]),t._v(" "),a("li",[t._v("Inequality: "),a("code",[t._v("attribute != value")])]),t._v(" "),a("li",[t._v("Comparison:\n"),a("ul",[a("li",[a("code",[t._v("attribute < value")])]),t._v(" "),a("li",[a("code",[t._v("attribute <= value")])]),t._v(" "),a("li",[a("code",[t._v("attribute > value")])]),t._v(" "),a("li",[a("code",[t._v("attribute >= value")])]),t._v(" "),a("li",[a("code",[t._v("attribute value TO value")])])])]),t._v(" "),a("li",[t._v("Exists:\n"),a("ul",[a("li",[a("code",[t._v("attribute EXISTS")])]),t._v(" "),a("li",[a("code",[t._v("attribute NOT EXISTS")])])])]),t._v(" "),a("li",[t._v("IN:\n"),a("ul",[a("li",[a("code",[t._v("attribute IN[value, value, etc.]")])]),t._v(" "),a("li",[a("code",[t._v("attribute NOT IN[value, value, etc.]")])])])]),t._v(" "),a("li",[t._v("IS EMPTY:\n"),a("ul",[a("li",[a("code",[t._v("attribute IS EMPTY")])]),t._v(" "),a("li",[a("code",[t._v("attribute IS NOT EMPTY")])])])]),t._v(" "),a("li",[t._v("IS NULL:\n"),a("ul",[a("li",[a("code",[t._v("attribute IS NULL")])]),t._v(" "),a("li",[a("code",[t._v("attribute IS NOT NULL")])])])]),t._v(" "),a("li",[t._v("AND: "),a("code",[t._v("filter AND filter")])]),t._v(" "),a("li",[t._v("OR: "),a("code",[t._v("filter OR filter")])]),t._v(" "),a("li",[t._v("NOT: "),a("code",[t._v("NOT filter")])]),t._v(" "),a("li",[t._v("GeoSearch: "),a("code",[t._v("_geoRadius(lat, lng, distance)")])]),t._v(" "),a("li",[t._v("GeoSearch: "),a("code",[t._v("_geoBoundingBox([lat, lng], [lat, lng])")])])]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-5-equality"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-5-equality"}},[t._v("#")]),t._v(" 3.1.2.1.5 Equality")]),t._v(" "),a("p",[t._v("The equality operator, "),a("code",[t._v("=")]),t._v(", selects the documents for which:")]),t._v(" "),a("ol",[a("li",[t._v("the given filterable attribute exists; and")]),t._v(" "),a("li",[t._v("the attribute contains a value that is equal to a specific value")])]),t._v(" "),a("p",[t._v("It is an infix operator that takes an attribute name on the left hand side and a value on the right hand side.")]),t._v(" "),a("p",[t._v("For example, given the documents:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"size"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"size"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"L"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"size"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"small"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"shop_distance"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1.2e+5")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("then the filter:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("size = 1\n")])])]),a("p",[t._v("will select the documents with ids "),a("code",[t._v("0")]),t._v(" and "),a("code",[t._v("1")]),t._v(".")]),t._v(" "),a("p",[t._v("Note that there is no way to specify whether the value on the right hand side of the equality should be interpreted as a string or as a number. Meilisearch will always try to match both. And since unquoted values cannot contain the "),a("code",[t._v("+")]),t._v(" character, it is in fact necessary to quote floating point numbers that have positive exponents:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('shop_distance = "1.2e+5"\n')])])]),a("p",[t._v("will select the document with id "),a("code",[t._v("3")]),t._v(".")]),t._v(" "),a("p",[t._v("Furthermore, there is no way to check whether an attribute has a value that is "),a("code",[t._v("null")]),t._v(" or an array. An attribute whose value is "),a("code",[t._v("null")]),t._v(" or an empty array is considered not to have any value and will therefore never be matched by an equality operator.")]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-6-inequality"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-6-inequality"}},[t._v("#")]),t._v(" 3.1.2.1.6 Inequality")]),t._v(" "),a("p",[t._v("The inequality operator selects all documents that are not selected by the equality operator.\nWith the same documents given as examples to the equality operator, the following filter:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("size != 1\n")])])]),a("p",[t._v("will select the documents with ids "),a("code",[t._v("2")]),t._v(" and "),a("code",[t._v("3")]),t._v(".")]),t._v(" "),a("p",[t._v("Note that "),a("code",[t._v("attribute != value")]),t._v(" is equivalent to "),a("code",[t._v("NOT attribute = value")]),t._v(".")]),t._v(" "),a("p",[t._v("Furthermore, there is no way to write a filter to select documents which contain a value that is different than a given string or number. In the example above, "),a("code",[t._v("size != 1")]),t._v(" did not select the document with id "),a("code",[t._v("1")]),t._v(", even though its "),a("code",[t._v("size")]),t._v(" attribute contains the value "),a("code",[t._v('"L"')]),t._v(", which is different than "),a("code",[t._v("1")]),t._v(".")]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-7-comparison"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-7-comparison"}},[t._v("#")]),t._v(" 3.1.2.1.7 Comparison")]),t._v(" "),a("p",[t._v("The comparison operators select the documents for which:")]),t._v(" "),a("ol",[a("li",[t._v("the filterable attribute exists; and")]),t._v(" "),a("li",[t._v("the attribute contains a number that satisfies the comparison")])]),t._v(" "),a("p",[t._v("Note that the right hand side of the comparison must be a valid floating point number.")]),t._v(" "),a("p",[t._v("For example, with the documents:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"size"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"small"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"blue"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"size"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"size"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Then the following filters will select these documents:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("size > 1 -> selects [1]\nsize >= 1 -> selects [1,2]\nsize < 2 -> selects [0,1]\nsize <= 2 -> selects [0,1,2]\nsize -1 TO 2 -> equivalent to size >= -1 AND size <= 2 -> selects [0,1,2]\n")])])]),a("p",[t._v("And the following filters are invalid:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('size > "small"\nsize "larga" TO "largz"\n')])])]),a("h5",{attrs:{id:"_3-1-2-1-8-combining-filter-conditions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-8-combining-filter-conditions"}},[t._v("#")]),t._v(" 3.1.2.1.8 Combining filter conditions")]),t._v(" "),a("p",[t._v("Multiple filters can be combined together using the operators "),a("code",[t._v("AND")]),t._v(" and "),a("code",[t._v("OR")]),t._v(". These infix operators take two sub-filters as arguments.")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("AND")]),t._v(" operator selects the documents that are selected by both subfilters at the same time. In other words, it is an intersection of the two sets of documents selected by the sub-filters.")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("OR")]),t._v(" operator selects the documents that are selected by either operator. In other words, it is a union of the two sets of documents selected by the sub-filters.")]),t._v(" "),a("p",[t._v("Note that "),a("code",[t._v("AND")]),t._v(" has a higher precedence than "),a("code",[t._v("OR")]),t._v(". Therefore, the following filter:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("x = 1 AND y = 2 OR z = 3\n")])])]),a("p",[t._v("will be interepreted as:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("(x = 1 AND y = 2) OR (z = 3)\n")])])]),a("p",[t._v("With the same documents given as examples for the comparison operators, the following filters will select these documents:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('size = 0 OR size = 1 -> selects [0,1]\nsize = 0 AND (size = 2 OR colour = "blue") -> selects []\nsize = 0 AND size = 2 OR colour = "blue" -> selects [0]\nsize > 5 AND size < 5 -> selects [2]\n')])])]),a("h6",{attrs:{id:"_3-1-2-1-9-negating-a-filter"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-9-negating-a-filter"}},[t._v("#")]),t._v(" 3.1.2.1.9 Negating a filter")]),t._v(" "),a("p",[t._v("The negation operator, "),a("code",[t._v("NOT")]),t._v(", is used to select all documents that are not selected by a sub-filter. It is a prefix operator that takes one argument. Its precedence is higher than both "),a("code",[t._v("AND")]),t._v(" and "),a("code",[t._v("OR")]),t._v(".")]),t._v(" "),a("p",[t._v("With the same documents given as examples for the comparison operators, the following filters will select these documents:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('NOT size = 0 -> selects [1,2]\nNOT (size = 0 OR size = 1) -> selects [2]\nNOT size = 0 OR size = 1 -> selects [1,2]\nNOT (size < 2 AND colour = "blue") -> selects [1,2]\nNOT size < 2 AND colour = "blue" -> selects []\nsize = 0 OR NOT size = 2 -> selects [0,1]\nNOT (NOT size = 0) -> selects [0]\n')])])]),a("h6",{attrs:{id:"_3-1-2-1-10-exists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-10-exists"}},[t._v("#")]),t._v(" 3.1.2.1.10 EXISTS")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("EXISTS")]),t._v(" operator selects the documents for which the filterable attribute exists, even if its value is "),a("code",[t._v("null")]),t._v(" or an empty array. It is a postfix operator that takes an attribute name as argument.")]),t._v(" "),a("p",[t._v("The negated form of "),a("code",[t._v("EXISTS")]),t._v(" can be written in two ways:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("attribute NOT EXISTS\nNOT attribute EXISTS\n")])])]),a("p",[t._v("Both forms are equivalent. They select the documents for which the attribute does not exist.")]),t._v(" "),a("p",[t._v("For example, with the documents:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Then the filter "),a("code",[t._v("colour EXISTS")]),t._v(" selects the document ids "),a("code",[t._v("[0,1]")]),t._v(" while the filter "),a("code",[t._v("colour NOT EXISTS")]),t._v(" or "),a("code",[t._v("NOT colour EXISTS")]),t._v(" selects the document ids "),a("code",[t._v("[2]")]),t._v(".")]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-11-in"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-11-in"}},[t._v("#")]),t._v(" 3.1.2.1.11 IN")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("IN[..]")]),t._v(" operator is a more concise way to combine equality operators. It is a postfix operator that takes an attribute name on the left hand side and an array of values on the right hand side. An array of value is a comma-separated list of values delimited by square brackets.")]),t._v(" "),a("p",[t._v("The two filters below are equivalent:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("attribute IN[value1, value2, value3,]\n\nattribute = value1 OR attribute = value2 OR attribute = value3\n")])])]),a("p",[t._v("In short, "),a("code",[t._v("IN")]),t._v(" selects the documents for which:")]),t._v(" "),a("ol",[a("li",[t._v("the filterable attribute exists; and")]),t._v(" "),a("li",[t._v("the attribute contains a value that is equal to any of the values in the array")])]),t._v(" "),a("p",[t._v("The negated form of "),a("code",[t._v("IN")]),t._v(" can be written in two different ways:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("attribute NOT IN [value1, value2, etc.]\nNOT attribute IN [value1, value2, etc.]\n")])])]),a("p",[t._v("and it is equivalent to:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("attribute != value1 AND attribute != value2 AND ...\n")])])]),a("h6",{attrs:{id:"_3-1-2-1-12-geo-search"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-12-geo-search"}},[t._v("#")]),t._v(" 3.1.2.1.12 Geo Search")]),t._v(" "),a("ul",[a("li",[t._v("The "),a("code",[t._v("_geoRadius")]),t._v(" operator selects the documents whose geographical coordinates fall within a certain range of a given coordinate. See "),a("RouterLink",{attrs:{to:"/specifications/text/0059-geo-search.html"}},[t._v("GeoSearch")]),t._v(" for more information.")],1),t._v(" "),a("li",[t._v("The "),a("code",[t._v("_geoBoundingBox")]),t._v(" operator selects the documents whose geographical coordinates fall within a square described by the given coordinates. See "),a("RouterLink",{attrs:{to:"/specifications/text/0059-geo-search.html"}},[t._v("GeoSearch")]),t._v(" for more information.")],1)]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-12-is-empty"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-12-is-empty"}},[t._v("#")]),t._v(" 3.1.2.1.12 IS EMPTY")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("IS EMPTY")]),t._v(" operator selects the documents for which the filterable attribute exists and is empty. If the attribute doesn't exists then it is not empty and the document will not be returned. It is a postfix operator that takes an attribute name as argument.")]),t._v(" "),a("p",[t._v("The negated form of "),a("code",[t._v("IS EMPTY")]),t._v(" can be written in two ways:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("attribute IS NOT EMPTY\nNOT attribute IS EMPTY\n")])])]),a("p",[t._v("Both forms are equivalent. They select the documents for which the attribute is not empty.")]),t._v(" "),a("p",[t._v("Here is the list of JSON values that are considered empty:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v('""')])]),t._v(" "),a("li",[a("code",[t._v("[]")])]),t._v(" "),a("li",[a("code",[t._v("{}")])])]),t._v(" "),a("p",[t._v("For example, with the documents:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("4")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Then the filter "),a("code",[t._v("colour IS EMPTY")]),t._v(" selects the document ids "),a("code",[t._v("[0,2,3]")]),t._v(" while the filter "),a("code",[t._v("colour IS NOT EMPTY")]),t._v(" or "),a("code",[t._v("NOT colour IS EMPTY")]),t._v(" selects the document ids "),a("code",[t._v("[1,4]")]),t._v(".")]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-13-is-null"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-13-is-null"}},[t._v("#")]),t._v(" 3.1.2.1.13 IS NULL")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("IS NULL")]),t._v(" operator selects the documents for which the filterable attribute exists and is "),a("code",[t._v("null")]),t._v(". If the attribute doesn't exists then it is not "),a("code",[t._v("null")]),t._v(" and the document will not be returned. It is a postfix operator that takes an attribute name as argument.")]),t._v(" "),a("p",[t._v("The negated form of "),a("code",[t._v("IS NULL")]),t._v(" can be written in two ways:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("attribute IS NOT NULL\nNOT attribute IS NULL\n")])])]),a("p",[t._v("Both forms are equivalent. They select the documents for which the attribute is not "),a("code",[t._v("null")]),t._v(".")]),t._v(" "),a("p",[t._v("For example, with the documents:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("4")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Then the filter "),a("code",[t._v("colour IS NULL")]),t._v(" selects the document ids "),a("code",[t._v("[1]")]),t._v(" while the filter "),a("code",[t._v("colour IS NOT NULL")]),t._v(" or "),a("code",[t._v("NOT colour IS NULL")]),t._v(" selects the document ids "),a("code",[t._v("[0,2,3,4]")]),t._v(".")]),t._v(" "),a("h5",{attrs:{id:"_3-1-2-2-array-syntax"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-2-array-syntax"}},[t._v("#")]),t._v(" 3.1.2.2. Array Syntax")]),t._v(" "),a("p",[t._v("The array syntax is an alternative way to combine different filters with "),a("code",[t._v("OR")]),t._v(" and "),a("code",[t._v("AND")]),t._v(" operators.")]),t._v(" "),a("ul",[a("li",[t._v("Elements in the outer array are connected by "),a("code",[t._v("AND")]),t._v(" operators")]),t._v(" "),a("li",[t._v("Elements in the inner arrays are connected by "),a("code",[t._v("OR")]),t._v(" operators")])]),t._v(" "),a("p",[t._v("Example:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"genres = Comedy"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"genres = Romance"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"director = 'Mati Diop'\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("is equivalent to:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"(genres = Comedy OR genres = Romance) AND (director = 'Mati Diop')\"")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"_3-1-3-sort"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-sort"}},[t._v("#")]),t._v(" 3.1.3. "),a("code",[t._v("sort")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of String (POST) | String (GET)")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("[]|null")])])]),t._v(" "),a("p",[a("code",[t._v("sort")]),t._v(" contains a sort expression written as a string or an array of strings. It sorts the search results at query time according to the specified attributes and indicated order.")]),t._v(" "),a("p",[t._v("Attributes used as sort criteria must be added to the `sortableAttributes list of an index settings. See "),a("RouterLink",{attrs:{to:"/specifications/text/0123-sortable-attributes-setting-api.html"}},[t._v("Sortable Attributes Setting API")]),t._v(".")],1),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array of String")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("sort")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_sort"}},[t._v("invalid_search_sort")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending an invalid syntax for "),a("code",[t._v("sort")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_sort"}},[t._v("invalid_search_sort")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending a field not defined as a "),a("code",[t._v("sortableAttributes")]),t._v(" for "),a("code",[t._v("sort")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_sort"}},[t._v("invalid_search_sort")]),t._v(" error.")],1)]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0055-sort.html"}},[t._v("Sort")])],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-4-facets"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-facets"}},[t._v("#")]),t._v(" 3.1.4. "),a("code",[t._v("facets")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of String (POST) | String (GET)")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("[]|null")])])]),t._v(" "),a("p",[a("code",[t._v("facets")]),t._v(" permits to specify facets to be computed for the current search query.")]),t._v(" "),a("p",[t._v("It returns the number of documents matching the current search query for each specified facet.")]),t._v(" "),a("p",[t._v("This parameter can take two values:")]),t._v(" "),a("ul",[a("li",[t._v("An array of attributes: "),a("code",[t._v('facets=["attributeA", "attributeB", …]')])]),t._v(" "),a("li",[t._v("A wildcard "),a("code",[t._v('"*"')]),t._v(" — this returns a count for all facets present in "),a("code",[t._v("filterableAttributes")])])]),t._v(" "),a("p",[t._v("Attributes used in "),a("code",[t._v("facets")]),t._v(" must be added to the "),a("code",[t._v("filterableAttributes")]),t._v(" list of an index settings. See "),a("RouterLink",{attrs:{to:"/specifications/text/0123-filterable-attributes-setting-api.html"}},[t._v("Filterable Attributes Setting API")]),t._v(".")],1),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array of String")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("facets")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_facets"}},[t._v("invalid_search_facets")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending a field not defined as a "),a("code",[t._v("filterableAttributes")]),t._v(" for "),a("code",[t._v("facets")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_facets"}},[t._v("invalid_search_facets")]),t._v(" error.")],1)]),t._v(" "),a("p",[t._v("The distribution of the different facets is returned in the "),a("code",[t._v("facetDistribution")]),t._v(" response parameter.")]),t._v(" "),a("p",[t._v("Statistics are computed and returned within the "),a("code",[t._v("facetStats")]),t._v(" object for distributed facets. See "),a("a",{attrs:{href:"#3210-facetstats"}},[a("code",[t._v("facetStats")])]),t._v(" section.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-5-limit"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-5-limit"}},[t._v("#")]),t._v(" 3.1.5. "),a("code",[t._v("limit")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("20")])])]),t._v(" "),a("p",[t._v("Sets the maximum number of documents to be returned for the search query.")]),t._v(" "),a("p",[t._v("If in addition to either "),a("code",[t._v("page")]),t._v(" and/or "),a("code",[t._v("hitsPerPage")]),t._v(", "),a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are provided as well, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" are ignored. See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("explaination")]),t._v(".")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("limit")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_limit"}},[t._v("invalid_search_limit")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-6-offset"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-6-offset"}},[t._v("#")]),t._v(" 3.1.6. "),a("code",[t._v("offset")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("0")])])]),t._v(" "),a("p",[t._v("Sets the starting point in the search results, effectively skipping over a given number of documents.")]),t._v(" "),a("p",[t._v("If in addition to either "),a("code",[t._v("page")]),t._v(" and/or "),a("code",[t._v("hitsPerPage")]),t._v(", "),a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are provided as well, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" are ignored. See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(".")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("offset")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_offset"}},[t._v("invalid_search_offset")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-7-page"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-7-page"}},[t._v("#")]),t._v(" 3.1.7. "),a("code",[t._v("page")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("null")])])]),t._v(" "),a("p",[t._v("Sets the specific results page to fetch.")]),t._v(" "),a("p",[t._v("By default, page is "),a("code",[t._v("null")]),t._v(", or "),a("code",[t._v("1")]),t._v(" if "),a("code",[t._v("hitsPerPage")]),t._v(" is provided.\nThe first page has a value of "),a("code",[t._v("1")]),t._v(", the second "),a("code",[t._v("2")]),t._v(", etc... When "),a("code",[t._v("0")]),t._v(" is provided as a value, no hits are returned.")]),t._v(" "),a("p",[t._v("When providing "),a("code",[t._v("page")]),t._v(" or "),a("code",[t._v("hitsPerPage")]),t._v(" in the query parameters, the "),a("code",[t._v("page selection")]),t._v(" system is enabled, which makes it possible to navigate through the search results pages. See explanation on the "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[a("code",[t._v("page selection")])]),t._v(".")]),t._v(" "),a("p",[t._v("If in addition to either "),a("code",[t._v("page")]),t._v(" and/or "),a("code",[t._v("hitsPerPage")]),t._v(", "),a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are provided as well, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" are ignored. See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("explanation")]),t._v(".")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("page")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_page"}},[t._v("invalid_search_page")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-8-hitsperpage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-hitsperpage"}},[t._v("#")]),t._v(" 3.1.8. "),a("code",[t._v("hitsPerPage")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("null")])])]),t._v(" "),a("p",[t._v("Sets the number of results returned for a query.")]),t._v(" "),a("p",[t._v("By default, "),a("code",[t._v("hitsPerPage")]),t._v(" is "),a("code",[t._v("null")]),t._v(", or "),a("code",[t._v("20")]),t._v(" if "),a("code",[t._v("page")]),t._v(" is provided. When "),a("code",[t._v("0")]),t._v(" is provided as a value, no hits are returned.")]),t._v(" "),a("p",[t._v("When providing "),a("code",[t._v("page")]),t._v(" or "),a("code",[t._v("hitsPerPage")]),t._v(" in the query parameters, the "),a("code",[t._v("page selection")]),t._v(" system is enabled, which makes it possible to navigate through the search results pages. See explanation on the "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[a("code",[t._v("page selection")])]),t._v(".")]),t._v(" "),a("p",[t._v("If in addition to either "),a("code",[t._v("page")]),t._v(" and/or "),a("code",[t._v("hitsPerPage")]),t._v(", "),a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are provided as well, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" are ignored. See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("explaination")]),t._v(".")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("hitsPerPage")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_hits_per_page"}},[t._v("invalid_search_hits_per_page")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-8-1-navigating-search-results-by-page-selection"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-1-navigating-search-results-by-page-selection"}},[t._v("#")]),t._v(" 3.1.8.1. Navigating search results by page selection")]),t._v(" "),a("p",[t._v("By default, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" are used to navigate search results. While being performant, it lacks exhaustiveness to create a seamless page selection navigation. Upon using "),a("code",[t._v("limit")]),t._v("/"),a("code",[t._v("offset")]),t._v(", "),a("code",[t._v("estimatedTotalHits")]),t._v(" is returned, which provides a rough estimation of how many hits may be candidates for a given request. See "),a("a",{attrs:{href:"#31811-limitoffset-usage"}},[a("code",[t._v("limit")]),t._v("/"),a("code",[t._v("offset")]),t._v(" usage")]),t._v(" for further explanation.")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("page selection")]),t._v(" system provides an alternative that tackles the above-mentioned issue when reliable information is needed to navigate results with a page selector. e.g. A page selector component "),a("code",[t._v("<< < 1, 2, 3, ...14 > >>")]),t._v(". Nonetheless, it's considered less performant on a larger number of results as the engine needs to compute the "),a("code",[t._v("totalHits")]),t._v(" exhaustively.\nWith this page selection system, it is possible to jump from one page to another using the "),a("code",[t._v("page")]),t._v(" parameter and decide how many results should be returned per page with the "),a("code",[t._v("hitsPerPage")]),t._v(" parameter. See "),a("a",{attrs:{href:"#31812-pagehitsperpage-usage"}},[a("code",[t._v("page")]),t._v("/"),a("code",[t._v("hitsPerPage")]),t._v(" usage")]),t._v(" for further explanation.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-8-1-1-limit-offset-usage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-1-1-limit-offset-usage"}},[t._v("#")]),t._v(" 3.1.8.1.1. Limit/offset usage")]),t._v(" "),a("p",[t._v("When either "),a("code",[t._v("limit")]),t._v(" or "),a("code",[t._v("offset")]),t._v(" is specified or when neither "),a("code",[t._v("limit")]),t._v(", "),a("code",[t._v("offset")]),t._v(", "),a("code",[t._v("page")]),t._v(" and "),a("code",[t._v("hitsPerPage")]),t._v(" are specified, the response object contains the related fields:")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"#324-estimatedtotalhits"}},[a("code",[t._v("estimatedTotalHits")])])]),t._v(" "),a("li",[a("a",{attrs:{href:"#322-limit"}},[a("code",[t._v("limit")])])]),t._v(" "),a("li",[a("a",{attrs:{href:"#323-offset"}},[a("code",[t._v("offset")])])])]),t._v(" "),a("p",[t._v("If in addition to "),a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(", either "),a("code",[t._v("page")]),t._v(" or "),a("code",[t._v("hitsPerPage")]),t._v(" is also provided, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" parameters are ignored.")]),t._v(" "),a("p",[t._v("For example, given the following query parameters:")]),t._v(" "),a("ul",[a("li",[t._v("limit: 10")]),t._v(" "),a("li",[t._v("offset: 1")])]),t._v(" "),a("p",[t._v("The response objects contain these specific fields:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... 10 hits")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... other fields")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"limit"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"offset"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"estimatedTotalHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1345")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("For example, on a query with no query parameters:")]),t._v(" "),a("p",[t._v("The response objects contain these specific fields:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... 10 hits")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... other fields")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"limit"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"offset"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"estimatedTotalHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1345")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h5",{attrs:{id:"_3-1-8-1-2-page-hitsperpage-usage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-1-2-page-hitsperpage-usage"}},[t._v("#")]),t._v(" 3.1.8.1.2 page/hitsPerPage usage")]),t._v(" "),a("p",[t._v("As soon as either "),a("code",[t._v("page")]),t._v(" or "),a("code",[t._v("hitsPerPage")]),t._v(" is used as a query parameter, in the response object, "),a("code",[t._v("limit")]),t._v(", "),a("code",[t._v("offset")]),t._v(", and "),a("code",[t._v("estimatedTotalHits")]),t._v(" are removed and page selection related fields are returned:")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"#326-hitsperpage"}},[a("code",[t._v("hitsPerPage")])]),t._v(": number of results per page.")]),t._v(" "),a("li",[a("a",{attrs:{href:"#325-page"}},[a("code",[t._v("page")])]),t._v(": current search results page. The counting starts at "),a("code",[t._v("1")]),t._v(".")]),t._v(" "),a("li",[a("a",{attrs:{href:"#327-totalpages"}},[a("code",[t._v("totalPages")])]),t._v(": total number of results pages. Calculated using "),a("code",[t._v("hitsPerPage")]),t._v(" value.")]),t._v(" "),a("li",[a("a",{attrs:{href:"#328-totalhits"}},[a("code",[t._v("totalHits")])]),t._v(": total number of search results.")])]),t._v(" "),a("p",[t._v("Both "),a("code",[t._v("totalPages")]),t._v(" and "),a("code",[t._v("totalHits")]),t._v(" are computed until they reach the "),a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#https://github.com/meilisearch/specifications/blob/main/text/157-pagination-setting-api.md#311-maxtotalhits"}},[a("code",[t._v("pagination.maxTotalHits")])]),t._v(" number from the settings.")],1),t._v(" "),a("p",[t._v("If in addition to either "),a("code",[t._v("page")]),t._v(" and/or "),a("code",[t._v("hitsPerPage")]),t._v(", "),a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are provided as well, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" are ignored.")]),t._v(" "),a("p",[t._v("For example, given the following query parameters:")]),t._v(" "),a("ul",[a("li",[t._v("page: 2")]),t._v(" "),a("li",[t._v("hitsPerPage: 10")])]),t._v(" "),a("p",[t._v("The response objects contain these specific fields:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... 10 hits")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... other fields")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"page"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hitsPerPage"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2100")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalPages"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("210")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("For example, given the following query parameters:")]),t._v(" "),a("ul",[a("li",[t._v("page: 2")]),t._v(" "),a("li",[t._v("hitsPerPage: 10")]),t._v(" "),a("li",[t._v("limit: 1")])]),t._v(" "),a("p",[t._v("The response objects contain these specific fields:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... 10 hits")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... other fields")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"page"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hitsPerPage"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2100")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalPages"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("210")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("For example, given the following query parameters:")]),t._v(" "),a("ul",[a("li",[t._v("page: 0")]),t._v(" "),a("li",[t._v("hitsPerPage: 10")])]),t._v(" "),a("p",[t._v("The response objects contain these specific fields:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... other fields")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"page"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hitsPerPage"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2100")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalPages"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("210")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"_3-1-9-attributestoretrieve"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-9-attributestoretrieve"}},[t._v("#")]),t._v(" 3.1.9. "),a("code",[t._v("attributesToRetrieve")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of String (POST) | String (GET)")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v('["*"]')]),t._v(", meaning all the attributes")])]),t._v(" "),a("p",[t._v("Configures which attributes will be retrieved in the returned documents.")]),t._v(" "),a("p",[t._v("If no value is specified, the default value of "),a("code",[t._v("attributesToRetrieve")]),t._v(" is used ("),a("code",[t._v('["*"]')]),t._v("). This corresponds to the "),a("code",[t._v("displayedAttributes")]),t._v(" index setting, which by default contains all attributes found in the documents.")]),t._v(" "),a("blockquote",[a("p",[t._v("If an attribute is missing from "),a("code",[t._v("displayedAttributes")]),t._v(" index setting, "),a("code",[t._v("attributesToRetrieve")]),t._v(" silently ignore it, and the field doesn't appear in the returned search results.")])]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array of String")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("attributesToRetrieve")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_attributes_to_retrieve"}},[t._v("invalid_search_attributes_to_retrieve")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-10-attributestohighlight"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-10-attributestohighlight"}},[t._v("#")]),t._v(" 3.1.10. "),a("code",[t._v("attributesToHighlight")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of String (POST) | String(GET)")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("[]|null")])])]),t._v(" "),a("p",[t._v("Configures which fields may have highlighted parts, given that they match the requested query terms (i.e. the terms in the "),a("a",{attrs:{href:"#311-q"}},[a("code",[t._v("q")])]),t._v(" search parameter). Pre/post highlighting tags are applied around each word corresponding to a query term.")]),t._v(" "),a("p",[t._v("If "),a("code",[t._v("attributesToHighlight")]),t._v(" is present in the search query, the search results will include a "),a("code",[t._v("_formatted")]),t._v(" object containing the attributes and their highlighted parts. For more detailed regarding the "),a("code",[t._v("_formatted")]),t._v(" behavior, see the "),a("a",{attrs:{href:"#32112-formatted"}},[t._v("3.2.1.1.2. "),a("code",[t._v("_formatted")])]),t._v(" section.")]),t._v(" "),a("p",[t._v("If "),a("code",[t._v('"*"')]),t._v(" is provided as a value ("),a("code",[t._v('attributesToHighlight=["*"]')]),t._v("), all the attributes present in "),a("code",[t._v("displayedAttributes")]),t._v(" setting will be highlighted.")]),t._v(" "),a("p",[t._v("Highlighted parts are surrounded by the "),a("a",{attrs:{href:"3111-highlightpretag"}},[a("code",[t._v("highlightPreTag")])]),t._v(" and "),a("a",{attrs:{href:"#3112-highlightposttag"}},[a("code",[t._v("highlightPostTag")])]),t._v(" parameters.")]),t._v(" "),a("p",[a("code",[t._v("attributesToHighlight")]),t._v(" only works on values of the following types: "),a("code",[t._v("string")]),t._v(", "),a("code",[t._v("number")]),t._v(", "),a("code",[t._v("array")]),t._v(", "),a("code",[t._v("object")]),t._v(". When highlighted, number attributes are transformed to string.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array[String]")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("attributesToHighlight")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_attributes_to_highlight"}},[t._v("invalid_search_attributes_to_highlight")]),t._v(" error.")],1)]),t._v(" "),a("h5",{attrs:{id:"_3-1-10-1-searchableattributes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-10-1-searchableattributes"}},[t._v("#")]),t._v(" 3.1.10.1. searchableAttributes")]),t._v(" "),a("p",[t._v("Attributes not defined in the "),a("code",[t._v("searchableAttributes")]),t._v(" index setting are also highlighted if assigned to "),a("code",[t._v("attributesToHighlight")]),t._v(".")]),t._v(" "),a("h5",{attrs:{id:"_3-1-10-2-stopwords"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-10-2-stopwords"}},[t._v("#")]),t._v(" 3.1.10.2. stopWords")]),t._v(" "),a("p",[t._v("Attributes defined in the "),a("code",[t._v("stopWords")]),t._v(" index setting are also highlighted if matched.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-10-3-tokenizer-separators"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-10-3-tokenizer-separators"}},[t._v("#")]),t._v(" 3.1.10.3. Tokenizer Separators")]),t._v(" "),a("p",[t._v("Tokenizer separators are not highlighted.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-10-4-synonyms"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-10-4-synonyms"}},[t._v("#")]),t._v(" 3.1.10.4. synonyms")]),t._v(" "),a("p",[t._v("Synonyms are also highlighted.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-11-highlightpretag"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-11-highlightpretag"}},[t._v("#")]),t._v(" 3.1.11. "),a("code",[t._v("highlightPreTag")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v('""')])])]),t._v(" "),a("p",[t._v("Specifies the string to put "),a("strong",[t._v("before")]),t._v(" every highlighted query terms.")]),t._v(" "),a("p",[t._v("This parameter is applied to the fields configured in "),a("code",[t._v("attributesToHighlight")]),t._v(". If there are none, this parameter has no effect. See "),a("a",{attrs:{href:"3110-attributestohighlight"}},[t._v("3.1.10. "),a("code",[t._v("attributesToHighlight")])]),t._v(" section.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("String")]),t._v(" for "),a("code",[t._v("highlightPreTag")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_highlight_pre_tag"}},[t._v("invalid_search_highlight_pre_tag")]),t._v(" error.")],1)]),t._v(" "),a("p",[t._v("If "),a("code",[t._v("attributesToHighlight")]),t._v(" is omitted while "),a("code",[t._v("highlightPreTag")]),t._v(" is specified, there is no error.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-12-highlightposttag"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-12-highlightposttag"}},[t._v("#")]),t._v(" 3.1.12. "),a("code",[t._v("highlightPostTag")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v('""')])])]),t._v(" "),a("p",[t._v("Specifies the string to put "),a("strong",[t._v("after")]),t._v(" the highlighted query terms.")]),t._v(" "),a("p",[t._v("This parameter is applied to the fields from "),a("code",[t._v("attributesToHighlight")]),t._v(". If there are none, this parameter has no effect. See "),a("a",{attrs:{href:"3110-attributestohighlight"}},[t._v("3.1.10. "),a("code",[t._v("attributesToHighlight")])]),t._v(" section.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("String")]),t._v(" for "),a("code",[t._v("highlightPostTag")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_highlight_post_tag"}},[t._v("invalid_search_highlight_post_tag")]),t._v(" error.")],1)]),t._v(" "),a("p",[t._v("If "),a("code",[t._v("attributesToHighlight")]),t._v(" is omitted while "),a("code",[t._v("highlightPostTag")]),t._v(" is specified, there is no error.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-13-attributestocrop"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-13-attributestocrop"}},[t._v("#")]),t._v(" 3.1.13. "),a("code",[t._v("attributesToCrop")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array[String]|String")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("[]|null")])])]),t._v(" "),a("p",[t._v("Defines document attributes to be cropped. Cropped attributes have their values shortened around query terms.")]),t._v(" "),a("p",[t._v("If "),a("code",[t._v("attributesToCrop")]),t._v(" is present in the search query, the search results will include a "),a("code",[t._v("_formatted")]),t._v(" object containing the attributes and their cropped parts. For more detailed regarding the "),a("code",[t._v("_formatted")]),t._v(" behavior, see the "),a("a",{attrs:{href:"#32112-formatted"}},[t._v("3.2.1.1.2. "),a("code",[t._v("_formatted")])]),t._v(" section.")]),t._v(" "),a("p",[t._v("If "),a("code",[t._v('"*"')]),t._v(" is provided as a value ("),a("code",[t._v('attributesToCrop=["*"]')]),t._v("), all the attributes present in "),a("code",[t._v("displayedAttributes")]),t._v(" setting will be cropped.")]),t._v(" "),a("p",[t._v("The number of words contained in the cropped value is defined by the "),a("code",[t._v("cropLength")]),t._v(" parameter. See "),a("a",{attrs:{href:"#3114-croplength"}},[t._v("3.1.1.14. "),a("code",[t._v("cropLength")])]),t._v(" section.")]),t._v(" "),a("p",[t._v("The value of "),a("code",[t._v("cropLength")]),t._v(" can be customized per attribute. See "),a("a",{attrs:{href:"#31121-custom-croplength-defined-per-attribute"}},[t._v("3.1.12.1. Custom "),a("code",[t._v("cropLength")]),t._v(" Defined Per Cropped Attribute")]),t._v(" section.")]),t._v(" "),a("p",[t._v("The engine adds a marker by default in front of and/or behind the part selected by the cropper. This marker is customizable. See "),a("a",{attrs:{href:"#3115-cropmarker"}},[t._v("3.1.13. "),a("code",[t._v("cropMarker")])]),t._v(" section.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array[String]")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("attributesToCrop")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_attributes_to_crop"}},[t._v("invalid_search_attributes_to_crop")]),t._v(" error.")],1)]),t._v(" "),a("h5",{attrs:{id:"_3-1-13-2-searchableattributes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-13-2-searchableattributes"}},[t._v("#")]),t._v(" 3.1.13.2. searchableAttributes")]),t._v(" "),a("p",[t._v("Attributes configured in "),a("code",[t._v("attributesToCrop")]),t._v(" are cropped even if not present in the "),a("code",[t._v("searchableAttributes")]),t._v(" index setting.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-13-3-stopwords"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-13-3-stopwords"}},[t._v("#")]),t._v(" 3.1.13.3. stopWords")]),t._v(" "),a("p",[t._v("Terms defined in the "),a("code",[t._v("stopWords")]),t._v(" index setting are counted as words regarding "),a("code",[t._v("cropLength")]),t._v(".")]),t._v(" "),a("h5",{attrs:{id:"_3-1-13-3-tokenizer-separators"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-13-3-tokenizer-separators"}},[t._v("#")]),t._v(" 3.1.13.3. Tokenizer Separators")]),t._v(" "),a("p",[t._v("Tokenizer separators aren't counted as words regarding "),a("code",[t._v("cropLength")]),t._v(".")]),t._v(" "),a("h4",{attrs:{id:"_3-1-14-croplength"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-14-croplength"}},[t._v("#")]),t._v(" 3.1.14. "),a("code",[t._v("cropLength")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("10")])])]),t._v(" "),a("p",[t._v("Sets the total number of "),a("strong",[t._v("words")]),t._v(" to keep for the cropped part of an attribute specified in the "),a("code",[t._v("attributesToCrop")]),t._v(" parameter. It means that if "),a("code",[t._v("10")]),t._v(" is set for "),a("code",[t._v("cropLength")]),t._v(", the cropped part returned in "),a("code",[t._v("_formatted")]),t._v(" will only be 10 words long.")]),t._v(" "),a("p",[t._v("This parameter is applied to the fields from "),a("code",[t._v("attributesToCrop")]),t._v(". If there are none, this parameter has no effect. See "),a("a",{attrs:{href:"#3113-attributestocrop"}},[t._v("3.1.13. "),a("code",[t._v("attributesToCrop")])]),t._v(" section.")]),t._v(" "),a("p",[t._v("Sending a "),a("code",[t._v("0")]),t._v(" value deactivates the cropping unless a custom crop length is defined for an attribute inside "),a("code",[t._v("attributesToCrop")]),t._v(".")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("cropLength")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_crop_length"}},[t._v("invalid_search_crop_length")]),t._v(" error.")],1)]),t._v(" "),a("h5",{attrs:{id:"_3-1-14-1-custom-croplength-defined-per-attribute"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-14-1-custom-croplength-defined-per-attribute"}},[t._v("#")]),t._v(" 3.1.14.1. Custom "),a("code",[t._v("cropLength")]),t._v(" Defined Per Attribute.")]),t._v(" "),a("p",[t._v("Optionally, indicating a custom crop length for any of the listed attributes is possible:")]),t._v(" "),a("p",[a("code",[t._v('"attributesToCrop":["attributeNameA:15", "attributeNameB:30"]')])]),t._v(" "),a("p",[t._v("A custom crop length set in this way has priority over the "),a("code",[t._v("cropLength")]),t._v(" parameter.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-14-2-examples"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-14-2-examples"}},[t._v("#")]),t._v(" 3.1.14.2 Examples")]),t._v(" "),a("h6",{attrs:{id:"_3-1-14-1-1-extending-around"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-14-1-1-extending-around"}},[t._v("#")]),t._v(" 3.1.14.1.1. Extending around")]),t._v(" "),a("p",[t._v("Given an attribute defined in "),a("code",[t._v("attributesToCrop")]),t._v(" containing:")]),t._v(" "),a("p",[a("code",[t._v('"In his ravenous hatred he found no peace, and with boiling blood he scoured the umbral plains, seeking vengence afgainst the dark lords who had robbed him."')])]),t._v(" "),a("p",[t._v("With "),a("code",[t._v("croplength")]),t._v(" defined as "),a("code",[t._v("5")]),t._v(" and "),a("code",[t._v("q")]),t._v(" defined as "),a("code",[t._v("boiling blood")]),t._v(", the cropped value will be:")]),t._v(" "),a("p",[a("code",[t._v('"…and with boiling blood he…"')])]),t._v(" "),a("p",[t._v("Cropped query terms are counted as a word regarding "),a("code",[t._v("cropLength")]),t._v(".")]),t._v(" "),a("p",[t._v("Sending more query terms than the "),a("code",[t._v("cropLength")]),t._v(" value has no impact. The cropped part will contain the "),a("code",[t._v("cropLength")]),t._v(" number.")]),t._v(" "),a("h6",{attrs:{id:"_3-1-14-1-2-keeping-a-phrase-context"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-14-1-2-keeping-a-phrase-context"}},[t._v("#")]),t._v(" 3.1.14.1.2. Keeping a phrase context")]),t._v(" "),a("p",[t._v("After Meilisearch has chosen the best possible match window (some number of words < "),a("code",[t._v("cropLength")]),t._v("), it will add words from before or after the match window until the total number is equal to "),a("code",[t._v("cropLength")]),t._v(". In doing so, it will attempt to add context to the match window by choosing words from the same sentence(s) where the match window occurs.")]),t._v(" "),a("p",[t._v("For instance, for the matching word "),a("code",[t._v("Split")]),t._v(" the text:")]),t._v(" "),a("p",[a("code",[t._v('"Natalie risk her future. Split The World is a book written by Emily Henry. I never read it."')])]),t._v(" "),a("p",[t._v("will be cropped like:")]),t._v(" "),a("p",[a("code",[t._v("…Split The World is a book written by Emily Henry…")])]),t._v(" "),a("p",[t._v("and not like:")]),t._v(" "),a("p",[a("code",[t._v("Natalie risk her future. Split The World is a book…")])]),t._v(" "),a("h4",{attrs:{id:"_3-1-15-cropmarker"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-15-cropmarker"}},[t._v("#")]),t._v(" 3.1.15. "),a("code",[t._v("cropMarker")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v('"…"')]),t._v(" (U+2026)")])]),t._v(" "),a("p",[t._v("Sets which string to add before and/or after the cropped text. See "),a("a",{attrs:{href:"#3113-attributestocrop"}},[t._v("3.1.13. "),a("code",[t._v("attributesToCrop")])]),t._v(" section.")]),t._v(" "),a("p",[t._v("The specified crop marker is applied by following rules outline in section "),a("a",{attrs:{href:"#3115-cropmarker"}},[t._v("3.1.15.1. Applying "),a("code",[t._v("cropMarker")])]),t._v(".")]),t._v(" "),a("p",[t._v("Specifying "),a("code",[t._v("cropMarker")]),t._v(" to "),a("code",[t._v('""')]),t._v(" or "),a("code",[t._v("null")]),t._v(" implies that no marker will be applied to the cropped part.")]),t._v(" "),a("p",[t._v("This parameter is applied to the fields configured in "),a("code",[t._v("attributesToCrop")]),t._v(". If there are none, this parameter has no effect. See "),a("a",{attrs:{href:"#3113-attributestocrop"}},[t._v("3.1.13. "),a("code",[t._v("attributesToCrop")])]),t._v(" section.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("String")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("cropMarker")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_crop_marker"}},[t._v("invalid_search_crop_marker")]),t._v(" error.")],1)]),t._v(" "),a("h5",{attrs:{id:"_3-1-15-1-applying-cropmarker"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-15-1-applying-cropmarker"}},[t._v("#")]),t._v(" 3.1.15.1. Applying "),a("code",[t._v("cropMarker")])]),t._v(" "),a("h6",{attrs:{id:"_3-1-15-1-1-matched-part-to-be-cropped"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-15-1-1-matched-part-to-be-cropped"}},[t._v("#")]),t._v(" 3.1.15.1.1. Matched Part To Be Cropped")]),t._v(" "),a("p",[t._v("The cropping algorithm tries to match the window with the highest density of query terms within the "),a("code",[t._v("cropLength")]),t._v(" limit.")]),t._v(" "),a("p",[t._v("The cropping algorithm tries to find the crop window that contains the most relevant matches.")]),t._v(" "),a("ol",[a("li",[t._v("That has the highest count of unique matches")])]),t._v(" "),a("p",[t._v("For example, for the query terms "),a("code",[t._v("split the world")]),t._v(", then the interval "),a("code",[t._v("the split the split the")]),t._v(" has "),a("code",[t._v("5")]),t._v(" matches but only "),a("code",[t._v("2")]),t._v(" unique matches ("),a("code",[t._v("1")]),t._v(" for "),a("code",[t._v("split")]),t._v(" and "),a("code",[t._v("1")]),t._v(" for "),a("code",[t._v("the")]),t._v(") where the interval "),a("code",[t._v("split of the world")]),t._v(" has "),a("code",[t._v("3")]),t._v(" matches and "),a("code",[t._v("3")]),t._v(" unique matches. So the interval "),a("code",[t._v("split of the world")]),t._v(" is considered better.")]),t._v(" "),a("ol",{attrs:{start:"2"}},[a("li",[t._v("That have the minimum distance between matches")])]),t._v(" "),a("p",[t._v("For example, for the query terms "),a("code",[t._v("split the world")]),t._v(", then the interval "),a("code",[t._v("split of the world")]),t._v(" has a distance of "),a("code",[t._v("3")]),t._v(" ("),a("code",[t._v("2")]),t._v(" between "),a("code",[t._v("split")]),t._v(" and "),a("code",[t._v("the")]),t._v(", and "),a("code",[t._v("1")]),t._v(" between "),a("code",[t._v("the")]),t._v(" and "),a("code",[t._v("world")]),t._v(") where the interval "),a("code",[t._v("split the world")]),t._v(" has a distance of "),a("code",[t._v("2")]),t._v(". So the interval "),a("code",[t._v("split the world")]),t._v(" is considered better.")]),t._v(" "),a("ol",{attrs:{start:"3"}},[a("li",[t._v("That have the highest count of ordered matches")])]),t._v(" "),a("p",[t._v("For example, for the query terms "),a("code",[t._v("split the world")]),t._v(", then the interval "),a("code",[t._v("the world split")]),t._v(" has "),a("code",[t._v("2")]),t._v(" ordered words where the interval "),a("code",[t._v("split the world")]),t._v(" has "),a("code",[t._v("3")]),t._v(". So the interval "),a("code",[t._v("split the world")]),t._v(" is considered better.")]),t._v(" "),a("p",[t._v("Only one cropped part from an attribute is returned.")]),t._v(" "),a("p",[t._v("If no part is found when selecting a part to be cropped, the returned value in "),a("code",[t._v("_formatted")]),t._v(" will start at the beginning of the attribute and include a number of words equal to "),a("code",[t._v("cropLength")]),t._v(".")]),t._v(" "),a("h6",{attrs:{id:"_3-1-15-1-2-positioning-markers"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-15-1-2-positioning-markers"}},[t._v("#")]),t._v(" 3.1.15.1.2. Positioning Markers")]),t._v(" "),a("p",[t._v("If the cropped part has been matched against query terms and contains the beginning of the attribute to be cropped, the "),a("code",[t._v("cropMarker")]),t._v(" is not placed to the left of the cropped part.")]),t._v(" "),a("p",[t._v("If the cropped part has been matched against query terms and contains the end of the attribute to be cropped, the "),a("code",[t._v("cropMarker")]),t._v(" is not placed to the right of the cropped part.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-16-showmatchesposition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-16-showmatchesposition"}},[t._v("#")]),t._v(" 3.1.16. "),a("code",[t._v("showMatchesPosition")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Boolean")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("false")])])]),t._v(" "),a("p",[t._v("Adds a "),a("code",[t._v("_matchesPosition")]),t._v(" object to the search response that contains the location of each occurrence of queried terms across all fields. The given positions are in bytes.")]),t._v(" "),a("p",[t._v("It's useful when more control is needed than offered by the built-in highlighting/cropping features.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Boolean")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("showMatchesPosition")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_show_matches_position"}},[t._v("invalid_search_show_matches_position")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-17-showrankingscore"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-17-showrankingscore"}},[t._v("#")]),t._v(" 3.1.17. "),a("code",[t._v("showRankingScore")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Boolean")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("false")])])]),t._v(" "),a("p",[t._v("Adds a "),a("a",{attrs:{href:"#32114-rankingscore"}},[a("code",[t._v("_rankingScore")])]),t._v(" number to each document in the search response, representing the relevancy score of a document according to the applied ranking rules and relative to a search query. Higher is better.")]),t._v(" "),a("p",[a("code",[t._v("1.0")]),t._v(" indicates a perfect match, "),a("code",[t._v("0.0")]),t._v(" no match at all (Meilisearch should not return documents that don't match the query).")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Boolean")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("showRankingScore")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_show_ranking_score"}},[t._v("invalid_search_ranking_score")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-18-showrankingscoredetails"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-18-showrankingscoredetails"}},[t._v("#")]),t._v(" 3.1.18. "),a("code",[t._v("showRankingScoreDetails")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Object")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("false")])])]),t._v(" "),a("p",[t._v("Adds a "),a("a",{attrs:{href:"#32115-rankingscoredetails"}},[a("code",[t._v("_rankingScoreDetails")])]),t._v(" object to each document in the search response, containing information about the score of that document for each applied ranking rule.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Boolean")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("showRankingScoreDetails")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_show_ranking_score_details"}},[t._v("invalid_search_ranking_score_details")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-19-matchingstrategy"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-19-matchingstrategy"}},[t._v("#")]),t._v(" 3.1.19. "),a("code",[t._v("matchingStrategy")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("last")])])]),t._v(" "),a("p",[t._v("Defines which strategy to use to match the query terms within the documents as search results.")]),t._v(" "),a("p",[t._v("Two different strategies are available, "),a("code",[t._v("last")]),t._v(" and "),a("code",[t._v("all")]),t._v(". By default, the "),a("code",[t._v("last")]),t._v(" strategy is chosen.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("String")]),t._v(" and other than "),a("code",[t._v("last")]),t._v(" or "),a("code",[t._v("all")]),t._v(" as a value for "),a("code",[t._v("matchingStrategy")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_matching_strategy"}},[t._v("invalid_search_matching_strategy")]),t._v(" error.")],1)]),t._v(" "),a("h5",{attrs:{id:"_3-1-19-1-last-strategy"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-19-1-last-strategy"}},[t._v("#")]),t._v(" 3.1.19.1. "),a("code",[t._v("last")]),t._v(" strategy")]),t._v(" "),a("p",[t._v("The documents containing ALL the query words (i.e. in the "),a("code",[t._v("q")]),t._v(" parameter) are returned first by Meilisearch. If Meilisearch doesn't have enough documents to fit the requested "),a("code",[t._v("limit")]),t._v(", it iteratively ignores the query words from the last typed word to the first typed word to match more documents.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-19-2-all-strategy"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-19-2-all-strategy"}},[t._v("#")]),t._v(" 3.1.19.2. "),a("code",[t._v("all")]),t._v(" strategy")]),t._v(" "),a("p",[t._v("Only the documents containing ALL the query words (i.e. in the "),a("code",[t._v("q")]),t._v(" parameter) are returned by Meilisearch. If Meilisearch doesn't have enough documents to fit the requested "),a("code",[t._v("limit")]),t._v(", it returns the documents found without trying to match more documents.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-20-attributestosearchon"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-20-attributestosearchon"}},[t._v("#")]),t._v(" 3.1.20. "),a("code",[t._v("attributesToSearchOn")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of String (POST) | String (GET)")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v('["*"]')])])]),t._v(" "),a("p",[t._v("Defines which "),a("code",[t._v("searchableAttributes")]),t._v(" the query will search on.")]),t._v(" "),a("ul",[a("li",[t._v("If "),a("code",[t._v("attributesToSearchOn")]),t._v(" is not set, set to "),a("code",[t._v('["*"]')]),t._v(" or set to "),a("code",[t._v("null")]),t._v(", then the query will search on all "),a("code",[t._v("searchableAttributes")]),t._v(".")]),t._v(" "),a("li",[t._v("Sending the attributes in a different order than the order set in the settings "),a("code",[t._v("searchableAttributes")]),t._v(" doesn't reorder the fields' rank for the "),a("code",[t._v("Attributes")]),t._v(" ranking rule")]),t._v(" "),a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array of String")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("attributesToSearchOn")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_attributes_to_search_on"}},[t._v("invalid_attributes_to_search_on")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending an attribute that is not part of the settings "),a("code",[t._v("searchableAttributes")]),t._v(" list returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_attributes_to_search_on"}},[t._v("invalid_attributes_to_search_on")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-21-vector-experimental"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-21-vector-experimental"}},[t._v("#")]),t._v(" 3.1.21. "),a("code",[t._v("vector")]),t._v(" "),a("code",[t._v("EXPERIMENTAL")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of Float")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: []")])]),t._v(" "),a("p",[t._v("Request the nearest documents based on the query vector embedding given.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array of Float")]),t._v(" or "),a("code",[t._v("null")]),t._v(" as a value for "),a("code",[t._v("vector")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_vector"}},[t._v("invalid_search_vector")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending a value for "),a("code",[t._v("vector")]),t._v(" whose length differs from the documents "),a("code",[t._v("_vectors")]),t._v(" length returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_vector"}},[t._v("invalid_search_vector")]),t._v(" error.")],1)]),t._v(" "),a("h3",{attrs:{id:"_3-2-search-response-properties"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-search-response-properties"}},[t._v("#")]),t._v(" 3.2. Search Response Properties")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Field")]),t._v(" "),a("th",[t._v("Type")]),t._v(" "),a("th",[t._v("Required")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[a("a",{attrs:{href:"#321-hits"}},[a("code",[t._v("hits")])])]),t._v(" "),a("td",[t._v("Array[Hit]")]),t._v(" "),a("td",[t._v("True")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#322-limit"}},[a("code",[t._v("limit")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#323-offset"}},[a("code",[t._v("offset")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#324-estimatedTotalHits"}},[a("code",[t._v("estimatedTotalHits")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#325-page"}},[a("code",[t._v("page")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#326-hitsperpage"}},[a("code",[t._v("hitsPerPage")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#327-totalpages"}},[a("code",[t._v("totalPages")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#328-totalhits"}},[a("code",[t._v("totalHits")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#329-facetdistribution"}},[a("code",[t._v("facetDistribution")])])]),t._v(" "),a("td",[t._v("Object")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3210-facetstats"}},[a("code",[t._v("facetStats")])])]),t._v(" "),a("td",[t._v("Object")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3211-processingtimems"}},[a("code",[t._v("processingTimeMs")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("True")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3212-query"}},[a("code",[t._v("query")])])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("True")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3213-vector"}},[a("code",[t._v("vector")])]),t._v(" "),a("code",[t._v("EXPERIMENTAL")])]),t._v(" "),a("td",[t._v("Array of Float")]),t._v(" "),a("td",[t._v("False")])])])]),t._v(" "),a("h4",{attrs:{id:"_3-2-1-hits"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-hits"}},[t._v("#")]),t._v(" 3.2.1. "),a("code",[t._v("hits")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array[Hit]")]),t._v(" "),a("li",[t._v("Required: True")])]),t._v(" "),a("p",[t._v("Results of the search query as an array of documents.")]),t._v(" "),a("blockquote",[a("p",[t._v("Hit object represents a matched document as a search result.")])]),t._v(" "),a("blockquote",[a("p",[t._v("The search parameters "),a("code",[t._v("attributesToRetrieve")]),t._v(" influence the returned payload for a hit. See "),a("a",{attrs:{href:"#319-attributestoretrieve"}},[t._v("3.1.7. "),a("code",[t._v("attributesToRetrieve")])]),t._v(" section.")])]),t._v(" "),a("p",[t._v("A search result can contain special properties. See "),a("a",{attrs:{href:"#3211-hit-special-properties"}},[t._v("3.2.1.1. "),a("code",[t._v("hit")]),t._v(" Special Properties")]),t._v(" section.")]),t._v(" "),a("h5",{attrs:{id:"_3-2-1-1-hit-special-properties"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-hit-special-properties"}},[t._v("#")]),t._v(" 3.2.1.1. "),a("code",[t._v("hit")]),t._v(" Special Properties")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Field")]),t._v(" "),a("th",[t._v("Type")]),t._v(" "),a("th",[t._v("Required")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[a("a",{attrs:{href:"#32111-geodistance"}},[a("code",[t._v("_geoDistance")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#32112-formatted"}},[a("code",[t._v("_formatted")])])]),t._v(" "),a("td",[t._v("Object")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#32113-matchesposition"}},[a("code",[t._v("_matchesPosition")])])]),t._v(" "),a("td",[t._v("Object")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#32114-rankingscore"}},[a("code",[t._v("_rankingScore")])])]),t._v(" "),a("td",[t._v("Number")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#32115-rankingscoredetails"}},[a("code",[t._v("_rankingScoreDetails")])])]),t._v(" "),a("td",[t._v("Object")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#32116-semanticscore"}},[a("code",[t._v("_semanticScore")])]),t._v(" "),a("code",[t._v("EXPERIMENTAL")])]),t._v(" "),a("td",[t._v("Float")]),t._v(" "),a("td",[t._v("False")])])])]),t._v(" "),a("h6",{attrs:{id:"_3-2-1-1-1-geodistance"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-1-geodistance"}},[t._v("#")]),t._v(" 3.2.1.1.1. "),a("code",[t._v("_geoDistance")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Search queries using "),a("code",[t._v("_geoPoint")]),t._v(" returns a "),a("code",[t._v("_geoDistance")]),t._v(" field containing the distance in meters between the document "),a("code",[t._v("_geo")]),t._v(" coordinates and the specified "),a("code",[t._v("_geoPoint")]),t._v(".")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0059-geo-search.html"}},[t._v("GeoSearch")])],1)]),t._v(" "),a("h6",{attrs:{id:"_3-2-1-1-2-formatted"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-2-formatted"}},[t._v("#")]),t._v(" 3.2.1.1.2. "),a("code",[t._v("_formatted")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Object")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[a("code",[t._v("_formatted")]),t._v(" is an object returned in the search response, only if at least one of the following paramaters has been set in the search query:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("attributesToHighlight")])]),t._v(" "),a("li",[a("code",[t._v("attributesToCrop")])])]),t._v(" "),a("p",[t._v("If "),a("code",[t._v("attributesToHighlight")]),t._v(" and "),a("code",[t._v("attributesToCrop")]),t._v(" are not set, "),a("code",[t._v("_formatted")]),t._v(" is not returned.")]),t._v(" "),a("p",[t._v("This "),a("code",[t._v("_formatted")]),t._v(" object will be present in each returned document in the "),a("code",[t._v("hits")]),t._v(" field.")]),t._v(" "),a("p",[t._v("Example:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToCrop"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Pride and Prejudice"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"_formatted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Pride and Prejudice"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("456")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Le Petit Prince"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"_formatted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"456"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Le Petit Prince"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Which attributes are present in "),a("code",[t._v("_formatted")]),t._v("?")]),t._v(" "),a("p",[a("em",[t._v("Remember the main rule: "),a("code",[t._v("_formatted")]),t._v(" is only present if "),a("code",[t._v("attributesToHighlight")]),t._v(" or "),a("code",[t._v("attributesToCrop")]),t._v(" is set.")])]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("_formatted")]),t._v(" object contains attributes coming from the original document, depending on the parameters the users set during the search query. Indeed, "),a("strong",[a("code",[t._v("_formatted")]),t._v(" contains all the attributes present in "),a("code",[t._v("attributesToRetrieve")]),t._v(", "),a("code",[t._v("attributesToHighlight")]),t._v(", and "),a("code",[t._v("attributesToCrop")]),t._v(" combined")]),t._v(".")]),t._v(" "),a("p",[t._v("Knowing the default value of "),a("code",[t._v("attributesToRetrieve")]),t._v(" is "),a("code",[t._v('["*"]')]),t._v(" (so all the attributes present in "),a("code",[t._v("displayedAttributes")]),t._v("), if no "),a("code",[t._v("attributesToRetrieve")]),t._v(" are set in the search query, "),a("code",[t._v("_formatted")]),t._v(" will return all the "),a("code",[t._v("displayedAttributes")]),t._v(".")]),t._v(" "),a("p",[t._v("Returning attributes in the "),a("code",[t._v("_formatted")]),t._v(" object does not mean these attributes will be necessarily highlighted or cropped, see the next point.")]),t._v(" "),a("p",[t._v("Which attributes are highlighted or cropped in "),a("code",[t._v("_formatted")]),t._v("?")]),t._v(" "),a("p",[t._v("No matter which attributes are retrieved in "),a("code",[t._v("_formatted")]),t._v(' (according to the previous section "Which attributes are present in '),a("code",[t._v("_formatted")]),t._v('?"):')]),t._v(" "),a("ul",[a("li",[t._v("Only the attributes present in "),a("code",[t._v("attributesToHighlight")]),t._v(" are highlighted.")]),t._v(" "),a("li",[t._v("Only the attributes present in "),a("code",[t._v("attributesToCrop")]),t._v(" are cropped.")]),t._v(" "),a("li",[t._v("Attributes present in both are cropped and highlighted at the same time.")])]),t._v(" "),a("p",[t._v("Some edge cases:")]),t._v(" "),a("ul",[a("li",[t._v("If cumulated fields in "),a("code",[t._v("attributesToHighlight")]),t._v(" and "),a("code",[t._v("attributesToCrop")]),t._v(" resolve to only having non-existent fields, "),a("code",[t._v("_formatted")]),t._v(" is not returned.")])]),t._v(" "),a("p",[t._v("Some examples:\n"),a("em",[t._v("The examples work the same with "),a("code",[t._v("attributesToCrop")])])]),t._v(" "),a("p",[t._v("Example 1:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToHighlight"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Hobbit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"_formatted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Hobbit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("-> All the attributes (so "),a("code",[t._v("id")]),t._v(", "),a("code",[t._v("title")]),t._v(" and "),a("code",[t._v("author")]),t._v(") are returned in "),a("code",[t._v("_formatted")]),t._v(" because by default "),a("code",[t._v("attributesToRetrieve")]),t._v(" is set to "),a("code",[t._v('["*"]')]),t._v(".\n-> Only "),a("code",[t._v("title")]),t._v(" is highlighted.")]),t._v(" "),a("p",[t._v("Example 2:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToHighlight"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"*"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Hobbit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"_formatted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Hobbit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("-> "),a("code",[t._v("id")]),t._v(", "),a("code",[t._v("title")]),t._v(" and "),a("code",[t._v("author")]),t._v(" are returned in "),a("code",[t._v("_formatted")]),t._v(" because"),a("code",[t._v("attributesToHighlight")]),t._v(" is set to "),a("code",[t._v('["*"]')]),t._v(" (but also "),a("code",[t._v("attributesToRetrieve")]),t._v(" by default).\n-> Both "),a("code",[t._v("title")]),t._v(" and "),a("code",[t._v("author")]),t._v(" are highlighted because "),a("code",[t._v("attributesToHighlight")]),t._v(" is set to "),a("code",[t._v('["*"]')]),t._v(".")]),t._v(" "),a("p",[t._v("Example 3:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToRetrieve"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToHighlight"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"_formatted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Hobbit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("-> Only "),a("code",[t._v("author")]),t._v(" is returned at the root of the document because defined in the "),a("code",[t._v("attributesToRetrieve")]),t._v(".\n-> Only "),a("code",[t._v("author")]),t._v(" and "),a("code",[t._v("title")]),t._v(" are returned in "),a("code",[t._v("_formatted")]),t._v(" because the addition of "),a("code",[t._v("attributesToRetrieve")]),t._v(" and "),a("code",[t._v("attributesToHighlight")]),t._v(".\n-> Only "),a("code",[t._v("title")]),t._v(" is highlighted because the only one defined in "),a("code",[t._v("attributesToHighlight")]),t._v(".")]),t._v(" "),a("p",[t._v("Example 4:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToRetrieve"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToHighlight"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"*"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"_formatted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Hobbit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("-> No attributes are returned at the root of the document because "),a("code",[t._v("attributesToRetrieve")]),t._v(" is set to "),a("code",[t._v("[]")]),t._v(".\n-> All the attributes are returned in "),a("code",[t._v("_formatted")]),t._v(" because "),a("code",[t._v("attributesToHighlight")]),t._v(" is set to "),a("code",[t._v('["*"]')]),t._v(".\n-> All the attributes are highlighted because "),a("code",[t._v("attributesToHighlight")]),t._v(" is set to "),a("code",[t._v('["*"]')]),t._v(".")]),t._v(" "),a("h6",{attrs:{id:"_3-2-1-1-3-matchesposition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-3-matchesposition"}},[t._v("#")]),t._v(" 3.2.1.1.3. "),a("code",[t._v("_matchesPosition")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Object")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Contains the location of each occurrence of queried terms across all fields. The "),a("code",[t._v("_matchesPosition")]),t._v(" object is added to a search result when the "),a("code",[t._v("showMatchesPosition")]),t._v(" search parameter is specified to true.")]),t._v(" "),a("p",[t._v("The beginning of a matching term within a field is indicated by "),a("code",[t._v("start")]),t._v(", and its "),a("code",[t._v("length")]),t._v(" by length.")]),t._v(" "),a("p",[a("code",[t._v("start")]),t._v(" and "),a("code",[t._v("length")]),t._v(" are measured in bytes and not the number of characters. For example, "),a("code",[t._v("ü")]),t._v(" represents two bytes but one character.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#3116-showmatchesposition"}},[t._v("3.1.14. "),a("code",[t._v("showMatchesPosition")])]),t._v(" section.")])]),t._v(" "),a("h6",{attrs:{id:"_3-2-1-1-4-rankingscore"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-4-rankingscore"}},[t._v("#")]),t._v(" 3.2.1.1.4. "),a("code",[t._v("_rankingScore")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Number")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("The relevancy score of a document relative to the search query. Higher is better.")]),t._v(" "),a("p",[a("code",[t._v("1.0")]),t._v(" indicates a perfect match, "),a("code",[t._v("0.0")]),t._v(" no match at all (Meilisearch should not return documents that don't match the query).")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0195-ranking-score.html#31-ranking-score"}},[t._v("Ranking Score")]),t._v(" for details.")],1)]),t._v(" "),a("h6",{attrs:{id:"_3-2-1-1-5-rankingscoredetails"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-5-rankingscoredetails"}},[t._v("#")]),t._v(" 3.2.1.1.5. "),a("code",[t._v("_rankingScoreDetails")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Object")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("The ranking score of a document per each ranking rule and relative to the search query.")]),t._v(" "),a("p",[t._v("This object features one field for each applied ranking rule, whose values are an object with at least the field "),a("code",[t._v("order")]),t._v(" indicating in which order this ranking rule has been applied.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0195-ranking-score.html#32-ranking-score-details"}},[t._v("Ranking Score details")]),t._v(" for details.")],1)]),t._v(" "),a("h6",{attrs:{id:"_3-2-1-1-6-semanticscore-experimental"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-6-semanticscore-experimental"}},[t._v("#")]),t._v(" 3.2.1.1.6. "),a("code",[t._v("_semanticScore")]),t._v(" "),a("code",[t._v("EXPERIMENTAL")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Float")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Contains the semantic similarity score of the document for a vector search when "),a("code",[t._v("vector")]),t._v(" has been provided. The score is represented as a dot product.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#3118-vector-experimental"}},[t._v("3.1.18 "),a("code",[t._v("vector")])])])]),t._v(" "),a("h4",{attrs:{id:"_3-2-2-limit"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-limit"}},[t._v("#")]),t._v(" 3.2.2. "),a("code",[t._v("limit")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the "),a("code",[t._v("limit")]),t._v(" search parameter used for the query.\nThis field is returned only when:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are used as query parameters.")]),t._v(" "),a("li",[t._v("None of "),a("code",[t._v("limit")]),t._v(", "),a("code",[t._v("offset")]),t._v(", "),a("code",[t._v("page")]),t._v(", "),a("code",[t._v("hitsPerPage")]),t._v(" are used as a query parameter")])]),t._v(" "),a("p",[t._v("See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(" on the different ways of navigating search results.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#315-limit"}},[t._v("3.1.5. "),a("code",[t._v("limit")])]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-3-offset"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-offset"}},[t._v("#")]),t._v(" 3.2.3. "),a("code",[t._v("offset")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the "),a("code",[t._v("offset")]),t._v(" search parameter used for the query.\nThis field is returned only when none of "),a("code",[t._v("page")]),t._v(" and "),a("code",[t._v("hitsPerPage")]),t._v(" are used as a query parameter.")]),t._v(" "),a("p",[t._v("See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("explanation")]),t._v(" on the different ways of navigating search results.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#316-offset"}},[t._v("3.1.6. "),a("code",[t._v("offset")]),t._v(" section")]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-4-estimatedtotalhits"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-estimatedtotalhits"}},[t._v("#")]),t._v(" 3.2.4. "),a("code",[t._v("estimatedTotalHits")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the estimated number of candidates for the search query. This field is returned only when "),a("code",[t._v("limit")]),t._v(" or/and "),a("code",[t._v("offset")]),t._v(" are used as a query parameter.")]),t._v(" "),a("p",[t._v("This field is returned only when:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are used as query parameters.")]),t._v(" "),a("li",[t._v("None of "),a("code",[t._v("limit")]),t._v(", "),a("code",[t._v("offset")]),t._v(", "),a("code",[t._v("page")]),t._v(", "),a("code",[t._v("hitsPerPage")]),t._v(" are used as a query parameter")])]),t._v(" "),a("p",[t._v("See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(" on the different ways of navigation search results.")]),t._v(" "),a("h4",{attrs:{id:"_3-2-5-page"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-5-page"}},[t._v("#")]),t._v(" 3.2.5. "),a("code",[t._v("page")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the current search results page. This field is returned only when the "),a("code",[t._v("page selection")]),t._v(" feature is enabled; see "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(".")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#317-page"}},[t._v("3.1.7. "),a("code",[t._v("page")]),t._v(" section")]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-6-hitsperpage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-6-hitsperpage"}},[t._v("#")]),t._v(" 3.2.6. "),a("code",[t._v("hitsPerPage")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the number of results per page. This field is returned only when the "),a("code",[t._v("page selection")]),t._v(" feature is enabled; see "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(".")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#318-hitsperpage"}},[t._v("3.1.7. "),a("code",[t._v("hitsPerPage")]),t._v(" section")]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-7-totalpages"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-7-totalpages"}},[t._v("#")]),t._v(" 3.2.7. "),a("code",[t._v("totalPages")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the total number of results pages. Calculated using ["),a("code",[t._v("hitsPerPage")]),t._v("]. Both "),a("code",[t._v("totalPages")]),t._v(" and "),a("code",[t._v("totalHits")]),t._v(" are computed until they reach the "),a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#https://github.com/meilisearch/specifications/blob/main/text/157-pagination-setting-api.md#311-maxtotalhits"}},[a("code",[t._v("pagination.maxTotalHits")])]),t._v(" number from the settings.")],1),t._v(" "),a("p",[t._v("This field is returned only when the "),a("code",[t._v("page selection")]),t._v(" feature is enabled; see "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(".")]),t._v(" "),a("h4",{attrs:{id:"_3-2-8-totalhits"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-8-totalhits"}},[t._v("#")]),t._v(" 3.2.8. "),a("code",[t._v("totalHits")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the total number of search results. Both "),a("code",[t._v("totalPages")]),t._v(" and "),a("code",[t._v("totalHits")]),t._v(" are computed until they reach the "),a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#https://github.com/meilisearch/specifications/blob/main/text/157-pagination-setting-api.md#311-maxtotalhits"}},[a("code",[t._v("pagination.maxTotalHits")])]),t._v(" number from the settings.")],1),t._v(" "),a("p",[t._v("This field is returned only when the "),a("code",[t._v("page selection")]),t._v(" feature is enabled, see "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(".")]),t._v(" "),a("h4",{attrs:{id:"_3-2-9-facetdistribution"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-9-facetdistribution"}},[t._v("#")]),t._v(" 3.2.9. "),a("code",[t._v("facetDistribution")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Object")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Added to the search response when "),a("code",[t._v("facets")]),t._v(" is set for a search query. It contains the number of remaining candidates for each specified facet in the "),a("code",[t._v("facets")]),t._v(" search parameter.")]),t._v(" "),a("p",[t._v("If a field distributed as a facet contains no value, it is returned as a "),a("code",[t._v("facetDistribution")]),t._v(" field with an empty object as value.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#314-facets"}},[t._v("3.1.4. "),a("code",[t._v("facets")])]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-10-facetstats"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-10-facetstats"}},[t._v("#")]),t._v(" 3.2.10. "),a("code",[t._v("facetStats")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Object")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("When using the "),a("code",[t._v("facets")]),t._v(" parameter, the distributed facets that contain some numeric values are displayed in a "),a("code",[t._v("facetStats")]),t._v(" object that contains, per facet, the numeric "),a("code",[t._v("min")]),t._v(" and "),a("code",[t._v("max")]),t._v(" values for that facet of all documents matching the search query.")]),t._v(" "),a("p",[t._v("If none of the hits returned by the search query have a numeric value for a facet, this facet is not part of the "),a("code",[t._v("facetStats")]),t._v(" object.")]),t._v(" "),a("p",[t._v("It ignores string values even if parseable. e.g "),a("code",[t._v('"21"')]),t._v(" isn't considered by the engine when computing the "),a("code",[t._v("facetStats")]),t._v(" "),a("code",[t._v("min")]),t._v(" and "),a("code",[t._v("max")]),t._v(".")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#314-facets"}},[t._v("3.1.4. "),a("code",[t._v("facets")])]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-11-processingtimems"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-11-processingtimems"}},[t._v("#")]),t._v(" 3.2.11. "),a("code",[t._v("processingTimeMs")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: True")])]),t._v(" "),a("p",[t._v("Processing time of the search query in "),a("strong",[t._v("milliseconds")]),t._v(".")]),t._v(" "),a("h4",{attrs:{id:"_3-2-12-query"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-12-query"}},[t._v("#")]),t._v(" 3.2.12. "),a("code",[t._v("query")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String")]),t._v(" "),a("li",[t._v("Required: True")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v('""')])])]),t._v(" "),a("p",[t._v("Query originating the response. Equals to the "),a("code",[t._v("q")]),t._v(" search parameter.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#311-q"}},[t._v("3.1.1. "),a("code",[t._v("q")])]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-13-vector-experimental"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-13-vector-experimental"}},[t._v("#")]),t._v(" 3.2.13. "),a("code",[t._v("vector")]),t._v(" "),a("code",[t._v("EXPERIMENTAL")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of Float")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Vector query embedding originating the response. Equals to the "),a("code",[t._v("vector")]),t._v(" search parameter if specified.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#3118-vector-experimental"}},[t._v("3.1.18. "),a("code",[t._v("vector")])])])]),t._v(" "),a("h2",{attrs:{id:"_2-technical-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-details"}},[t._v("#")]),t._v(" 2. Technical Details")]),t._v(" "),a("p",[t._v("n/a")]),t._v(" "),a("h2",{attrs:{id:"_3-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[t._v("#")]),t._v(" 3. Future Possibilities")]),t._v(" "),a("ul",[a("li",[t._v("Add dedicated errors to replace "),a("code",[t._v("bad_request")]),t._v(" error.")])]),t._v(" "),a("h3",{attrs:{id:"_3-1-formatting-search-results"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-formatting-search-results"}},[t._v("#")]),t._v(" 3.1. Formatting Search Results")]),t._v(" "),a("ul",[a("li",[t._v("Replaces "),a("code",[t._v("_matchesPosition")]),t._v(" with chars position instead of bytes. It could also be a "),a("code",[t._v("mode")]),t._v(" to choose "),a("code",[t._v("byte")]),t._v(" or "),a("code",[t._v("char")]),t._v(".")]),t._v(" "),a("li",[t._v("Move "),a("code",[t._v("attributesToHighlight")]),t._v(", "),a("code",[t._v("highlightPreTag")]),t._v(", "),a("code",[t._v("highlightPostTag")]),t._v(", "),a("code",[t._v("attributesToCrop")]),t._v(", "),a("code",[t._v("cropLength")]),t._v(" and "),a("code",[t._v("cropMarker")]),t._v(" into a "),a("code",[t._v("formatter")]),t._v(" objet.")]),t._v(" "),a("li",[t._v("Add an option to only highlight complete query term.")]),t._v(" "),a("li",[t._v("Expose the "),a("code",[t._v("formatter")]),t._v(" resource as an index setting.")]),t._v(" "),a("li",[t._v("Highlight a phrase search as a single highlighted section.")])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[34],{460:function(t,e,a){"use strict";a.r(e);var s=a(62),r=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"search-api"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#search-api"}},[t._v("#")]),t._v(" Search API")]),t._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),a("p",[t._v("The search endpoints retrieve documents from an index. Their returned documents are considered relevant based on the settings of the index and the provided search parameters.")]),t._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),a("p",[t._v("N/A")]),t._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),a("p",[t._v("Meilisearch exposes 2 routes to perform search requests:")]),t._v(" "),a("ul",[a("li",[a("p",[t._v("GET "),a("code",[t._v("indexes/:index_uid/search")])])]),t._v(" "),a("li",[a("p",[t._v("POST "),a("code",[t._v("indexes/:index_uid/search")])])]),t._v(" "),a("li",[a("p",[t._v("🔴 Sending an invalid index uid format for the "),a("code",[t._v(":index_uid")]),t._v(" path parameter returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[t._v("invalid_index_uid")]),t._v(" error.")],1)]),t._v(" "),a("li",[a("p",[t._v("🔴 If the index does not exist, the API returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[t._v("index_not_found")]),t._v(" error.")],1)])]),t._v(" "),a("p",[t._v("If a master key is used to secure a Meilisearch instance, the auth layer returns the following errors:")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Accessing these routes without the "),a("code",[t._v("Authorization")]),t._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Accessing these routes with a key that does not have permissions (i.e. other than the master key) returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),a("p",[a("code",[t._v("POST")]),t._v(" HTTP verb errors:")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Omitting the Content-Type header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[t._v("missing_content_type")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending an empty Content-Type returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[t._v("invalid_content_type")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending a different Content-Type than "),a("code",[t._v("application/json")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[t._v("invalid_content_type")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending an empty payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[t._v("missing_payload")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending an invalid JSON payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[t._v("malformed_payload")]),t._v(" error.")],1)]),t._v(" "),a("h3",{attrs:{id:"_3-1-search-payload-parameters"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-search-payload-parameters"}},[t._v("#")]),t._v(" 3.1. Search Payload Parameters")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Field")]),t._v(" "),a("th",[t._v("Type")]),t._v(" "),a("th",[t._v("Required")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[a("a",{attrs:{href:"#311-q"}},[a("code",[t._v("q")])])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#312-filter"}},[a("code",[t._v("filter")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#313-sort"}},[a("code",[t._v("sort")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#314-facets"}},[a("code",[t._v("facets")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#315-limit"}},[a("code",[t._v("limit")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#316-offset"}},[a("code",[t._v("offset")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#317-page"}},[a("code",[t._v("page")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#318-hitsperpage"}},[a("code",[t._v("hitsPerPage")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#319-attributestoretrieve"}},[a("code",[t._v("attributesToRetrieve")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3110-attributestohighlight"}},[a("code",[t._v("attributesToHighlight")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3111-highlightpretag"}},[a("code",[t._v("highlightPreTag")])])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3112-highlightposttag"}},[a("code",[t._v("highlightPostTag")])])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3113-attributestocrop"}},[a("code",[t._v("attributesToCrop")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3114-croplength"}},[a("code",[t._v("cropLength")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3115-cropmarker"}},[a("code",[t._v("cropMarker")])])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3116-showmatchesposition"}},[a("code",[t._v("showMatchesPosition")])])]),t._v(" "),a("td",[t._v("Boolean")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3117-showrankingscore"}},[a("code",[t._v("showRankingScore")])])]),t._v(" "),a("td",[t._v("Boolean")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3118-showrankingscoredetails"}},[a("code",[t._v("showRankingScoreDetails")])])]),t._v(" "),a("td",[t._v("Boolean")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3119-matchingStrategy"}},[a("code",[t._v("matchingStrategy")])])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3120-attributesToSearchOn"}},[a("code",[t._v("attributesToSearchOn")])])]),t._v(" "),a("td",[t._v("Array of String - String")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3121-vector"}},[a("code",[t._v("vector")])]),t._v(" "),a("code",[t._v("EXPERIMENTAL")])]),t._v(" "),a("td",[t._v("Array of Float")]),t._v(" "),a("td",[t._v("False")])])])]),t._v(" "),a("h4",{attrs:{id:"_3-1-1-q"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-q"}},[t._v("#")]),t._v(" 3.1.1. "),a("code",[t._v("q")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("null")])])]),t._v(" "),a("p",[a("code",[t._v("q")]),t._v(" contains the terms to search within the index documents.")]),t._v(" "),a("blockquote",[a("p",[t._v("When q isn't specified, Meilisearch performs a "),a("strong",[t._v("placeholder search")]),t._v(". A placeholder search returns all searchable documents in an index, modified by any search parameters used and sorted by that index's custom ranking rules. If the index has no sort search parameter or custom ranking rules, the results are returned in the order of their internal database position.")])]),t._v(" "),a("blockquote",[a("p",[t._v("Meilisearch only considers the first ten words of any given search query to deliver a fast search-as-you-type experience.")])]),t._v(" "),a("blockquote",[a("p",[a("code",[t._v("q")]),t._v(" supports the "),a("RouterLink",{attrs:{to:"/specifications/text/0043-phrase-query.html"}},[t._v("Phrase Query")]),t._v(" expression.")],1)]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("String")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("q")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_q"}},[t._v("invalid_search_q")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-2-filter"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-filter"}},[t._v("#")]),t._v(" 3.1.2. "),a("code",[t._v("filter")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String (POST/GET) | Array of (String, Array of String) (POST)")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("[]|null")])])]),t._v(" "),a("p",[a("code",[t._v("filter")]),t._v(" contains a filter expression written as a string or an array of (strings and array of strings). Its purpose is to refine search results by selecting documents that match the given filter and running the search query only on those documents.")]),t._v(" "),a("p",[t._v("Attributes used as filter criteria must be added to the "),a("code",[t._v("filterableAttributes")]),t._v(" list of an index settings. See "),a("RouterLink",{attrs:{to:"/specifications/text/0123-filterable-attributes-setting-api.html"}},[t._v("Filterable Attributes Setting API")]),t._v(".")],1),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("String")]),t._v("(GET/POST), "),a("code",[t._v("Array of (Array of String, String) (POST)")]),t._v(", or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("filter")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_filter"}},[t._v("invalid_search_filter")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending an invalid syntax for "),a("code",[t._v("filter")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_filter"}},[t._v("invalid_search_filter")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending a field not defined as a "),a("code",[t._v("filterableAttributes")]),t._v(" for "),a("code",[t._v("filter")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_filter"}},[t._v("invalid_search_filter")]),t._v(" error.")],1)]),t._v(" "),a("h5",{attrs:{id:"_3-1-2-1-string-syntax"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-string-syntax"}},[t._v("#")]),t._v(" 3.1.2.1. String Syntax")]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-1-grammar"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-1-grammar"}},[t._v("#")]),t._v(" 3.1.2.1.1 Grammar")]),t._v(" "),a("p",[t._v("The grammar of the filter syntax is given below in pseudo-BNF form:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('filter = expression EOF\nexpression = or\nor = and ("OR" WS+ and)*\nand = not ("AND" WS+ not)*\nnot = ("NOT" WS+ not) | primary\nprimary = "(" WS* expression WS* ")" | geoRadius | geoBoundingBox | in | condition | exists | not_exists | to\nin = attribute "IN" WS* "[" value_list "]"\ncondition = attribute ("=" | "!=" | ">" | ">=" | "<" | "<=") value\nexists = attribute "EXISTS"\nnot_exists = attribute "NOT" WS+ "EXISTS"\nto = attribute value "TO" WS+ value\nvalue = WS* ( word | singleQuoted | doubleQuoted) WS+\nattribute = value\nvalue_list = (value ("," value)* ","?)?\nsingleQuoted = "\'" single_quoted_string "\'"\ndoubleQuoted = "\\"" double_quoted_string "\\""\nword = ([a-zA-Z0-9] | "_" | "-" | ".")+\ngeoRadius = "_geoRadius(" WS* float WS* "," WS* float WS* "," float WS* ")"\nfloat = [+-]?[0-9]*("."[0-9]+)?(("E"|"e") [+-]?[0-9]+)?\nWS = \' \' | \'\\t\' | \'\\r\' | \'\\n\'\n')])])]),a("p",[t._v("where "),a("code",[t._v("single_quoted_string")]),t._v(" and "),a("code",[t._v("double_quoted_string")]),t._v(" can contain anything except unescaped single quotes "),a("code",[t._v("'")]),t._v(" and unescaped double quotes "),a("code",[t._v('"')]),t._v(", respectively. Quotes are escaped by a preceding backslash. For example: "),a("code",[t._v('"escaped \\" double quote" "')]),t._v(" and "),a("code",[t._v("escaped \\' single quote")]),t._v(". If a backslash is not followed by the correct quote, it is kept in the string.")]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-2-naming-a-filterable-attribute"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-2-naming-a-filterable-attribute"}},[t._v("#")]),t._v(" 3.1.2.1.2 Naming a filterable attribute")]),t._v(" "),a("p",[t._v("A filterable attribute can appear in a filter by its unquoted name if it only contains ascii alphanumeric characters, dots, hyphens, and underscores.")]),t._v(" "),a("p",[t._v("For example, each filter below selects the documents where the given filterable attribute (on the left side of the equal) is equal to a specific value (on the right side):")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('genres = "film"\ngenre.subgenre = "adventure"\n_geo.lat = 1.23\n101 = "abc"\n')])])]),a("p",[t._v("If the filterable attribute is composed of multiple words or contains other characters, it must be quoted, either using single quotes or double quotes:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('"place of birth" = Berlin\n"∆" = 2.1\n"Friend\'s name" = Albus\n\'opinion on "the best search engine"\' = "meilisearch"\n')])])]),a("p",[t._v("If the filterable attribute contains the same quote character that surrounds the attribute, then this quote character must be escaped by a preceding backslash:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("'Friend\\'s name' = Albus\n")])])]),a("h5",{attrs:{id:"_3-1-2-1-3-naming-the-value-of-a-filterable-attribute"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-3-naming-the-value-of-a-filterable-attribute"}},[t._v("#")]),t._v(" 3.1.2.1.3 Naming the value of a filterable attribute")]),t._v(" "),a("p",[t._v("The grammar for the value of a filterable attribute is the same as the grammar for filterable attributes themselves.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-2-1-4-list-of-supported-operators"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-4-list-of-supported-operators"}},[t._v("#")]),t._v(" 3.1.2.1.4 List of supported operators")]),t._v(" "),a("ul",[a("li",[t._v("Equality: "),a("code",[t._v("attribute = value")])]),t._v(" "),a("li",[t._v("Inequality: "),a("code",[t._v("attribute != value")])]),t._v(" "),a("li",[t._v("Comparison:\n"),a("ul",[a("li",[a("code",[t._v("attribute < value")])]),t._v(" "),a("li",[a("code",[t._v("attribute <= value")])]),t._v(" "),a("li",[a("code",[t._v("attribute > value")])]),t._v(" "),a("li",[a("code",[t._v("attribute >= value")])]),t._v(" "),a("li",[a("code",[t._v("attribute value TO value")])])])]),t._v(" "),a("li",[t._v("Exists:\n"),a("ul",[a("li",[a("code",[t._v("attribute EXISTS")])]),t._v(" "),a("li",[a("code",[t._v("attribute NOT EXISTS")])])])]),t._v(" "),a("li",[t._v("IN:\n"),a("ul",[a("li",[a("code",[t._v("attribute IN[value, value, etc.]")])]),t._v(" "),a("li",[a("code",[t._v("attribute NOT IN[value, value, etc.]")])])])]),t._v(" "),a("li",[t._v("IS EMPTY:\n"),a("ul",[a("li",[a("code",[t._v("attribute IS EMPTY")])]),t._v(" "),a("li",[a("code",[t._v("attribute IS NOT EMPTY")])])])]),t._v(" "),a("li",[t._v("IS NULL:\n"),a("ul",[a("li",[a("code",[t._v("attribute IS NULL")])]),t._v(" "),a("li",[a("code",[t._v("attribute IS NOT NULL")])])])]),t._v(" "),a("li",[t._v("AND: "),a("code",[t._v("filter AND filter")])]),t._v(" "),a("li",[t._v("OR: "),a("code",[t._v("filter OR filter")])]),t._v(" "),a("li",[t._v("NOT: "),a("code",[t._v("NOT filter")])]),t._v(" "),a("li",[t._v("GeoSearch: "),a("code",[t._v("_geoRadius(lat, lng, distance)")])]),t._v(" "),a("li",[t._v("GeoSearch: "),a("code",[t._v("_geoBoundingBox([lat, lng], [lat, lng])")])])]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-5-equality"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-5-equality"}},[t._v("#")]),t._v(" 3.1.2.1.5 Equality")]),t._v(" "),a("p",[t._v("The equality operator, "),a("code",[t._v("=")]),t._v(", selects the documents for which:")]),t._v(" "),a("ol",[a("li",[t._v("the given filterable attribute exists; and")]),t._v(" "),a("li",[t._v("the attribute contains a value that is equal to a specific value")])]),t._v(" "),a("p",[t._v("It is an infix operator that takes an attribute name on the left hand side and a value on the right hand side.")]),t._v(" "),a("p",[t._v("For example, given the documents:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"size"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"size"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"L"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"size"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"small"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"shop_distance"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1.2e+5")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("then the filter:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("size = 1\n")])])]),a("p",[t._v("will select the documents with ids "),a("code",[t._v("0")]),t._v(" and "),a("code",[t._v("1")]),t._v(".")]),t._v(" "),a("p",[t._v("Note that there is no way to specify whether the value on the right hand side of the equality should be interpreted as a string or as a number. Meilisearch will always try to match both. And since unquoted values cannot contain the "),a("code",[t._v("+")]),t._v(" character, it is in fact necessary to quote floating point numbers that have positive exponents:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('shop_distance = "1.2e+5"\n')])])]),a("p",[t._v("will select the document with id "),a("code",[t._v("3")]),t._v(".")]),t._v(" "),a("p",[t._v("Furthermore, there is no way to check whether an attribute has a value that is "),a("code",[t._v("null")]),t._v(" or an array. An attribute whose value is "),a("code",[t._v("null")]),t._v(" or an empty array is considered not to have any value and will therefore never be matched by an equality operator.")]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-6-inequality"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-6-inequality"}},[t._v("#")]),t._v(" 3.1.2.1.6 Inequality")]),t._v(" "),a("p",[t._v("The inequality operator selects all documents that are not selected by the equality operator.\nWith the same documents given as examples to the equality operator, the following filter:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("size != 1\n")])])]),a("p",[t._v("will select the documents with ids "),a("code",[t._v("2")]),t._v(" and "),a("code",[t._v("3")]),t._v(".")]),t._v(" "),a("p",[t._v("Note that "),a("code",[t._v("attribute != value")]),t._v(" is equivalent to "),a("code",[t._v("NOT attribute = value")]),t._v(".")]),t._v(" "),a("p",[t._v("Furthermore, there is no way to write a filter to select documents which contain a value that is different than a given string or number. In the example above, "),a("code",[t._v("size != 1")]),t._v(" did not select the document with id "),a("code",[t._v("1")]),t._v(", even though its "),a("code",[t._v("size")]),t._v(" attribute contains the value "),a("code",[t._v('"L"')]),t._v(", which is different than "),a("code",[t._v("1")]),t._v(".")]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-7-comparison"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-7-comparison"}},[t._v("#")]),t._v(" 3.1.2.1.7 Comparison")]),t._v(" "),a("p",[t._v("The comparison operators select the documents for which:")]),t._v(" "),a("ol",[a("li",[t._v("the filterable attribute exists; and")]),t._v(" "),a("li",[t._v("the attribute contains a number that satisfies the comparison")])]),t._v(" "),a("p",[t._v("Note that the right hand side of the comparison must be a valid floating point number.")]),t._v(" "),a("p",[t._v("For example, with the documents:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"size"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"small"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"blue"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"size"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"size"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Then the following filters will select these documents:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("size > 1 -> selects [1]\nsize >= 1 -> selects [1,2]\nsize < 2 -> selects [0,1]\nsize <= 2 -> selects [0,1,2]\nsize -1 TO 2 -> equivalent to size >= -1 AND size <= 2 -> selects [0,1,2]\n")])])]),a("p",[t._v("And the following filters are invalid:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('size > "small"\nsize "larga" TO "largz"\n')])])]),a("h5",{attrs:{id:"_3-1-2-1-8-combining-filter-conditions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-8-combining-filter-conditions"}},[t._v("#")]),t._v(" 3.1.2.1.8 Combining filter conditions")]),t._v(" "),a("p",[t._v("Multiple filters can be combined together using the operators "),a("code",[t._v("AND")]),t._v(" and "),a("code",[t._v("OR")]),t._v(". These infix operators take two sub-filters as arguments.")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("AND")]),t._v(" operator selects the documents that are selected by both subfilters at the same time. In other words, it is an intersection of the two sets of documents selected by the sub-filters.")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("OR")]),t._v(" operator selects the documents that are selected by either operator. In other words, it is a union of the two sets of documents selected by the sub-filters.")]),t._v(" "),a("p",[t._v("Note that "),a("code",[t._v("AND")]),t._v(" has a higher precedence than "),a("code",[t._v("OR")]),t._v(". Therefore, the following filter:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("x = 1 AND y = 2 OR z = 3\n")])])]),a("p",[t._v("will be interepreted as:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("(x = 1 AND y = 2) OR (z = 3)\n")])])]),a("p",[t._v("With the same documents given as examples for the comparison operators, the following filters will select these documents:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('size = 0 OR size = 1 -> selects [0,1]\nsize = 0 AND (size = 2 OR colour = "blue") -> selects []\nsize = 0 AND size = 2 OR colour = "blue" -> selects [0]\nsize > 5 AND size < 5 -> selects [2]\n')])])]),a("h6",{attrs:{id:"_3-1-2-1-9-negating-a-filter"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-9-negating-a-filter"}},[t._v("#")]),t._v(" 3.1.2.1.9 Negating a filter")]),t._v(" "),a("p",[t._v("The negation operator, "),a("code",[t._v("NOT")]),t._v(", is used to select all documents that are not selected by a sub-filter. It is a prefix operator that takes one argument. Its precedence is higher than both "),a("code",[t._v("AND")]),t._v(" and "),a("code",[t._v("OR")]),t._v(".")]),t._v(" "),a("p",[t._v("With the same documents given as examples for the comparison operators, the following filters will select these documents:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('NOT size = 0 -> selects [1,2]\nNOT (size = 0 OR size = 1) -> selects [2]\nNOT size = 0 OR size = 1 -> selects [1,2]\nNOT (size < 2 AND colour = "blue") -> selects [1,2]\nNOT size < 2 AND colour = "blue" -> selects []\nsize = 0 OR NOT size = 2 -> selects [0,1]\nNOT (NOT size = 0) -> selects [0]\n')])])]),a("h6",{attrs:{id:"_3-1-2-1-10-exists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-10-exists"}},[t._v("#")]),t._v(" 3.1.2.1.10 EXISTS")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("EXISTS")]),t._v(" operator selects the documents for which the filterable attribute exists, even if its value is "),a("code",[t._v("null")]),t._v(" or an empty array. It is a postfix operator that takes an attribute name as argument.")]),t._v(" "),a("p",[t._v("The negated form of "),a("code",[t._v("EXISTS")]),t._v(" can be written in two ways:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("attribute NOT EXISTS\nNOT attribute EXISTS\n")])])]),a("p",[t._v("Both forms are equivalent. They select the documents for which the attribute does not exist.")]),t._v(" "),a("p",[t._v("For example, with the documents:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Then the filter "),a("code",[t._v("colour EXISTS")]),t._v(" selects the document ids "),a("code",[t._v("[0,1]")]),t._v(" while the filter "),a("code",[t._v("colour NOT EXISTS")]),t._v(" or "),a("code",[t._v("NOT colour EXISTS")]),t._v(" selects the document ids "),a("code",[t._v("[2]")]),t._v(".")]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-11-in"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-11-in"}},[t._v("#")]),t._v(" 3.1.2.1.11 IN")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("IN[..]")]),t._v(" operator is a more concise way to combine equality operators. It is a postfix operator that takes an attribute name on the left hand side and an array of values on the right hand side. An array of value is a comma-separated list of values delimited by square brackets.")]),t._v(" "),a("p",[t._v("The two filters below are equivalent:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("attribute IN[value1, value2, value3,]\n\nattribute = value1 OR attribute = value2 OR attribute = value3\n")])])]),a("p",[t._v("In short, "),a("code",[t._v("IN")]),t._v(" selects the documents for which:")]),t._v(" "),a("ol",[a("li",[t._v("the filterable attribute exists; and")]),t._v(" "),a("li",[t._v("the attribute contains a value that is equal to any of the values in the array")])]),t._v(" "),a("p",[t._v("The negated form of "),a("code",[t._v("IN")]),t._v(" can be written in two different ways:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("attribute NOT IN [value1, value2, etc.]\nNOT attribute IN [value1, value2, etc.]\n")])])]),a("p",[t._v("and it is equivalent to:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("attribute != value1 AND attribute != value2 AND ...\n")])])]),a("h6",{attrs:{id:"_3-1-2-1-12-geo-search"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-12-geo-search"}},[t._v("#")]),t._v(" 3.1.2.1.12 Geo Search")]),t._v(" "),a("ul",[a("li",[t._v("The "),a("code",[t._v("_geoRadius")]),t._v(" operator selects the documents whose geographical coordinates fall within a certain range of a given coordinate. See "),a("RouterLink",{attrs:{to:"/specifications/text/0059-geo-search.html"}},[t._v("GeoSearch")]),t._v(" for more information.")],1),t._v(" "),a("li",[t._v("The "),a("code",[t._v("_geoBoundingBox")]),t._v(" operator selects the documents whose geographical coordinates fall within a square described by the given coordinates. See "),a("RouterLink",{attrs:{to:"/specifications/text/0059-geo-search.html"}},[t._v("GeoSearch")]),t._v(" for more information.")],1)]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-12-is-empty"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-12-is-empty"}},[t._v("#")]),t._v(" 3.1.2.1.12 IS EMPTY")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("IS EMPTY")]),t._v(" operator selects the documents for which the filterable attribute exists and is empty. If the attribute doesn't exists then it is not empty and the document will not be returned. It is a postfix operator that takes an attribute name as argument.")]),t._v(" "),a("p",[t._v("The negated form of "),a("code",[t._v("IS EMPTY")]),t._v(" can be written in two ways:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("attribute IS NOT EMPTY\nNOT attribute IS EMPTY\n")])])]),a("p",[t._v("Both forms are equivalent. They select the documents for which the attribute is not empty.")]),t._v(" "),a("p",[t._v("Here is the list of JSON values that are considered empty:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v('""')])]),t._v(" "),a("li",[a("code",[t._v("[]")])]),t._v(" "),a("li",[a("code",[t._v("{}")])])]),t._v(" "),a("p",[t._v("For example, with the documents:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("4")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Then the filter "),a("code",[t._v("colour IS EMPTY")]),t._v(" selects the document ids "),a("code",[t._v("[0,2,3]")]),t._v(" while the filter "),a("code",[t._v("colour IS NOT EMPTY")]),t._v(" or "),a("code",[t._v("NOT colour IS EMPTY")]),t._v(" selects the document ids "),a("code",[t._v("[1,4]")]),t._v(".")]),t._v(" "),a("h6",{attrs:{id:"_3-1-2-1-13-is-null"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-13-is-null"}},[t._v("#")]),t._v(" 3.1.2.1.13 IS NULL")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("IS NULL")]),t._v(" operator selects the documents for which the filterable attribute exists and is "),a("code",[t._v("null")]),t._v(". If the attribute doesn't exists then it is not "),a("code",[t._v("null")]),t._v(" and the document will not be returned. It is a postfix operator that takes an attribute name as argument.")]),t._v(" "),a("p",[t._v("The negated form of "),a("code",[t._v("IS NULL")]),t._v(" can be written in two ways:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("attribute IS NOT NULL\nNOT attribute IS NULL\n")])])]),a("p",[t._v("Both forms are equivalent. They select the documents for which the attribute is not "),a("code",[t._v("null")]),t._v(".")]),t._v(" "),a("p",[t._v("For example, with the documents:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colour"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("4")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Then the filter "),a("code",[t._v("colour IS NULL")]),t._v(" selects the document ids "),a("code",[t._v("[1]")]),t._v(" while the filter "),a("code",[t._v("colour IS NOT NULL")]),t._v(" or "),a("code",[t._v("NOT colour IS NULL")]),t._v(" selects the document ids "),a("code",[t._v("[0,2,3,4]")]),t._v(".")]),t._v(" "),a("h5",{attrs:{id:"_3-1-2-2-array-syntax"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-2-array-syntax"}},[t._v("#")]),t._v(" 3.1.2.2. Array Syntax")]),t._v(" "),a("p",[t._v("The array syntax is an alternative way to combine different filters with "),a("code",[t._v("OR")]),t._v(" and "),a("code",[t._v("AND")]),t._v(" operators.")]),t._v(" "),a("ul",[a("li",[t._v("Elements in the outer array are connected by "),a("code",[t._v("AND")]),t._v(" operators")]),t._v(" "),a("li",[t._v("Elements in the inner arrays are connected by "),a("code",[t._v("OR")]),t._v(" operators")])]),t._v(" "),a("p",[t._v("Example:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"genres = Comedy"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"genres = Romance"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"director = 'Mati Diop'\"")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("is equivalent to:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"filter"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"(genres = Comedy OR genres = Romance) AND (director = 'Mati Diop')\"")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"_3-1-3-sort"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-sort"}},[t._v("#")]),t._v(" 3.1.3. "),a("code",[t._v("sort")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of String (POST) | String (GET)")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("[]|null")])])]),t._v(" "),a("p",[a("code",[t._v("sort")]),t._v(" contains a sort expression written as a string or an array of strings. It sorts the search results at query time according to the specified attributes and indicated order.")]),t._v(" "),a("p",[t._v("Attributes used as sort criteria must be added to the `sortableAttributes list of an index settings. See "),a("RouterLink",{attrs:{to:"/specifications/text/0123-sortable-attributes-setting-api.html"}},[t._v("Sortable Attributes Setting API")]),t._v(".")],1),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array of String")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("sort")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_sort"}},[t._v("invalid_search_sort")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending an invalid syntax for "),a("code",[t._v("sort")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_sort"}},[t._v("invalid_search_sort")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending a field not defined as a "),a("code",[t._v("sortableAttributes")]),t._v(" for "),a("code",[t._v("sort")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_sort"}},[t._v("invalid_search_sort")]),t._v(" error.")],1)]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0055-sort.html"}},[t._v("Sort")])],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-4-facets"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-facets"}},[t._v("#")]),t._v(" 3.1.4. "),a("code",[t._v("facets")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of String (POST) | String (GET)")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("[]|null")])])]),t._v(" "),a("p",[a("code",[t._v("facets")]),t._v(" permits to specify facets to be computed for the current search query.")]),t._v(" "),a("p",[t._v("It returns the number of documents matching the current search query for each specified facet.")]),t._v(" "),a("p",[t._v("This parameter can take two values:")]),t._v(" "),a("ul",[a("li",[t._v("An array of attributes: "),a("code",[t._v('facets=["attributeA", "attributeB", …]')])]),t._v(" "),a("li",[t._v("A wildcard "),a("code",[t._v('"*"')]),t._v(" — this returns a count for all facets present in "),a("code",[t._v("filterableAttributes")])])]),t._v(" "),a("p",[t._v("Attributes used in "),a("code",[t._v("facets")]),t._v(" must be added to the "),a("code",[t._v("filterableAttributes")]),t._v(" list of an index settings. See "),a("RouterLink",{attrs:{to:"/specifications/text/0123-filterable-attributes-setting-api.html"}},[t._v("Filterable Attributes Setting API")]),t._v(".")],1),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array of String")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("facets")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_facets"}},[t._v("invalid_search_facets")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending a field not defined as a "),a("code",[t._v("filterableAttributes")]),t._v(" for "),a("code",[t._v("facets")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_facets"}},[t._v("invalid_search_facets")]),t._v(" error.")],1)]),t._v(" "),a("p",[t._v("The distribution of the different facets is returned in the "),a("code",[t._v("facetDistribution")]),t._v(" response parameter.")]),t._v(" "),a("p",[t._v("Statistics are computed and returned within the "),a("code",[t._v("facetStats")]),t._v(" object for distributed facets. See "),a("a",{attrs:{href:"#3210-facetstats"}},[a("code",[t._v("facetStats")])]),t._v(" section.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-5-limit"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-5-limit"}},[t._v("#")]),t._v(" 3.1.5. "),a("code",[t._v("limit")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("20")])])]),t._v(" "),a("p",[t._v("Sets the maximum number of documents to be returned for the search query.")]),t._v(" "),a("p",[t._v("If in addition to either "),a("code",[t._v("page")]),t._v(" and/or "),a("code",[t._v("hitsPerPage")]),t._v(", "),a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are provided as well, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" are ignored. See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("explaination")]),t._v(".")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("limit")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_limit"}},[t._v("invalid_search_limit")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-6-offset"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-6-offset"}},[t._v("#")]),t._v(" 3.1.6. "),a("code",[t._v("offset")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("0")])])]),t._v(" "),a("p",[t._v("Sets the starting point in the search results, effectively skipping over a given number of documents.")]),t._v(" "),a("p",[t._v("If in addition to either "),a("code",[t._v("page")]),t._v(" and/or "),a("code",[t._v("hitsPerPage")]),t._v(", "),a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are provided as well, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" are ignored. See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(".")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("offset")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_offset"}},[t._v("invalid_search_offset")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-7-page"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-7-page"}},[t._v("#")]),t._v(" 3.1.7. "),a("code",[t._v("page")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("null")])])]),t._v(" "),a("p",[t._v("Sets the specific results page to fetch.")]),t._v(" "),a("p",[t._v("By default, page is "),a("code",[t._v("null")]),t._v(", or "),a("code",[t._v("1")]),t._v(" if "),a("code",[t._v("hitsPerPage")]),t._v(" is provided.\nThe first page has a value of "),a("code",[t._v("1")]),t._v(", the second "),a("code",[t._v("2")]),t._v(", etc... When "),a("code",[t._v("0")]),t._v(" is provided as a value, no hits are returned.")]),t._v(" "),a("p",[t._v("When providing "),a("code",[t._v("page")]),t._v(" or "),a("code",[t._v("hitsPerPage")]),t._v(" in the query parameters, the "),a("code",[t._v("page selection")]),t._v(" system is enabled, which makes it possible to navigate through the search results pages. See explanation on the "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[a("code",[t._v("page selection")])]),t._v(".")]),t._v(" "),a("p",[t._v("If in addition to either "),a("code",[t._v("page")]),t._v(" and/or "),a("code",[t._v("hitsPerPage")]),t._v(", "),a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are provided as well, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" are ignored. See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("explanation")]),t._v(".")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("page")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_page"}},[t._v("invalid_search_page")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-8-hitsperpage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-hitsperpage"}},[t._v("#")]),t._v(" 3.1.8. "),a("code",[t._v("hitsPerPage")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("null")])])]),t._v(" "),a("p",[t._v("Sets the number of results returned for a query.")]),t._v(" "),a("p",[t._v("By default, "),a("code",[t._v("hitsPerPage")]),t._v(" is "),a("code",[t._v("null")]),t._v(", or "),a("code",[t._v("20")]),t._v(" if "),a("code",[t._v("page")]),t._v(" is provided. When "),a("code",[t._v("0")]),t._v(" is provided as a value, no hits are returned.")]),t._v(" "),a("p",[t._v("When providing "),a("code",[t._v("page")]),t._v(" or "),a("code",[t._v("hitsPerPage")]),t._v(" in the query parameters, the "),a("code",[t._v("page selection")]),t._v(" system is enabled, which makes it possible to navigate through the search results pages. See explanation on the "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[a("code",[t._v("page selection")])]),t._v(".")]),t._v(" "),a("p",[t._v("If in addition to either "),a("code",[t._v("page")]),t._v(" and/or "),a("code",[t._v("hitsPerPage")]),t._v(", "),a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are provided as well, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" are ignored. See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("explaination")]),t._v(".")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("hitsPerPage")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_hits_per_page"}},[t._v("invalid_search_hits_per_page")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-8-1-navigating-search-results-by-page-selection"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-1-navigating-search-results-by-page-selection"}},[t._v("#")]),t._v(" 3.1.8.1. Navigating search results by page selection")]),t._v(" "),a("p",[t._v("By default, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" are used to navigate search results. While being performant, it lacks exhaustiveness to create a seamless page selection navigation. Upon using "),a("code",[t._v("limit")]),t._v("/"),a("code",[t._v("offset")]),t._v(", "),a("code",[t._v("estimatedTotalHits")]),t._v(" is returned, which provides a rough estimation of how many hits may be candidates for a given request. See "),a("a",{attrs:{href:"#31811-limitoffset-usage"}},[a("code",[t._v("limit")]),t._v("/"),a("code",[t._v("offset")]),t._v(" usage")]),t._v(" for further explanation.")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("page selection")]),t._v(" system provides an alternative that tackles the above-mentioned issue when reliable information is needed to navigate results with a page selector. e.g. A page selector component "),a("code",[t._v("<< < 1, 2, 3, ...14 > >>")]),t._v(". Nonetheless, it's considered less performant on a larger number of results as the engine needs to compute the "),a("code",[t._v("totalHits")]),t._v(" exhaustively.\nWith this page selection system, it is possible to jump from one page to another using the "),a("code",[t._v("page")]),t._v(" parameter and decide how many results should be returned per page with the "),a("code",[t._v("hitsPerPage")]),t._v(" parameter. See "),a("a",{attrs:{href:"#31812-pagehitsperpage-usage"}},[a("code",[t._v("page")]),t._v("/"),a("code",[t._v("hitsPerPage")]),t._v(" usage")]),t._v(" for further explanation.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-8-1-1-limit-offset-usage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-1-1-limit-offset-usage"}},[t._v("#")]),t._v(" 3.1.8.1.1. Limit/offset usage")]),t._v(" "),a("p",[t._v("When either "),a("code",[t._v("limit")]),t._v(" or "),a("code",[t._v("offset")]),t._v(" is specified or when neither "),a("code",[t._v("limit")]),t._v(", "),a("code",[t._v("offset")]),t._v(", "),a("code",[t._v("page")]),t._v(" and "),a("code",[t._v("hitsPerPage")]),t._v(" are specified, the response object contains the related fields:")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"#324-estimatedtotalhits"}},[a("code",[t._v("estimatedTotalHits")])])]),t._v(" "),a("li",[a("a",{attrs:{href:"#322-limit"}},[a("code",[t._v("limit")])])]),t._v(" "),a("li",[a("a",{attrs:{href:"#323-offset"}},[a("code",[t._v("offset")])])])]),t._v(" "),a("p",[t._v("If in addition to "),a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(", either "),a("code",[t._v("page")]),t._v(" or "),a("code",[t._v("hitsPerPage")]),t._v(" is also provided, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" parameters are ignored.")]),t._v(" "),a("p",[t._v("For example, given the following query parameters:")]),t._v(" "),a("ul",[a("li",[t._v("limit: 10")]),t._v(" "),a("li",[t._v("offset: 1")])]),t._v(" "),a("p",[t._v("The response objects contain these specific fields:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... 10 hits")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... other fields")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"limit"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"offset"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"estimatedTotalHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1345")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("For example, on a query with no query parameters:")]),t._v(" "),a("p",[t._v("The response objects contain these specific fields:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... 10 hits")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... other fields")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"limit"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"offset"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"estimatedTotalHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1345")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h5",{attrs:{id:"_3-1-8-1-2-page-hitsperpage-usage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-1-2-page-hitsperpage-usage"}},[t._v("#")]),t._v(" 3.1.8.1.2 page/hitsPerPage usage")]),t._v(" "),a("p",[t._v("As soon as either "),a("code",[t._v("page")]),t._v(" or "),a("code",[t._v("hitsPerPage")]),t._v(" is used as a query parameter, in the response object, "),a("code",[t._v("limit")]),t._v(", "),a("code",[t._v("offset")]),t._v(", and "),a("code",[t._v("estimatedTotalHits")]),t._v(" are removed and page selection related fields are returned:")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"#326-hitsperpage"}},[a("code",[t._v("hitsPerPage")])]),t._v(": number of results per page.")]),t._v(" "),a("li",[a("a",{attrs:{href:"#325-page"}},[a("code",[t._v("page")])]),t._v(": current search results page. The counting starts at "),a("code",[t._v("1")]),t._v(".")]),t._v(" "),a("li",[a("a",{attrs:{href:"#327-totalpages"}},[a("code",[t._v("totalPages")])]),t._v(": total number of results pages. Calculated using "),a("code",[t._v("hitsPerPage")]),t._v(" value.")]),t._v(" "),a("li",[a("a",{attrs:{href:"#328-totalhits"}},[a("code",[t._v("totalHits")])]),t._v(": total number of search results.")])]),t._v(" "),a("p",[t._v("Both "),a("code",[t._v("totalPages")]),t._v(" and "),a("code",[t._v("totalHits")]),t._v(" are computed until they reach the "),a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#https://github.com/meilisearch/specifications/blob/main/text/157-pagination-setting-api.md#311-maxtotalhits"}},[a("code",[t._v("pagination.maxTotalHits")])]),t._v(" number from the settings.")],1),t._v(" "),a("p",[t._v("If in addition to either "),a("code",[t._v("page")]),t._v(" and/or "),a("code",[t._v("hitsPerPage")]),t._v(", "),a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are provided as well, "),a("code",[t._v("limit")]),t._v(" and "),a("code",[t._v("offset")]),t._v(" are ignored.")]),t._v(" "),a("p",[t._v("For example, given the following query parameters:")]),t._v(" "),a("ul",[a("li",[t._v("page: 2")]),t._v(" "),a("li",[t._v("hitsPerPage: 10")])]),t._v(" "),a("p",[t._v("The response objects contain these specific fields:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... 10 hits")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... other fields")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"page"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hitsPerPage"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2100")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalPages"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("210")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("For example, given the following query parameters:")]),t._v(" "),a("ul",[a("li",[t._v("page: 2")]),t._v(" "),a("li",[t._v("hitsPerPage: 10")]),t._v(" "),a("li",[t._v("limit: 1")])]),t._v(" "),a("p",[t._v("The response objects contain these specific fields:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... 10 hits")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... other fields")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"page"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hitsPerPage"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2100")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalPages"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("210")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("For example, given the following query parameters:")]),t._v(" "),a("ul",[a("li",[t._v("page: 0")]),t._v(" "),a("li",[t._v("hitsPerPage: 10")])]),t._v(" "),a("p",[t._v("The response objects contain these specific fields:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/// ... other fields")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"page"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hitsPerPage"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalHits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2100")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalPages"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("210")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h4",{attrs:{id:"_3-1-9-attributestoretrieve"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-9-attributestoretrieve"}},[t._v("#")]),t._v(" 3.1.9. "),a("code",[t._v("attributesToRetrieve")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of String (POST) | String (GET)")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v('["*"]')]),t._v(", meaning all the attributes")])]),t._v(" "),a("p",[t._v("Configures which attributes will be retrieved in the returned documents.")]),t._v(" "),a("p",[t._v("If no value is specified, the default value of "),a("code",[t._v("attributesToRetrieve")]),t._v(" is used ("),a("code",[t._v('["*"]')]),t._v("). This corresponds to the "),a("code",[t._v("displayedAttributes")]),t._v(" index setting, which by default contains all attributes found in the documents.")]),t._v(" "),a("blockquote",[a("p",[t._v("If an attribute is missing from "),a("code",[t._v("displayedAttributes")]),t._v(" index setting, "),a("code",[t._v("attributesToRetrieve")]),t._v(" silently ignore it, and the field doesn't appear in the returned search results.")])]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array of String")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("attributesToRetrieve")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_attributes_to_retrieve"}},[t._v("invalid_search_attributes_to_retrieve")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-10-attributestohighlight"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-10-attributestohighlight"}},[t._v("#")]),t._v(" 3.1.10. "),a("code",[t._v("attributesToHighlight")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of String (POST) | String(GET)")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("[]|null")])])]),t._v(" "),a("p",[t._v("Configures which fields may have highlighted parts, given that they match the requested query terms (i.e. the terms in the "),a("a",{attrs:{href:"#311-q"}},[a("code",[t._v("q")])]),t._v(" search parameter). Pre/post highlighting tags are applied around each word corresponding to a query term.")]),t._v(" "),a("p",[t._v("If "),a("code",[t._v("attributesToHighlight")]),t._v(" is present in the search query, the search results will include a "),a("code",[t._v("_formatted")]),t._v(" object containing the attributes and their highlighted parts. For more detailed regarding the "),a("code",[t._v("_formatted")]),t._v(" behavior, see the "),a("a",{attrs:{href:"#32112-formatted"}},[t._v("3.2.1.1.2. "),a("code",[t._v("_formatted")])]),t._v(" section.")]),t._v(" "),a("p",[t._v("If "),a("code",[t._v('"*"')]),t._v(" is provided as a value ("),a("code",[t._v('attributesToHighlight=["*"]')]),t._v("), all the attributes present in "),a("code",[t._v("displayedAttributes")]),t._v(" setting will be highlighted.")]),t._v(" "),a("p",[t._v("Highlighted parts are surrounded by the "),a("a",{attrs:{href:"3111-highlightpretag"}},[a("code",[t._v("highlightPreTag")])]),t._v(" and "),a("a",{attrs:{href:"#3112-highlightposttag"}},[a("code",[t._v("highlightPostTag")])]),t._v(" parameters.")]),t._v(" "),a("p",[a("code",[t._v("attributesToHighlight")]),t._v(" only works on values of the following types: "),a("code",[t._v("string")]),t._v(", "),a("code",[t._v("number")]),t._v(", "),a("code",[t._v("array")]),t._v(", "),a("code",[t._v("object")]),t._v(". When highlighted, number attributes are transformed to string.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array[String]")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("attributesToHighlight")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_attributes_to_highlight"}},[t._v("invalid_search_attributes_to_highlight")]),t._v(" error.")],1)]),t._v(" "),a("h5",{attrs:{id:"_3-1-10-1-searchableattributes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-10-1-searchableattributes"}},[t._v("#")]),t._v(" 3.1.10.1. searchableAttributes")]),t._v(" "),a("p",[t._v("Attributes not defined in the "),a("code",[t._v("searchableAttributes")]),t._v(" index setting are also highlighted if assigned to "),a("code",[t._v("attributesToHighlight")]),t._v(".")]),t._v(" "),a("h5",{attrs:{id:"_3-1-10-2-stopwords"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-10-2-stopwords"}},[t._v("#")]),t._v(" 3.1.10.2. stopWords")]),t._v(" "),a("p",[t._v("Attributes defined in the "),a("code",[t._v("stopWords")]),t._v(" index setting are also highlighted if matched.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-10-3-tokenizer-separators"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-10-3-tokenizer-separators"}},[t._v("#")]),t._v(" 3.1.10.3. Tokenizer Separators")]),t._v(" "),a("p",[t._v("Tokenizer separators are not highlighted.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-10-4-synonyms"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-10-4-synonyms"}},[t._v("#")]),t._v(" 3.1.10.4. synonyms")]),t._v(" "),a("p",[t._v("Synonyms are also highlighted.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-11-highlightpretag"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-11-highlightpretag"}},[t._v("#")]),t._v(" 3.1.11. "),a("code",[t._v("highlightPreTag")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v('""')])])]),t._v(" "),a("p",[t._v("Specifies the string to put "),a("strong",[t._v("before")]),t._v(" every highlighted query terms.")]),t._v(" "),a("p",[t._v("This parameter is applied to the fields configured in "),a("code",[t._v("attributesToHighlight")]),t._v(". If there are none, this parameter has no effect. See "),a("a",{attrs:{href:"3110-attributestohighlight"}},[t._v("3.1.10. "),a("code",[t._v("attributesToHighlight")])]),t._v(" section.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("String")]),t._v(" for "),a("code",[t._v("highlightPreTag")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_highlight_pre_tag"}},[t._v("invalid_search_highlight_pre_tag")]),t._v(" error.")],1)]),t._v(" "),a("p",[t._v("If "),a("code",[t._v("attributesToHighlight")]),t._v(" is omitted while "),a("code",[t._v("highlightPreTag")]),t._v(" is specified, there is no error.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-12-highlightposttag"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-12-highlightposttag"}},[t._v("#")]),t._v(" 3.1.12. "),a("code",[t._v("highlightPostTag")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v('""')])])]),t._v(" "),a("p",[t._v("Specifies the string to put "),a("strong",[t._v("after")]),t._v(" the highlighted query terms.")]),t._v(" "),a("p",[t._v("This parameter is applied to the fields from "),a("code",[t._v("attributesToHighlight")]),t._v(". If there are none, this parameter has no effect. See "),a("a",{attrs:{href:"3110-attributestohighlight"}},[t._v("3.1.10. "),a("code",[t._v("attributesToHighlight")])]),t._v(" section.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("String")]),t._v(" for "),a("code",[t._v("highlightPostTag")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_highlight_post_tag"}},[t._v("invalid_search_highlight_post_tag")]),t._v(" error.")],1)]),t._v(" "),a("p",[t._v("If "),a("code",[t._v("attributesToHighlight")]),t._v(" is omitted while "),a("code",[t._v("highlightPostTag")]),t._v(" is specified, there is no error.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-13-attributestocrop"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-13-attributestocrop"}},[t._v("#")]),t._v(" 3.1.13. "),a("code",[t._v("attributesToCrop")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array[String]|String")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("[]|null")])])]),t._v(" "),a("p",[t._v("Defines document attributes to be cropped. Cropped attributes have their values shortened around query terms.")]),t._v(" "),a("p",[t._v("If "),a("code",[t._v("attributesToCrop")]),t._v(" is present in the search query, the search results will include a "),a("code",[t._v("_formatted")]),t._v(" object containing the attributes and their cropped parts. For more detailed regarding the "),a("code",[t._v("_formatted")]),t._v(" behavior, see the "),a("a",{attrs:{href:"#32112-formatted"}},[t._v("3.2.1.1.2. "),a("code",[t._v("_formatted")])]),t._v(" section.")]),t._v(" "),a("p",[t._v("If "),a("code",[t._v('"*"')]),t._v(" is provided as a value ("),a("code",[t._v('attributesToCrop=["*"]')]),t._v("), all the attributes present in "),a("code",[t._v("displayedAttributes")]),t._v(" setting will be cropped.")]),t._v(" "),a("p",[t._v("The number of words contained in the cropped value is defined by the "),a("code",[t._v("cropLength")]),t._v(" parameter. See "),a("a",{attrs:{href:"#3114-croplength"}},[t._v("3.1.1.14. "),a("code",[t._v("cropLength")])]),t._v(" section.")]),t._v(" "),a("p",[t._v("The value of "),a("code",[t._v("cropLength")]),t._v(" can be customized per attribute. See "),a("a",{attrs:{href:"#31121-custom-croplength-defined-per-attribute"}},[t._v("3.1.12.1. Custom "),a("code",[t._v("cropLength")]),t._v(" Defined Per Cropped Attribute")]),t._v(" section.")]),t._v(" "),a("p",[t._v("The engine adds a marker by default in front of and/or behind the part selected by the cropper. This marker is customizable. See "),a("a",{attrs:{href:"#3115-cropmarker"}},[t._v("3.1.13. "),a("code",[t._v("cropMarker")])]),t._v(" section.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array[String]")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("attributesToCrop")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_attributes_to_crop"}},[t._v("invalid_search_attributes_to_crop")]),t._v(" error.")],1)]),t._v(" "),a("h5",{attrs:{id:"_3-1-13-2-searchableattributes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-13-2-searchableattributes"}},[t._v("#")]),t._v(" 3.1.13.2. searchableAttributes")]),t._v(" "),a("p",[t._v("Attributes configured in "),a("code",[t._v("attributesToCrop")]),t._v(" are cropped even if not present in the "),a("code",[t._v("searchableAttributes")]),t._v(" index setting.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-13-3-stopwords"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-13-3-stopwords"}},[t._v("#")]),t._v(" 3.1.13.3. stopWords")]),t._v(" "),a("p",[t._v("Terms defined in the "),a("code",[t._v("stopWords")]),t._v(" index setting are counted as words regarding "),a("code",[t._v("cropLength")]),t._v(".")]),t._v(" "),a("h5",{attrs:{id:"_3-1-13-3-tokenizer-separators"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-13-3-tokenizer-separators"}},[t._v("#")]),t._v(" 3.1.13.3. Tokenizer Separators")]),t._v(" "),a("p",[t._v("Tokenizer separators aren't counted as words regarding "),a("code",[t._v("cropLength")]),t._v(".")]),t._v(" "),a("h4",{attrs:{id:"_3-1-14-croplength"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-14-croplength"}},[t._v("#")]),t._v(" 3.1.14. "),a("code",[t._v("cropLength")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("10")])])]),t._v(" "),a("p",[t._v("Sets the total number of "),a("strong",[t._v("words")]),t._v(" to keep for the cropped part of an attribute specified in the "),a("code",[t._v("attributesToCrop")]),t._v(" parameter. It means that if "),a("code",[t._v("10")]),t._v(" is set for "),a("code",[t._v("cropLength")]),t._v(", the cropped part returned in "),a("code",[t._v("_formatted")]),t._v(" will only be 10 words long.")]),t._v(" "),a("p",[t._v("This parameter is applied to the fields from "),a("code",[t._v("attributesToCrop")]),t._v(". If there are none, this parameter has no effect. See "),a("a",{attrs:{href:"#3113-attributestocrop"}},[t._v("3.1.13. "),a("code",[t._v("attributesToCrop")])]),t._v(" section.")]),t._v(" "),a("p",[t._v("Sending a "),a("code",[t._v("0")]),t._v(" value deactivates the cropping unless a custom crop length is defined for an attribute inside "),a("code",[t._v("attributesToCrop")]),t._v(".")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Integer")]),t._v(" for "),a("code",[t._v("cropLength")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_crop_length"}},[t._v("invalid_search_crop_length")]),t._v(" error.")],1)]),t._v(" "),a("h5",{attrs:{id:"_3-1-14-1-custom-croplength-defined-per-attribute"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-14-1-custom-croplength-defined-per-attribute"}},[t._v("#")]),t._v(" 3.1.14.1. Custom "),a("code",[t._v("cropLength")]),t._v(" Defined Per Attribute.")]),t._v(" "),a("p",[t._v("Optionally, indicating a custom crop length for any of the listed attributes is possible:")]),t._v(" "),a("p",[a("code",[t._v('"attributesToCrop":["attributeNameA:15", "attributeNameB:30"]')])]),t._v(" "),a("p",[t._v("A custom crop length set in this way has priority over the "),a("code",[t._v("cropLength")]),t._v(" parameter.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-14-2-examples"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-14-2-examples"}},[t._v("#")]),t._v(" 3.1.14.2 Examples")]),t._v(" "),a("h6",{attrs:{id:"_3-1-14-1-1-extending-around"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-14-1-1-extending-around"}},[t._v("#")]),t._v(" 3.1.14.1.1. Extending around")]),t._v(" "),a("p",[t._v("Given an attribute defined in "),a("code",[t._v("attributesToCrop")]),t._v(" containing:")]),t._v(" "),a("p",[a("code",[t._v('"In his ravenous hatred he found no peace, and with boiling blood he scoured the umbral plains, seeking vengence afgainst the dark lords who had robbed him."')])]),t._v(" "),a("p",[t._v("With "),a("code",[t._v("croplength")]),t._v(" defined as "),a("code",[t._v("5")]),t._v(" and "),a("code",[t._v("q")]),t._v(" defined as "),a("code",[t._v("boiling blood")]),t._v(", the cropped value will be:")]),t._v(" "),a("p",[a("code",[t._v('"…and with boiling blood he…"')])]),t._v(" "),a("p",[t._v("Cropped query terms are counted as a word regarding "),a("code",[t._v("cropLength")]),t._v(".")]),t._v(" "),a("p",[t._v("Sending more query terms than the "),a("code",[t._v("cropLength")]),t._v(" value has no impact. The cropped part will contain the "),a("code",[t._v("cropLength")]),t._v(" number.")]),t._v(" "),a("h6",{attrs:{id:"_3-1-14-1-2-keeping-a-phrase-context"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-14-1-2-keeping-a-phrase-context"}},[t._v("#")]),t._v(" 3.1.14.1.2. Keeping a phrase context")]),t._v(" "),a("p",[t._v("After Meilisearch has chosen the best possible match window (some number of words < "),a("code",[t._v("cropLength")]),t._v("), it will add words from before or after the match window until the total number is equal to "),a("code",[t._v("cropLength")]),t._v(". In doing so, it will attempt to add context to the match window by choosing words from the same sentence(s) where the match window occurs.")]),t._v(" "),a("p",[t._v("For instance, for the matching word "),a("code",[t._v("Split")]),t._v(" the text:")]),t._v(" "),a("p",[a("code",[t._v('"Natalie risk her future. Split The World is a book written by Emily Henry. I never read it."')])]),t._v(" "),a("p",[t._v("will be cropped like:")]),t._v(" "),a("p",[a("code",[t._v("…Split The World is a book written by Emily Henry…")])]),t._v(" "),a("p",[t._v("and not like:")]),t._v(" "),a("p",[a("code",[t._v("Natalie risk her future. Split The World is a book…")])]),t._v(" "),a("h4",{attrs:{id:"_3-1-15-cropmarker"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-15-cropmarker"}},[t._v("#")]),t._v(" 3.1.15. "),a("code",[t._v("cropMarker")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v('"…"')]),t._v(" (U+2026)")])]),t._v(" "),a("p",[t._v("Sets which string to add before and/or after the cropped text. See "),a("a",{attrs:{href:"#3113-attributestocrop"}},[t._v("3.1.13. "),a("code",[t._v("attributesToCrop")])]),t._v(" section.")]),t._v(" "),a("p",[t._v("The specified crop marker is applied by following rules outline in section "),a("a",{attrs:{href:"#3115-cropmarker"}},[t._v("3.1.15.1. Applying "),a("code",[t._v("cropMarker")])]),t._v(".")]),t._v(" "),a("p",[t._v("Specifying "),a("code",[t._v("cropMarker")]),t._v(" to "),a("code",[t._v('""')]),t._v(" or "),a("code",[t._v("null")]),t._v(" implies that no marker will be applied to the cropped part.")]),t._v(" "),a("p",[t._v("This parameter is applied to the fields configured in "),a("code",[t._v("attributesToCrop")]),t._v(". If there are none, this parameter has no effect. See "),a("a",{attrs:{href:"#3113-attributestocrop"}},[t._v("3.1.13. "),a("code",[t._v("attributesToCrop")])]),t._v(" section.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("String")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("cropMarker")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_crop_marker"}},[t._v("invalid_search_crop_marker")]),t._v(" error.")],1)]),t._v(" "),a("h5",{attrs:{id:"_3-1-15-1-applying-cropmarker"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-15-1-applying-cropmarker"}},[t._v("#")]),t._v(" 3.1.15.1. Applying "),a("code",[t._v("cropMarker")])]),t._v(" "),a("h6",{attrs:{id:"_3-1-15-1-1-matched-part-to-be-cropped"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-15-1-1-matched-part-to-be-cropped"}},[t._v("#")]),t._v(" 3.1.15.1.1. Matched Part To Be Cropped")]),t._v(" "),a("p",[t._v("The cropping algorithm tries to match the window with the highest density of query terms within the "),a("code",[t._v("cropLength")]),t._v(" limit.")]),t._v(" "),a("p",[t._v("The cropping algorithm tries to find the crop window that contains the most relevant matches.")]),t._v(" "),a("ol",[a("li",[t._v("That has the highest count of unique matches")])]),t._v(" "),a("p",[t._v("For example, for the query terms "),a("code",[t._v("split the world")]),t._v(", then the interval "),a("code",[t._v("the split the split the")]),t._v(" has "),a("code",[t._v("5")]),t._v(" matches but only "),a("code",[t._v("2")]),t._v(" unique matches ("),a("code",[t._v("1")]),t._v(" for "),a("code",[t._v("split")]),t._v(" and "),a("code",[t._v("1")]),t._v(" for "),a("code",[t._v("the")]),t._v(") where the interval "),a("code",[t._v("split of the world")]),t._v(" has "),a("code",[t._v("3")]),t._v(" matches and "),a("code",[t._v("3")]),t._v(" unique matches. So the interval "),a("code",[t._v("split of the world")]),t._v(" is considered better.")]),t._v(" "),a("ol",{attrs:{start:"2"}},[a("li",[t._v("That have the minimum distance between matches")])]),t._v(" "),a("p",[t._v("For example, for the query terms "),a("code",[t._v("split the world")]),t._v(", then the interval "),a("code",[t._v("split of the world")]),t._v(" has a distance of "),a("code",[t._v("3")]),t._v(" ("),a("code",[t._v("2")]),t._v(" between "),a("code",[t._v("split")]),t._v(" and "),a("code",[t._v("the")]),t._v(", and "),a("code",[t._v("1")]),t._v(" between "),a("code",[t._v("the")]),t._v(" and "),a("code",[t._v("world")]),t._v(") where the interval "),a("code",[t._v("split the world")]),t._v(" has a distance of "),a("code",[t._v("2")]),t._v(". So the interval "),a("code",[t._v("split the world")]),t._v(" is considered better.")]),t._v(" "),a("ol",{attrs:{start:"3"}},[a("li",[t._v("That have the highest count of ordered matches")])]),t._v(" "),a("p",[t._v("For example, for the query terms "),a("code",[t._v("split the world")]),t._v(", then the interval "),a("code",[t._v("the world split")]),t._v(" has "),a("code",[t._v("2")]),t._v(" ordered words where the interval "),a("code",[t._v("split the world")]),t._v(" has "),a("code",[t._v("3")]),t._v(". So the interval "),a("code",[t._v("split the world")]),t._v(" is considered better.")]),t._v(" "),a("p",[t._v("Only one cropped part from an attribute is returned.")]),t._v(" "),a("p",[t._v("If no part is found when selecting a part to be cropped, the returned value in "),a("code",[t._v("_formatted")]),t._v(" will start at the beginning of the attribute and include a number of words equal to "),a("code",[t._v("cropLength")]),t._v(".")]),t._v(" "),a("h6",{attrs:{id:"_3-1-15-1-2-positioning-markers"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-15-1-2-positioning-markers"}},[t._v("#")]),t._v(" 3.1.15.1.2. Positioning Markers")]),t._v(" "),a("p",[t._v("If the cropped part has been matched against query terms and contains the beginning of the attribute to be cropped, the "),a("code",[t._v("cropMarker")]),t._v(" is not placed to the left of the cropped part.")]),t._v(" "),a("p",[t._v("If the cropped part has been matched against query terms and contains the end of the attribute to be cropped, the "),a("code",[t._v("cropMarker")]),t._v(" is not placed to the right of the cropped part.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-16-showmatchesposition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-16-showmatchesposition"}},[t._v("#")]),t._v(" 3.1.16. "),a("code",[t._v("showMatchesPosition")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Boolean")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("false")])])]),t._v(" "),a("p",[t._v("Adds a "),a("code",[t._v("_matchesPosition")]),t._v(" object to the search response that contains the location of each occurrence of queried terms across all fields. The given positions are in bytes.")]),t._v(" "),a("p",[t._v("It's useful when more control is needed than offered by the built-in highlighting/cropping features.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Boolean")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("showMatchesPosition")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_show_matches_position"}},[t._v("invalid_search_show_matches_position")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-17-showrankingscore"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-17-showrankingscore"}},[t._v("#")]),t._v(" 3.1.17. "),a("code",[t._v("showRankingScore")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Boolean")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("false")])])]),t._v(" "),a("p",[t._v("Adds a "),a("a",{attrs:{href:"#32114-rankingscore"}},[a("code",[t._v("_rankingScore")])]),t._v(" number to each document in the search response, representing the relevancy score of a document according to the applied ranking rules and relative to a search query. Higher is better.")]),t._v(" "),a("p",[a("code",[t._v("1.0")]),t._v(" indicates a perfect match, "),a("code",[t._v("0.0")]),t._v(" no match at all (Meilisearch should not return documents that don't match the query).")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Boolean")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("showRankingScore")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_show_ranking_score"}},[t._v("invalid_search_ranking_score")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-18-showrankingscoredetails"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-18-showrankingscoredetails"}},[t._v("#")]),t._v(" 3.1.18. "),a("code",[t._v("showRankingScoreDetails")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Object")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("false")])])]),t._v(" "),a("p",[t._v("Adds a "),a("a",{attrs:{href:"#32115-rankingscoredetails"}},[a("code",[t._v("_rankingScoreDetails")])]),t._v(" object to each document in the search response, containing information about the score of that document for each applied ranking rule.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Boolean")]),t._v(" or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("showRankingScoreDetails")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_show_ranking_score_details"}},[t._v("invalid_search_ranking_score_details")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-19-matchingstrategy"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-19-matchingstrategy"}},[t._v("#")]),t._v(" 3.1.19. "),a("code",[t._v("matchingStrategy")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("last")])])]),t._v(" "),a("p",[t._v("Defines which strategy to use to match the query terms within the documents as search results.")]),t._v(" "),a("p",[t._v("Two different strategies are available, "),a("code",[t._v("last")]),t._v(" and "),a("code",[t._v("all")]),t._v(". By default, the "),a("code",[t._v("last")]),t._v(" strategy is chosen.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("String")]),t._v(" and other than "),a("code",[t._v("last")]),t._v(" or "),a("code",[t._v("all")]),t._v(" as a value for "),a("code",[t._v("matchingStrategy")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_matching_strategy"}},[t._v("invalid_search_matching_strategy")]),t._v(" error.")],1)]),t._v(" "),a("h5",{attrs:{id:"_3-1-19-1-last-strategy"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-19-1-last-strategy"}},[t._v("#")]),t._v(" 3.1.19.1. "),a("code",[t._v("last")]),t._v(" strategy")]),t._v(" "),a("p",[t._v("The documents containing ALL the query words (i.e. in the "),a("code",[t._v("q")]),t._v(" parameter) are returned first by Meilisearch. If Meilisearch doesn't have enough documents to fit the requested "),a("code",[t._v("limit")]),t._v(", it iteratively ignores the query words from the last typed word to the first typed word to match more documents.")]),t._v(" "),a("h5",{attrs:{id:"_3-1-19-2-all-strategy"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-19-2-all-strategy"}},[t._v("#")]),t._v(" 3.1.19.2. "),a("code",[t._v("all")]),t._v(" strategy")]),t._v(" "),a("p",[t._v("Only the documents containing ALL the query words (i.e. in the "),a("code",[t._v("q")]),t._v(" parameter) are returned by Meilisearch. If Meilisearch doesn't have enough documents to fit the requested "),a("code",[t._v("limit")]),t._v(", it returns the documents found without trying to match more documents.")]),t._v(" "),a("h4",{attrs:{id:"_3-1-20-attributestosearchon"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-20-attributestosearchon"}},[t._v("#")]),t._v(" 3.1.20. "),a("code",[t._v("attributesToSearchOn")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of String (POST) | String (GET)")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v('["*"]')])])]),t._v(" "),a("p",[t._v("Defines which "),a("code",[t._v("searchableAttributes")]),t._v(" the query will search on.")]),t._v(" "),a("ul",[a("li",[t._v("If "),a("code",[t._v("attributesToSearchOn")]),t._v(" is not set, set to "),a("code",[t._v('["*"]')]),t._v(" or set to "),a("code",[t._v("null")]),t._v(", then the query will search on all "),a("code",[t._v("searchableAttributes")]),t._v(".")]),t._v(" "),a("li",[t._v("Sending the attributes in a different order than the order set in the settings "),a("code",[t._v("searchableAttributes")]),t._v(" doesn't reorder the fields' rank for the "),a("code",[t._v("Attributes")]),t._v(" ranking rule")]),t._v(" "),a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array of String")]),t._v("(POST), "),a("code",[t._v("String")]),t._v("(GET) or "),a("code",[t._v("null")]),t._v(" for "),a("code",[t._v("attributesToSearchOn")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_attributes_to_search_on"}},[t._v("invalid_attributes_to_search_on")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending an attribute that is not part of the settings "),a("code",[t._v("searchableAttributes")]),t._v(" list returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_attributes_to_search_on"}},[t._v("invalid_attributes_to_search_on")]),t._v(" error.")],1)]),t._v(" "),a("h4",{attrs:{id:"_3-1-21-vector-experimental"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-21-vector-experimental"}},[t._v("#")]),t._v(" 3.1.21. "),a("code",[t._v("vector")]),t._v(" "),a("code",[t._v("EXPERIMENTAL")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of Float")]),t._v(" "),a("li",[t._v("Required: False")]),t._v(" "),a("li",[t._v("Default: []")])]),t._v(" "),a("p",[t._v("Request the nearest documents based on the query vector embedding given.")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Sending a value with a different type than "),a("code",[t._v("Array of Float")]),t._v(" or "),a("code",[t._v("null")]),t._v(" as a value for "),a("code",[t._v("vector")]),t._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_vector"}},[t._v("invalid_search_vector")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 Sending a value for "),a("code",[t._v("vector")]),t._v(" whose length differs from the documents "),a("code",[t._v("_vectors")]),t._v(" length returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_search_vector"}},[t._v("invalid_search_vector")]),t._v(" error.")],1)]),t._v(" "),a("h3",{attrs:{id:"_3-2-search-response-properties"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-search-response-properties"}},[t._v("#")]),t._v(" 3.2. Search Response Properties")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Field")]),t._v(" "),a("th",[t._v("Type")]),t._v(" "),a("th",[t._v("Required")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[a("a",{attrs:{href:"#321-hits"}},[a("code",[t._v("hits")])])]),t._v(" "),a("td",[t._v("Array[Hit]")]),t._v(" "),a("td",[t._v("True")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#322-limit"}},[a("code",[t._v("limit")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#323-offset"}},[a("code",[t._v("offset")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#324-estimatedTotalHits"}},[a("code",[t._v("estimatedTotalHits")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#325-page"}},[a("code",[t._v("page")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#326-hitsperpage"}},[a("code",[t._v("hitsPerPage")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#327-totalpages"}},[a("code",[t._v("totalPages")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#328-totalhits"}},[a("code",[t._v("totalHits")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#329-facetdistribution"}},[a("code",[t._v("facetDistribution")])])]),t._v(" "),a("td",[t._v("Object")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3210-facetstats"}},[a("code",[t._v("facetStats")])])]),t._v(" "),a("td",[t._v("Object")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3211-processingtimems"}},[a("code",[t._v("processingTimeMs")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("True")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3212-query"}},[a("code",[t._v("query")])])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("True")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#3213-vector"}},[a("code",[t._v("vector")])]),t._v(" "),a("code",[t._v("EXPERIMENTAL")])]),t._v(" "),a("td",[t._v("Array of Float")]),t._v(" "),a("td",[t._v("False")])])])]),t._v(" "),a("h4",{attrs:{id:"_3-2-1-hits"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-hits"}},[t._v("#")]),t._v(" 3.2.1. "),a("code",[t._v("hits")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array[Hit]")]),t._v(" "),a("li",[t._v("Required: True")])]),t._v(" "),a("p",[t._v("Results of the search query as an array of documents.")]),t._v(" "),a("blockquote",[a("p",[t._v("Hit object represents a matched document as a search result.")])]),t._v(" "),a("blockquote",[a("p",[t._v("The search parameters "),a("code",[t._v("attributesToRetrieve")]),t._v(" influence the returned payload for a hit. See "),a("a",{attrs:{href:"#319-attributestoretrieve"}},[t._v("3.1.7. "),a("code",[t._v("attributesToRetrieve")])]),t._v(" section.")])]),t._v(" "),a("p",[t._v("A search result can contain special properties. See "),a("a",{attrs:{href:"#3211-hit-special-properties"}},[t._v("3.2.1.1. "),a("code",[t._v("hit")]),t._v(" Special Properties")]),t._v(" section.")]),t._v(" "),a("h5",{attrs:{id:"_3-2-1-1-hit-special-properties"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-hit-special-properties"}},[t._v("#")]),t._v(" 3.2.1.1. "),a("code",[t._v("hit")]),t._v(" Special Properties")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Field")]),t._v(" "),a("th",[t._v("Type")]),t._v(" "),a("th",[t._v("Required")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[a("a",{attrs:{href:"#32111-geodistance"}},[a("code",[t._v("_geoDistance")])])]),t._v(" "),a("td",[t._v("Integer")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#32112-formatted"}},[a("code",[t._v("_formatted")])])]),t._v(" "),a("td",[t._v("Object")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#32113-matchesposition"}},[a("code",[t._v("_matchesPosition")])])]),t._v(" "),a("td",[t._v("Object")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#32114-rankingscore"}},[a("code",[t._v("_rankingScore")])])]),t._v(" "),a("td",[t._v("Number")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#32115-rankingscoredetails"}},[a("code",[t._v("_rankingScoreDetails")])])]),t._v(" "),a("td",[t._v("Object")]),t._v(" "),a("td",[t._v("False")])]),t._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#32116-semanticscore"}},[a("code",[t._v("_semanticScore")])]),t._v(" "),a("code",[t._v("EXPERIMENTAL")])]),t._v(" "),a("td",[t._v("Float")]),t._v(" "),a("td",[t._v("False")])])])]),t._v(" "),a("h6",{attrs:{id:"_3-2-1-1-1-geodistance"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-1-geodistance"}},[t._v("#")]),t._v(" 3.2.1.1.1. "),a("code",[t._v("_geoDistance")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Search queries using "),a("code",[t._v("_geoPoint")]),t._v(" returns a "),a("code",[t._v("_geoDistance")]),t._v(" field containing the distance in meters between the document "),a("code",[t._v("_geo")]),t._v(" coordinates and the specified "),a("code",[t._v("_geoPoint")]),t._v(".")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0059-geo-search.html"}},[t._v("GeoSearch")])],1)]),t._v(" "),a("h6",{attrs:{id:"_3-2-1-1-2-formatted"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-2-formatted"}},[t._v("#")]),t._v(" 3.2.1.1.2. "),a("code",[t._v("_formatted")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Object")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[a("code",[t._v("_formatted")]),t._v(" is an object returned in the search response, only if at least one of the following paramaters has been set in the search query:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("attributesToHighlight")])]),t._v(" "),a("li",[a("code",[t._v("attributesToCrop")])])]),t._v(" "),a("p",[t._v("If "),a("code",[t._v("attributesToHighlight")]),t._v(" and "),a("code",[t._v("attributesToCrop")]),t._v(" are not set, "),a("code",[t._v("_formatted")]),t._v(" is not returned.")]),t._v(" "),a("p",[t._v("This "),a("code",[t._v("_formatted")]),t._v(" object will be present in each returned document in the "),a("code",[t._v("hits")]),t._v(" field.")]),t._v(" "),a("p",[t._v("Example:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToCrop"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Pride and Prejudice"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"_formatted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Pride and Prejudice"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("456")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Le Petit Prince"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"_formatted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"456"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Le Petit Prince"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Which attributes are present in "),a("code",[t._v("_formatted")]),t._v("?")]),t._v(" "),a("p",[a("em",[t._v("Remember the main rule: "),a("code",[t._v("_formatted")]),t._v(" is only present if "),a("code",[t._v("attributesToHighlight")]),t._v(" or "),a("code",[t._v("attributesToCrop")]),t._v(" is set.")])]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("_formatted")]),t._v(" object contains attributes coming from the original document, depending on the parameters the users set during the search query. Indeed, "),a("strong",[a("code",[t._v("_formatted")]),t._v(" contains all the attributes present in "),a("code",[t._v("attributesToRetrieve")]),t._v(", "),a("code",[t._v("attributesToHighlight")]),t._v(", and "),a("code",[t._v("attributesToCrop")]),t._v(" combined")]),t._v(".")]),t._v(" "),a("p",[t._v("Knowing the default value of "),a("code",[t._v("attributesToRetrieve")]),t._v(" is "),a("code",[t._v('["*"]')]),t._v(" (so all the attributes present in "),a("code",[t._v("displayedAttributes")]),t._v("), if no "),a("code",[t._v("attributesToRetrieve")]),t._v(" are set in the search query, "),a("code",[t._v("_formatted")]),t._v(" will return all the "),a("code",[t._v("displayedAttributes")]),t._v(".")]),t._v(" "),a("p",[t._v("Returning attributes in the "),a("code",[t._v("_formatted")]),t._v(" object does not mean these attributes will be necessarily highlighted or cropped, see the next point.")]),t._v(" "),a("p",[t._v("Which attributes are highlighted or cropped in "),a("code",[t._v("_formatted")]),t._v("?")]),t._v(" "),a("p",[t._v("No matter which attributes are retrieved in "),a("code",[t._v("_formatted")]),t._v(' (according to the previous section "Which attributes are present in '),a("code",[t._v("_formatted")]),t._v('?"):')]),t._v(" "),a("ul",[a("li",[t._v("Only the attributes present in "),a("code",[t._v("attributesToHighlight")]),t._v(" are highlighted.")]),t._v(" "),a("li",[t._v("Only the attributes present in "),a("code",[t._v("attributesToCrop")]),t._v(" are cropped.")]),t._v(" "),a("li",[t._v("Attributes present in both are cropped and highlighted at the same time.")])]),t._v(" "),a("p",[t._v("Some edge cases:")]),t._v(" "),a("ul",[a("li",[t._v("If cumulated fields in "),a("code",[t._v("attributesToHighlight")]),t._v(" and "),a("code",[t._v("attributesToCrop")]),t._v(" resolve to only having non-existent fields, "),a("code",[t._v("_formatted")]),t._v(" is not returned.")])]),t._v(" "),a("p",[t._v("Some examples:\n"),a("em",[t._v("The examples work the same with "),a("code",[t._v("attributesToCrop")])])]),t._v(" "),a("p",[t._v("Example 1:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToHighlight"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Hobbit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"_formatted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Hobbit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("-> All the attributes (so "),a("code",[t._v("id")]),t._v(", "),a("code",[t._v("title")]),t._v(" and "),a("code",[t._v("author")]),t._v(") are returned in "),a("code",[t._v("_formatted")]),t._v(" because by default "),a("code",[t._v("attributesToRetrieve")]),t._v(" is set to "),a("code",[t._v('["*"]')]),t._v(".\n-> Only "),a("code",[t._v("title")]),t._v(" is highlighted.")]),t._v(" "),a("p",[t._v("Example 2:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToHighlight"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"*"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Hobbit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"_formatted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Hobbit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("-> "),a("code",[t._v("id")]),t._v(", "),a("code",[t._v("title")]),t._v(" and "),a("code",[t._v("author")]),t._v(" are returned in "),a("code",[t._v("_formatted")]),t._v(" because"),a("code",[t._v("attributesToHighlight")]),t._v(" is set to "),a("code",[t._v('["*"]')]),t._v(" (but also "),a("code",[t._v("attributesToRetrieve")]),t._v(" by default).\n-> Both "),a("code",[t._v("title")]),t._v(" and "),a("code",[t._v("author")]),t._v(" are highlighted because "),a("code",[t._v("attributesToHighlight")]),t._v(" is set to "),a("code",[t._v('["*"]')]),t._v(".")]),t._v(" "),a("p",[t._v("Example 3:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToRetrieve"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToHighlight"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"_formatted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Hobbit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("-> Only "),a("code",[t._v("author")]),t._v(" is returned at the root of the document because defined in the "),a("code",[t._v("attributesToRetrieve")]),t._v(".\n-> Only "),a("code",[t._v("author")]),t._v(" and "),a("code",[t._v("title")]),t._v(" are returned in "),a("code",[t._v("_formatted")]),t._v(" because the addition of "),a("code",[t._v("attributesToRetrieve")]),t._v(" and "),a("code",[t._v("attributesToHighlight")]),t._v(".\n-> Only "),a("code",[t._v("title")]),t._v(" is highlighted because the only one defined in "),a("code",[t._v("attributesToHighlight")]),t._v(".")]),t._v(" "),a("p",[t._v("Example 4:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToRetrieve"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"attributesToHighlight"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"*"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"_formatted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Hobbit"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"J. R. R. Tolkien"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ...\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("-> No attributes are returned at the root of the document because "),a("code",[t._v("attributesToRetrieve")]),t._v(" is set to "),a("code",[t._v("[]")]),t._v(".\n-> All the attributes are returned in "),a("code",[t._v("_formatted")]),t._v(" because "),a("code",[t._v("attributesToHighlight")]),t._v(" is set to "),a("code",[t._v('["*"]')]),t._v(".\n-> All the attributes are highlighted because "),a("code",[t._v("attributesToHighlight")]),t._v(" is set to "),a("code",[t._v('["*"]')]),t._v(".")]),t._v(" "),a("h6",{attrs:{id:"_3-2-1-1-3-matchesposition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-3-matchesposition"}},[t._v("#")]),t._v(" 3.2.1.1.3. "),a("code",[t._v("_matchesPosition")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Object")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Contains the location of each occurrence of queried terms across all fields. The "),a("code",[t._v("_matchesPosition")]),t._v(" object is added to a search result when the "),a("code",[t._v("showMatchesPosition")]),t._v(" search parameter is specified to true.")]),t._v(" "),a("p",[t._v("The beginning of a matching term within a field is indicated by "),a("code",[t._v("start")]),t._v(", and its "),a("code",[t._v("length")]),t._v(" by length.")]),t._v(" "),a("p",[a("code",[t._v("start")]),t._v(" and "),a("code",[t._v("length")]),t._v(" are measured in bytes and not the number of characters. For example, "),a("code",[t._v("ü")]),t._v(" represents two bytes but one character.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#3116-showmatchesposition"}},[t._v("3.1.14. "),a("code",[t._v("showMatchesPosition")])]),t._v(" section.")])]),t._v(" "),a("h6",{attrs:{id:"_3-2-1-1-4-rankingscore"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-4-rankingscore"}},[t._v("#")]),t._v(" 3.2.1.1.4. "),a("code",[t._v("_rankingScore")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Number")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("The relevancy score of a document relative to the search query. Higher is better.")]),t._v(" "),a("p",[a("code",[t._v("1.0")]),t._v(" indicates a perfect match, "),a("code",[t._v("0.0")]),t._v(" no match at all (Meilisearch should not return documents that don't match the query).")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0195-ranking-score.html#31-ranking-score"}},[t._v("Ranking Score")]),t._v(" for details.")],1)]),t._v(" "),a("h6",{attrs:{id:"_3-2-1-1-5-rankingscoredetails"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-5-rankingscoredetails"}},[t._v("#")]),t._v(" 3.2.1.1.5. "),a("code",[t._v("_rankingScoreDetails")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Object")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("The ranking score of a document per each ranking rule and relative to the search query.")]),t._v(" "),a("p",[t._v("This object features one field for each applied ranking rule, whose values are an object with at least the field "),a("code",[t._v("order")]),t._v(" indicating in which order this ranking rule has been applied.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0195-ranking-score.html#32-ranking-score-details"}},[t._v("Ranking Score details")]),t._v(" for details.")],1)]),t._v(" "),a("h6",{attrs:{id:"_3-2-1-1-6-semanticscore-experimental"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-6-semanticscore-experimental"}},[t._v("#")]),t._v(" 3.2.1.1.6. "),a("code",[t._v("_semanticScore")]),t._v(" "),a("code",[t._v("EXPERIMENTAL")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Float")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Contains the semantic similarity score of the document for a vector search when "),a("code",[t._v("vector")]),t._v(" has been provided. The score is represented as a dot product.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#3118-vector-experimental"}},[t._v("3.1.18 "),a("code",[t._v("vector")])])])]),t._v(" "),a("h4",{attrs:{id:"_3-2-2-limit"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-limit"}},[t._v("#")]),t._v(" 3.2.2. "),a("code",[t._v("limit")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the "),a("code",[t._v("limit")]),t._v(" search parameter used for the query.\nThis field is returned only when:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are used as query parameters.")]),t._v(" "),a("li",[t._v("None of "),a("code",[t._v("limit")]),t._v(", "),a("code",[t._v("offset")]),t._v(", "),a("code",[t._v("page")]),t._v(", "),a("code",[t._v("hitsPerPage")]),t._v(" are used as a query parameter")])]),t._v(" "),a("p",[t._v("See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(" on the different ways of navigating search results.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#315-limit"}},[t._v("3.1.5. "),a("code",[t._v("limit")])]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-3-offset"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-offset"}},[t._v("#")]),t._v(" 3.2.3. "),a("code",[t._v("offset")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the "),a("code",[t._v("offset")]),t._v(" search parameter used for the query.\nThis field is returned only when none of "),a("code",[t._v("page")]),t._v(" and "),a("code",[t._v("hitsPerPage")]),t._v(" are used as a query parameter.")]),t._v(" "),a("p",[t._v("See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("explanation")]),t._v(" on the different ways of navigating search results.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#316-offset"}},[t._v("3.1.6. "),a("code",[t._v("offset")]),t._v(" section")]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-4-estimatedtotalhits"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-estimatedtotalhits"}},[t._v("#")]),t._v(" 3.2.4. "),a("code",[t._v("estimatedTotalHits")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the estimated number of candidates for the search query. This field is returned only when "),a("code",[t._v("limit")]),t._v(" or/and "),a("code",[t._v("offset")]),t._v(" are used as a query parameter.")]),t._v(" "),a("p",[t._v("This field is returned only when:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("limit")]),t._v(" and/or "),a("code",[t._v("offset")]),t._v(" are used as query parameters.")]),t._v(" "),a("li",[t._v("None of "),a("code",[t._v("limit")]),t._v(", "),a("code",[t._v("offset")]),t._v(", "),a("code",[t._v("page")]),t._v(", "),a("code",[t._v("hitsPerPage")]),t._v(" are used as a query parameter")])]),t._v(" "),a("p",[t._v("See "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(" on the different ways of navigation search results.")]),t._v(" "),a("h4",{attrs:{id:"_3-2-5-page"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-5-page"}},[t._v("#")]),t._v(" 3.2.5. "),a("code",[t._v("page")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the current search results page. This field is returned only when the "),a("code",[t._v("page selection")]),t._v(" feature is enabled; see "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(".")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#317-page"}},[t._v("3.1.7. "),a("code",[t._v("page")]),t._v(" section")]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-6-hitsperpage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-6-hitsperpage"}},[t._v("#")]),t._v(" 3.2.6. "),a("code",[t._v("hitsPerPage")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the number of results per page. This field is returned only when the "),a("code",[t._v("page selection")]),t._v(" feature is enabled; see "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(".")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#318-hitsperpage"}},[t._v("3.1.7. "),a("code",[t._v("hitsPerPage")]),t._v(" section")]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-7-totalpages"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-7-totalpages"}},[t._v("#")]),t._v(" 3.2.7. "),a("code",[t._v("totalPages")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the total number of results pages. Calculated using ["),a("code",[t._v("hitsPerPage")]),t._v("]. Both "),a("code",[t._v("totalPages")]),t._v(" and "),a("code",[t._v("totalHits")]),t._v(" are computed until they reach the "),a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#https://github.com/meilisearch/specifications/blob/main/text/157-pagination-setting-api.md#311-maxtotalhits"}},[a("code",[t._v("pagination.maxTotalHits")])]),t._v(" number from the settings.")],1),t._v(" "),a("p",[t._v("This field is returned only when the "),a("code",[t._v("page selection")]),t._v(" feature is enabled; see "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(".")]),t._v(" "),a("h4",{attrs:{id:"_3-2-8-totalhits"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-8-totalhits"}},[t._v("#")]),t._v(" 3.2.8. "),a("code",[t._v("totalHits")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Returns the total number of search results. Both "),a("code",[t._v("totalPages")]),t._v(" and "),a("code",[t._v("totalHits")]),t._v(" are computed until they reach the "),a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#https://github.com/meilisearch/specifications/blob/main/text/157-pagination-setting-api.md#311-maxtotalhits"}},[a("code",[t._v("pagination.maxTotalHits")])]),t._v(" number from the settings.")],1),t._v(" "),a("p",[t._v("This field is returned only when the "),a("code",[t._v("page selection")]),t._v(" feature is enabled, see "),a("a",{attrs:{href:"#3181-navigating-search-results-by-page-selection"}},[t._v("details")]),t._v(".")]),t._v(" "),a("h4",{attrs:{id:"_3-2-9-facetdistribution"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-9-facetdistribution"}},[t._v("#")]),t._v(" 3.2.9. "),a("code",[t._v("facetDistribution")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Object")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Added to the search response when "),a("code",[t._v("facets")]),t._v(" is set for a search query. It contains the number of remaining candidates for each specified facet in the "),a("code",[t._v("facets")]),t._v(" search parameter.")]),t._v(" "),a("p",[t._v("If a field distributed as a facet contains no value, it is returned as a "),a("code",[t._v("facetDistribution")]),t._v(" field with an empty object as value.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#314-facets"}},[t._v("3.1.4. "),a("code",[t._v("facets")])]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-10-facetstats"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-10-facetstats"}},[t._v("#")]),t._v(" 3.2.10. "),a("code",[t._v("facetStats")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Object")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("When using the "),a("code",[t._v("facets")]),t._v(" parameter, the distributed facets that contain some numeric values are displayed in a "),a("code",[t._v("facetStats")]),t._v(" object that contains, per facet, the numeric "),a("code",[t._v("min")]),t._v(" and "),a("code",[t._v("max")]),t._v(" values for that facet of all documents matching the search query.")]),t._v(" "),a("p",[t._v("If none of the hits returned by the search query have a numeric value for a facet, this facet is not part of the "),a("code",[t._v("facetStats")]),t._v(" object.")]),t._v(" "),a("p",[t._v("It ignores string values even if parseable. e.g "),a("code",[t._v('"21"')]),t._v(" isn't considered by the engine when computing the "),a("code",[t._v("facetStats")]),t._v(" "),a("code",[t._v("min")]),t._v(" and "),a("code",[t._v("max")]),t._v(".")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#314-facets"}},[t._v("3.1.4. "),a("code",[t._v("facets")])]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-11-processingtimems"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-11-processingtimems"}},[t._v("#")]),t._v(" 3.2.11. "),a("code",[t._v("processingTimeMs")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Integer")]),t._v(" "),a("li",[t._v("Required: True")])]),t._v(" "),a("p",[t._v("Processing time of the search query in "),a("strong",[t._v("milliseconds")]),t._v(".")]),t._v(" "),a("h4",{attrs:{id:"_3-2-12-query"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-12-query"}},[t._v("#")]),t._v(" 3.2.12. "),a("code",[t._v("query")])]),t._v(" "),a("ul",[a("li",[t._v("Type: String")]),t._v(" "),a("li",[t._v("Required: True")]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v('""')])])]),t._v(" "),a("p",[t._v("Query originating the response. Equals to the "),a("code",[t._v("q")]),t._v(" search parameter.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#311-q"}},[t._v("3.1.1. "),a("code",[t._v("q")])]),t._v(" section.")])]),t._v(" "),a("h4",{attrs:{id:"_3-2-13-vector-experimental"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-13-vector-experimental"}},[t._v("#")]),t._v(" 3.2.13. "),a("code",[t._v("vector")]),t._v(" "),a("code",[t._v("EXPERIMENTAL")])]),t._v(" "),a("ul",[a("li",[t._v("Type: Array of Float")]),t._v(" "),a("li",[t._v("Required: False")])]),t._v(" "),a("p",[t._v("Vector query embedding originating the response. Equals to the "),a("code",[t._v("vector")]),t._v(" search parameter if specified.")]),t._v(" "),a("blockquote",[a("p",[t._v("See "),a("a",{attrs:{href:"#3118-vector-experimental"}},[t._v("3.1.18. "),a("code",[t._v("vector")])])])]),t._v(" "),a("h2",{attrs:{id:"_2-technical-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-details"}},[t._v("#")]),t._v(" 2. Technical Details")]),t._v(" "),a("p",[t._v("n/a")]),t._v(" "),a("h2",{attrs:{id:"_3-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[t._v("#")]),t._v(" 3. Future Possibilities")]),t._v(" "),a("ul",[a("li",[t._v("Add dedicated errors to replace "),a("code",[t._v("bad_request")]),t._v(" error.")])]),t._v(" "),a("h3",{attrs:{id:"_3-1-formatting-search-results"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-formatting-search-results"}},[t._v("#")]),t._v(" 3.1. Formatting Search Results")]),t._v(" "),a("ul",[a("li",[t._v("Replaces "),a("code",[t._v("_matchesPosition")]),t._v(" with chars position instead of bytes. It could also be a "),a("code",[t._v("mode")]),t._v(" to choose "),a("code",[t._v("byte")]),t._v(" or "),a("code",[t._v("char")]),t._v(".")]),t._v(" "),a("li",[t._v("Move "),a("code",[t._v("attributesToHighlight")]),t._v(", "),a("code",[t._v("highlightPreTag")]),t._v(", "),a("code",[t._v("highlightPostTag")]),t._v(", "),a("code",[t._v("attributesToCrop")]),t._v(", "),a("code",[t._v("cropLength")]),t._v(" and "),a("code",[t._v("cropMarker")]),t._v(" into a "),a("code",[t._v("formatter")]),t._v(" objet.")]),t._v(" "),a("li",[t._v("Add an option to only highlight complete query term.")]),t._v(" "),a("li",[t._v("Expose the "),a("code",[t._v("formatter")]),t._v(" resource as an index setting.")]),t._v(" "),a("li",[t._v("Highlight a phrase search as a single highlighted section.")])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/36.db871ac4.js b/docs/assets/js/36.29ef85a1.js similarity index 99% rename from docs/assets/js/36.db871ac4.js rename to docs/assets/js/36.29ef85a1.js index 575ff8c49..0f94262f8 100644 --- a/docs/assets/js/36.db871ac4.js +++ b/docs/assets/js/36.29ef85a1.js @@ -1 +1 @@ -(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 +(window.webpackJsonp=window.webpackJsonp||[]).push([[36],{459: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/39.3ffdfa45.js b/docs/assets/js/39.f053b747.js similarity index 99% rename from docs/assets/js/39.3ffdfa45.js rename to docs/assets/js/39.f053b747.js index d67205e32..ab004d73e 100644 --- a/docs/assets/js/39.3ffdfa45.js +++ b/docs/assets/js/39.f053b747.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],{471: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/40.d13ddf5a.js b/docs/assets/js/40.d64a9add.js similarity index 99% rename from docs/assets/js/40.d13ddf5a.js rename to docs/assets/js/40.d64a9add.js index 8adf53ad9..3646826ab 100644 --- a/docs/assets/js/40.d13ddf5a.js +++ b/docs/assets/js/40.d64a9add.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[40],{469:function(e,t,i){"use strict";i.r(t);var r=i(62),n=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:"proximity-precision-setting-api"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#proximity-precision-setting-api"}},[e._v("#")]),e._v(" Proximity Precision 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("proximityPrecision")]),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("Let the users the possibility to lose a piece of Meilisearch relevancy to gain a lot of indexing speed and disk space.\nChanging this setting will impact the way Meilisearch calculate the proximity between the query words,\nthis changes the behavior of the "),i("code",[e._v("proximity")]),e._v(" ranking-rule, the phrase search, and the multi-word synonyms.\nThere are 2 possible variants for this setting:")]),e._v(" "),i("h4",{attrs:{id:"_3-1-1-byword"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-byword"}},[e._v("#")]),e._v(" 3.1.1. "),i("code",[e._v("byWord")])]),e._v(" "),i("p",[e._v("This variant is the default variant when the setting is not set.")]),e._v(" "),i("p",[e._v("Meilisearch will be precise when computing the proximity between words. It will calculate the distance as the minimal number of words in the document separating the queried words.\nThis variant forces Meilisearch to compute and create a dedicated database to store the distance between words which impacts the indexing time.")]),e._v(" "),i("h4",{attrs:{id:"_3-1-2-byattribute"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-byattribute"}},[e._v("#")]),e._v(" 3.1.2. "),i("code",[e._v("byAttribute")])]),e._v(" "),i("p",[e._v("Meilisearch will not be precise when computing the proximity between words. It will only calculate 2 degrees of distances,the queried words are considered close if they are in the same attribute, and will be considered far if there aren't. It will no more take into account the distance between words or their order in the query.")]),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("proximityPrecision")]),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("proximityPrecision")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h4",{attrs:{id:"_3-3-1-get-indexes-index-uid-settings-proximity-precision"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get-indexes-index-uid-settings-proximity-precision"}},[e._v("#")]),e._v(" 3.3.1. "),i("code",[e._v("GET")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/proximity-precision")])]),e._v(" "),i("p",[e._v("Fetch the "),i("code",[e._v("proximityPrecision")]),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: String")]),e._v(" "),i("li",[e._v("Default: "),i("code",[e._v("byWord")])])]),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-proximity-precision"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-put-indexes-index-uid-settings-proximity-precision"}},[e._v("#")]),e._v(" 3.3.2. "),i("code",[e._v("PUT")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/proximity-precision")])]),e._v(" "),i("p",[e._v("Modify the "),i("code",[e._v("proximityPrecision")]),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: 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---indexesindexuidsettingsproximity-precision"}},[e._v("3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/proximity-precision")])]),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 a "),i("code",[e._v("String")]),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_proximity_precision"}},[e._v("invalid_settings_proximity_precision")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a request payload "),i("code",[e._v("String")]),e._v(" that is not "),i("code",[e._v("byWord")]),e._v(" or "),i("code",[e._v("byAttribute")]),e._v(" returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_proximity_precision"}},[e._v("invalid_settings_proximity_precision")]),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-proximity-precision"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-delete-indexes-index-uid-settings-proximity-precision"}},[e._v("#")]),e._v(" 3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/proximity-precision")])]),e._v(" "),i("p",[e._v("Reset the "),i("code",[e._v("proximityPrecision")]),e._v(" setting of a Meilisearch index to the default value "),i("code",[e._v("null")]),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.")])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[40],{463:function(e,t,i){"use strict";i.r(t);var r=i(62),n=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:"proximity-precision-setting-api"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#proximity-precision-setting-api"}},[e._v("#")]),e._v(" Proximity Precision 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("proximityPrecision")]),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("Let the users the possibility to lose a piece of Meilisearch relevancy to gain a lot of indexing speed and disk space.\nChanging this setting will impact the way Meilisearch calculate the proximity between the query words,\nthis changes the behavior of the "),i("code",[e._v("proximity")]),e._v(" ranking-rule, the phrase search, and the multi-word synonyms.\nThere are 2 possible variants for this setting:")]),e._v(" "),i("h4",{attrs:{id:"_3-1-1-byword"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-byword"}},[e._v("#")]),e._v(" 3.1.1. "),i("code",[e._v("byWord")])]),e._v(" "),i("p",[e._v("This variant is the default variant when the setting is not set.")]),e._v(" "),i("p",[e._v("Meilisearch will be precise when computing the proximity between words. It will calculate the distance as the minimal number of words in the document separating the queried words.\nThis variant forces Meilisearch to compute and create a dedicated database to store the distance between words which impacts the indexing time.")]),e._v(" "),i("h4",{attrs:{id:"_3-1-2-byattribute"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-byattribute"}},[e._v("#")]),e._v(" 3.1.2. "),i("code",[e._v("byAttribute")])]),e._v(" "),i("p",[e._v("Meilisearch will not be precise when computing the proximity between words. It will only calculate 2 degrees of distances,the queried words are considered close if they are in the same attribute, and will be considered far if there aren't. It will no more take into account the distance between words or their order in the query.")]),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("proximityPrecision")]),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("proximityPrecision")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h4",{attrs:{id:"_3-3-1-get-indexes-index-uid-settings-proximity-precision"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get-indexes-index-uid-settings-proximity-precision"}},[e._v("#")]),e._v(" 3.3.1. "),i("code",[e._v("GET")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/proximity-precision")])]),e._v(" "),i("p",[e._v("Fetch the "),i("code",[e._v("proximityPrecision")]),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: String")]),e._v(" "),i("li",[e._v("Default: "),i("code",[e._v("byWord")])])]),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-proximity-precision"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-put-indexes-index-uid-settings-proximity-precision"}},[e._v("#")]),e._v(" 3.3.2. "),i("code",[e._v("PUT")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/proximity-precision")])]),e._v(" "),i("p",[e._v("Modify the "),i("code",[e._v("proximityPrecision")]),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: 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---indexesindexuidsettingsproximity-precision"}},[e._v("3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/proximity-precision")])]),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 a "),i("code",[e._v("String")]),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_proximity_precision"}},[e._v("invalid_settings_proximity_precision")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a request payload "),i("code",[e._v("String")]),e._v(" that is not "),i("code",[e._v("byWord")]),e._v(" or "),i("code",[e._v("byAttribute")]),e._v(" returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_proximity_precision"}},[e._v("invalid_settings_proximity_precision")]),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-proximity-precision"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-delete-indexes-index-uid-settings-proximity-precision"}},[e._v("#")]),e._v(" 3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/proximity-precision")])]),e._v(" "),i("p",[e._v("Reset the "),i("code",[e._v("proximityPrecision")]),e._v(" setting of a Meilisearch index to the default value "),i("code",[e._v("null")]),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.")])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/41.65027914.js b/docs/assets/js/41.aad3d1ae.js similarity index 99% rename from docs/assets/js/41.65027914.js rename to docs/assets/js/41.aad3d1ae.js index bda16a573..c3de29a2e 100644 --- a/docs/assets/js/41.65027914.js +++ b/docs/assets/js/41.aad3d1ae.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[41],{464:function(e,t,r){"use strict";r.r(t);var s=r(62),n=Object(s.a)({},(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"ranking-rules-setting-api"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#ranking-rules-setting-api"}},[e._v("#")]),e._v(" Ranking Rules Setting API")]),e._v(" "),r("h2",{attrs:{id:"_1-summary"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),r("p",[e._v("This specification describes the "),r("code",[e._v("rankingRules")]),e._v(" index setting API endpoints.")]),e._v(" "),r("h2",{attrs:{id:"_2-motivation"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),r("p",[e._v("N/A")]),e._v(" "),r("h2",{attrs:{id:"_3-functional-specification"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),r("h3",{attrs:{id:"_3-1-explanations"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-explanations"}},[e._v("#")]),e._v(" 3.1. Explanations")]),e._v(" "),r("p",[e._v("To ensure relevant results at search time, documents are sorted based on consecutive rules called ranking rules. The order in which ranking rules are applied matters.")]),e._v(" "),r("p",[e._v("The first rule in the "),r("code",[e._v("rankingRules")]),e._v(" list has the most impact, and the last rule has the least.")]),e._v(" "),r("p",[e._v("This setting is fully customizable, meaning existing rules can be removed, new ones added and reordered as needed.")]),e._v(" "),r("h4",{attrs:{id:"_3-1-1-built-in-ranking-rules"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-built-in-ranking-rules"}},[e._v("#")]),e._v(" 3.1.1. Built-in Ranking Rules")]),e._v(" "),r("p",[e._v("By default, Meilisearch contains six built-in ranking rules in the following order:")]),e._v(" "),r("ol",[r("li",[r("a",{attrs:{href:"#3111-words-ranking-rule"}},[e._v("Words")])]),e._v(" "),r("li",[r("a",{attrs:{href:"#3112-typo-ranking-rule"}},[e._v("Typo")])]),e._v(" "),r("li",[r("a",{attrs:{href:"#3113-proximity-ranking-rule"}},[e._v("Proximity")])]),e._v(" "),r("li",[r("a",{attrs:{href:"#3114-attribute-ranking-rule"}},[e._v("Attribute")])]),e._v(" "),r("li",[r("a",{attrs:{href:"#3115-sort-ranking-rule"}},[e._v("Sort")])]),e._v(" "),r("li",[r("a",{attrs:{href:"#3116-exactness-ranking-rule"}},[e._v("Exactness")])])]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-1-words-ranking-rule"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-words-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.1. Words Ranking Rule")]),e._v(" "),r("p",[e._v("Results are sorted by decreasing the number of matched query terms. "),r("code",[e._v("words")]),e._v(" ranks documents that contain all query terms first.")]),e._v(" "),r("p",[e._v("The "),r("code",[e._v("words")]),e._v(" ranking rule works from right to left. Therefore, the order of the query string impacts the order of results.")]),e._v(" "),r("p",[e._v("For example, if someone were to search "),r("code",[e._v("batman dark knight")]),e._v(", then the words rule would rank documents containing all three terms first, documents containing only "),r("code",[e._v("batman")]),e._v(" and "),r("code",[e._v("dark")]),e._v(" second, and documents containing only "),r("code",[e._v("batman")]),e._v(" third.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-2-typo-ranking-rule"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-typo-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.2. Typo Ranking Rule")]),e._v(" "),r("p",[e._v("Results are sorted by increasing the number of typos. "),r("code",[e._v("typo")]),e._v(" ranks documents that match query terms with fewer typos first.")]),e._v(" "),r("p",[e._v("Meiliseach tolerates a maximum of "),r("code",[e._v("2")]),e._v(" typos for a query term.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-3-proximity-ranking-rule"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-proximity-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.3. Proximity Ranking Rule")]),e._v(" "),r("p",[e._v("Results are sorted by increasing distance between matched query terms. "),r("code",[e._v("proximity")]),e._v(" ranks documents where query terms occur close together and in the same order as the query terms first.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-4-attribute-ranking-rule"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-4-attribute-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.4. Attribute Ranking Rule")]),e._v(" "),r("p",[e._v("Results are sorted according to the attribute ranking order. "),r("code",[e._v("attribute")]),e._v(" ranks documents that contain query terms in more important attributes first. See "),r("a",{attrs:{href:"0123-searchable-attributes-setting-API"}},[e._v("searchableAttributes setting API")]),e._v(".")]),e._v(" "),r("p",[e._v("Also, note that the documents with attributes containing the query terms at the beginning of an attribute will be considered more relevant than documents containing the query terms at the end of an attribute.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-5-sort-ranking-rule"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-5-sort-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.5. Sort Ranking Rule")]),e._v(" "),r("p",[e._v("Results are sorted according to parameters decided at query time.")]),e._v(" "),r("p",[e._v("When the "),r("code",[e._v("sort")]),e._v(" ranking rule is in a "),r("strong",[e._v("higher")]),e._v(" position, sorting is exhaustive: results will be less relevant, but follow the user-defined sorting order more closely.")]),e._v(" "),r("p",[e._v("When the "),r("code",[e._v("sort")]),e._v(" ranking rule is in a "),r("strong",[e._v("lower")]),e._v(" position, sorting is relevant: results will be very relevant, but might not always follow the order defined by the user.")]),e._v(" "),r("p",[e._v("Unlike other ranking rules, "),r("code",[e._v("sort")]),e._v(" is only active for search queries containing the "),r("code",[e._v("sort")]),e._v(" search parameter ("),r("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#1213-sort"}},[e._v("See Sort Search Parameter")]),e._v("). If a search request does not contain "),r("code",[e._v("sort")]),e._v(", this ranking rule will be ignored.")],1),e._v(" "),r("p",[e._v("If a field has values of different types across documents, Meilisearch will give precedence to numbers over strings. It means documents with numeric field values will be ranked higher than those with string values.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-6-exactness-ranking-rule"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-6-exactness-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.6. Exactness Ranking Rule")]),e._v(" "),r("p",[e._v("Results are sorted by the similarity of the matched words with the query words. "),r("code",[e._v("exactness")]),e._v(" ranks documents that contain exactly the same terms as the ones queried first.")]),e._v(" "),r("h3",{attrs:{id:"_3-1-2-custom-ranking-rules"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-custom-ranking-rules"}},[e._v("#")]),e._v(" 3.1.2. Custom Ranking Rules")]),e._v(" "),r("p",[e._v("Meilisearch supports two custom rules expression that can be added to the ranking rules setting: one for ascending sort and one for descending sort.")]),e._v(" "),r("p",[e._v("To add a custom ranking rule, the attribute name must be specified and followed by a colon ("),r("code",[e._v(":")]),e._v(") and either "),r("code",[e._v("asc")]),e._v(" for ascending order or "),r("code",[e._v("desc")]),e._v(" for descending order.")]),e._v(" "),r("p",[e._v("To apply an ascending sort (results sorted by increasing value of the attribute): "),r("code",[e._v('"attribute_name:asc"')])]),e._v(" "),r("p",[e._v("To apply a descending sort (results sorted by decreasing value of the attribute): "),r("code",[e._v('"attribute_name:desc"')])]),e._v(" "),r("p",[e._v("The attribute must have either a numeric or a string value.")]),e._v(" "),r("p",[e._v("Contrary to the "),r("code",[e._v("sort")]),e._v(" ranking rule, custom ranking rules are always active after configured and can be helpful to promote certain types of results. The "),r("code",[e._v("sort")]),e._v(" ranking rule is most useful when end-users define what type of results they want to see first.")]),e._v(" "),r("h4",{attrs:{id:"_3-1-2-1-example"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-example"}},[e._v("#")]),e._v(" 3.1.2.1. Example")]),e._v(" "),r("p",[e._v("Suppose a movie dataset. The documents contain a field "),r("code",[e._v("release_date")]),e._v(" with a timestamp as a value.")]),e._v(" "),r("p",[e._v("The following example creates a custom ranking rule that makes recent movies more relevant than older ones. A movie released in 2020 will appear before a movie released in 1999.")]),e._v(" "),r("p",[r("em",[r("strong",[e._v("Request payload "),r("code",[e._v("PUT")]),e._v("- "),r("code",[e._v("/indexes/products/settings/ranking-rules")])])])]),e._v(" "),r("div",{staticClass:"language-json extra-class"},[r("pre",{pre:!0,attrs:{class:"language-json"}},[r("code",[r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"words"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"typo"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"proximity"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"sort"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"exactness"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"release_date:desc"')]),e._v("\n"),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),r("h3",{attrs:{id:"_3-2-global-settings-api-endpoints-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-global-settings-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2. Global Settings API Endpoints Definition")]),e._v(" "),r("p",[r("code",[e._v("rankingRules")]),e._v(" is a sub-resource of "),r("code",[e._v("/indexes/:index_uid/settings")]),e._v(".")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/specifications/text/0000-settings-api.html"}},[e._v("Settings API")]),e._v(".")],1),e._v(" "),r("h3",{attrs:{id:"_3-3-api-endpoints-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.3. API Endpoints Definition")]),e._v(" "),r("p",[e._v("Manipulate the "),r("code",[e._v("rankingRules")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),r("h4",{attrs:{id:"_3-3-1-get-indexes-index-uid-settings-ranking-rules"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get-indexes-index-uid-settings-ranking-rules"}},[e._v("#")]),e._v(" 3.3.1. "),r("code",[e._v("GET")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/settings/ranking-rules")])]),e._v(" "),r("p",[e._v("Fetch the "),r("code",[e._v("rankingRules")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),r("h5",{attrs:{id:"_3-3-1-1-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-response-definition"}},[e._v("#")]),e._v(" 3.3.1.1. Response Definition")]),e._v(" "),r("ul",[r("li",[e._v("Type: Array of String")]),e._v(" "),r("li",[e._v("Default: "),r("code",[e._v('["words", "typo", "proximity", "attribute", "sort", "exactness"]')])])]),e._v(" "),r("h5",{attrs:{id:"_3-3-1-2-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-2-errors"}},[e._v("#")]),e._v(" 3.3.1.2. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),r("h4",{attrs:{id:"_3-3-2-put-indexes-index-uid-settings-ranking-rules"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-put-indexes-index-uid-settings-ranking-rules"}},[e._v("#")]),e._v(" 3.3.2. "),r("code",[e._v("PUT")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/settings/ranking-rules")])]),e._v(" "),r("p",[e._v("Modify the "),r("code",[e._v("rankingRules")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),r("h5",{attrs:{id:"_3-3-2-1-request-payload-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-1-request-payload-definition"}},[e._v("#")]),e._v(" 3.3.2.1. Request Payload Definition")]),e._v(" "),r("ul",[r("li",[e._v("Type: Array of String / "),r("code",[e._v("null")])])]),e._v(" "),r("p",[e._v("Setting "),r("code",[e._v("null")]),e._v(" is equivalent to using the "),r("a",{attrs:{href:"#333-delete---indexesindexuidsettingsranking-rules"}},[e._v("3.3.3. "),r("code",[e._v("DELETE")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/settings/ranking-rules")])]),e._v(" API endpoint.")]),e._v(" "),r("p",[e._v("Specifying a document attribute that does not exist as a "),r("code",[e._v("rankingRules")]),e._v(" index setting returns no error.")]),e._v(" "),r("p",[e._v("Specifying "),r("code",[e._v("[]")]),e._v(" for the "),r("code",[e._v("rankingRules")]),e._v(" index setting allows specifying that no ranking rules are used to rank results. Search results are sorted by their "),r("strong",[e._v("internal id")]),e._v(" which can be considered as "),r("strong",[e._v("undefined order")]),e._v(".")]),e._v(" "),r("h5",{attrs:{id:"_3-3-2-2-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-2-response-definition"}},[e._v("#")]),e._v(" 3.3.2.2. Response Definition")]),e._v(" "),r("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),r("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),r("code",[e._v("task")]),e._v(" Object for "),r("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),r("h5",{attrs:{id:"_3-3-2-3-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-errors"}},[e._v("#")]),e._v(" 3.3.2.3. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Omitting Content-Type header returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an empty Content-Type returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a different Content-Type than "),r("code",[e._v("application/json")]),e._v(" returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an empty payload returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid JSON payload returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid index uid format for the "),r("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a request payload value type different of "),r("code",[e._v("Array of String")]),e._v(", "),r("code",[e._v("[]")]),e._v(", or "),r("code",[e._v("null")]),e._v(" returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_ranking_rules"}},[e._v("invalid_settings_ranking_rules")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid ranking rule returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_ranking_rules"}},[e._v("invalid_settings_ranking_rules")]),e._v(" error in the related asynchronous "),r("code",[e._v("task")]),e._v(" resource. See "),r("a",{attrs:{href:"#3222-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")],1)]),e._v(" "),r("h6",{attrs:{id:"_3-3-2-3-1-async-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-1-async-errors"}},[e._v("#")]),e._v(" 3.3.2.3.1. Async Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 When Meilisearch is secured, if the API Key do not have the "),r("code",[e._v("indexes.create")]),e._v(" action defined, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related asynchronous "),r("code",[e._v("task")]),e._v(" resource. See "),r("a",{attrs:{href:"#3222-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")],1)]),e._v(" "),r("blockquote",[r("p",[e._v("Otherwise, Meilisearch will create the index in a lazy way. See "),r("a",{attrs:{href:"#3224-lazy-index-creation"}},[e._v("3.2.2.4. Lazy Index Creation")]),e._v(".")])]),e._v(" "),r("h5",{attrs:{id:"_3-3-2-4-lazy-index-creation"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-4-lazy-index-creation"}},[e._v("#")]),e._v(" 3.3.2.4. Lazy Index Creation")]),e._v(" "),r("p",[e._v("If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, and the authorization layer allows it (See "),r("a",{attrs:{href:"#33231-async-errors"}},[e._v("3.3.2.3.1. Async Errors")]),e._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),r("a",{attrs:{href:"#3322-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")]),e._v(" "),r("h4",{attrs:{id:"_3-3-3-delete-indexes-index-uid-settings-ranking-rules"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-delete-indexes-index-uid-settings-ranking-rules"}},[e._v("#")]),e._v(" 3.3.3. "),r("code",[e._v("DELETE")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/settings/ranking-rules")])]),e._v(" "),r("p",[e._v("Reset the "),r("code",[e._v("rankingRules")]),e._v(" setting of a Meilisearch index to the default value "),r("code",[e._v('["*"]')]),e._v(".")]),e._v(" "),r("h5",{attrs:{id:"_3-3-3-1-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-1-response-definition"}},[e._v("#")]),e._v(" 3.3.3.1. Response Definition")]),e._v(" "),r("p",[e._v("When the request is in a successful state, Meilisearch returns the HTTP code "),r("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),r("code",[e._v("task")]),e._v(" Object for "),r("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),r("h5",{attrs:{id:"_3-3-3-3-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-errors"}},[e._v("#")]),e._v(" 3.3.3.3. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Sending an invalid index uid format for the "),r("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1)]),e._v(" "),r("h6",{attrs:{id:"_3-3-3-3-1-asynchronous-index-not-found-error"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-1-asynchronous-index-not-found-error"}},[e._v("#")]),e._v(" 3.3.3.3.1. Asynchronous Index Not Found Error")]),e._v(" "),r("ul",[r("li",[e._v("🔴 If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related async "),r("code",[e._v("task")]),e._v(" resource. See "),r("a",{attrs:{href:"#3331-response-definition"}},[e._v("3.3.3.1. Response Definition")]),e._v(".")],1)]),e._v(" "),r("h4",{attrs:{id:"_3-3-4-general-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-general-errors"}},[e._v("#")]),e._v(" 3.3.4. General Errors")]),e._v(" "),r("p",[e._v("These errors apply to all endpoints described here.")]),e._v(" "),r("h5",{attrs:{id:"_3-3-4-1-auth-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-1-auth-errors"}},[e._v("#")]),e._v(" 3.3.4.1 Auth Errors")]),e._v(" "),r("p",[e._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Accessing this route without the "),r("code",[e._v("Authorization")]),e._v(" header returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),r("h2",{attrs:{id:"_4-technical-details"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[e._v("#")]),e._v(" 4. Technical Details")]),e._v(" "),r("h3",{attrs:{id:"_4-1-bucket-sort"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-bucket-sort"}},[e._v("#")]),e._v(" 4.1. Bucket Sort")]),e._v(" "),r("p",[e._v("Whenever a search query is made, Meilisearch uses a "),r("a",{attrs:{href:"https://en.wikipedia.org/wiki/Bucket_sort",target:"_blank",rel:"noopener noreferrer"}},[e._v("bucket sort"),r("OutboundLink")],1),e._v(" algorithm to rank documents.")]),e._v(" "),r("p",[e._v("The first ranking rule is applied to all documents, while each subsequent rule is only applied to documents that are considered equal under the previous rule (i.e. as a tiebreaker).")]),e._v(" "),r("h2",{attrs:{id:"_5-future-possibilities"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),r("ul",[r("li",[e._v("Return an error when "),r("code",[e._v("rankingRules")]),e._v(" is defined as an empty array")])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[41],{467:function(e,t,r){"use strict";r.r(t);var s=r(62),n=Object(s.a)({},(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"ranking-rules-setting-api"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#ranking-rules-setting-api"}},[e._v("#")]),e._v(" Ranking Rules Setting API")]),e._v(" "),r("h2",{attrs:{id:"_1-summary"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),r("p",[e._v("This specification describes the "),r("code",[e._v("rankingRules")]),e._v(" index setting API endpoints.")]),e._v(" "),r("h2",{attrs:{id:"_2-motivation"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),r("p",[e._v("N/A")]),e._v(" "),r("h2",{attrs:{id:"_3-functional-specification"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),r("h3",{attrs:{id:"_3-1-explanations"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-explanations"}},[e._v("#")]),e._v(" 3.1. Explanations")]),e._v(" "),r("p",[e._v("To ensure relevant results at search time, documents are sorted based on consecutive rules called ranking rules. The order in which ranking rules are applied matters.")]),e._v(" "),r("p",[e._v("The first rule in the "),r("code",[e._v("rankingRules")]),e._v(" list has the most impact, and the last rule has the least.")]),e._v(" "),r("p",[e._v("This setting is fully customizable, meaning existing rules can be removed, new ones added and reordered as needed.")]),e._v(" "),r("h4",{attrs:{id:"_3-1-1-built-in-ranking-rules"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-built-in-ranking-rules"}},[e._v("#")]),e._v(" 3.1.1. Built-in Ranking Rules")]),e._v(" "),r("p",[e._v("By default, Meilisearch contains six built-in ranking rules in the following order:")]),e._v(" "),r("ol",[r("li",[r("a",{attrs:{href:"#3111-words-ranking-rule"}},[e._v("Words")])]),e._v(" "),r("li",[r("a",{attrs:{href:"#3112-typo-ranking-rule"}},[e._v("Typo")])]),e._v(" "),r("li",[r("a",{attrs:{href:"#3113-proximity-ranking-rule"}},[e._v("Proximity")])]),e._v(" "),r("li",[r("a",{attrs:{href:"#3114-attribute-ranking-rule"}},[e._v("Attribute")])]),e._v(" "),r("li",[r("a",{attrs:{href:"#3115-sort-ranking-rule"}},[e._v("Sort")])]),e._v(" "),r("li",[r("a",{attrs:{href:"#3116-exactness-ranking-rule"}},[e._v("Exactness")])])]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-1-words-ranking-rule"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-words-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.1. Words Ranking Rule")]),e._v(" "),r("p",[e._v("Results are sorted by decreasing the number of matched query terms. "),r("code",[e._v("words")]),e._v(" ranks documents that contain all query terms first.")]),e._v(" "),r("p",[e._v("The "),r("code",[e._v("words")]),e._v(" ranking rule works from right to left. Therefore, the order of the query string impacts the order of results.")]),e._v(" "),r("p",[e._v("For example, if someone were to search "),r("code",[e._v("batman dark knight")]),e._v(", then the words rule would rank documents containing all three terms first, documents containing only "),r("code",[e._v("batman")]),e._v(" and "),r("code",[e._v("dark")]),e._v(" second, and documents containing only "),r("code",[e._v("batman")]),e._v(" third.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-2-typo-ranking-rule"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-typo-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.2. Typo Ranking Rule")]),e._v(" "),r("p",[e._v("Results are sorted by increasing the number of typos. "),r("code",[e._v("typo")]),e._v(" ranks documents that match query terms with fewer typos first.")]),e._v(" "),r("p",[e._v("Meiliseach tolerates a maximum of "),r("code",[e._v("2")]),e._v(" typos for a query term.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-3-proximity-ranking-rule"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-proximity-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.3. Proximity Ranking Rule")]),e._v(" "),r("p",[e._v("Results are sorted by increasing distance between matched query terms. "),r("code",[e._v("proximity")]),e._v(" ranks documents where query terms occur close together and in the same order as the query terms first.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-4-attribute-ranking-rule"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-4-attribute-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.4. Attribute Ranking Rule")]),e._v(" "),r("p",[e._v("Results are sorted according to the attribute ranking order. "),r("code",[e._v("attribute")]),e._v(" ranks documents that contain query terms in more important attributes first. See "),r("a",{attrs:{href:"0123-searchable-attributes-setting-API"}},[e._v("searchableAttributes setting API")]),e._v(".")]),e._v(" "),r("p",[e._v("Also, note that the documents with attributes containing the query terms at the beginning of an attribute will be considered more relevant than documents containing the query terms at the end of an attribute.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-5-sort-ranking-rule"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-5-sort-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.5. Sort Ranking Rule")]),e._v(" "),r("p",[e._v("Results are sorted according to parameters decided at query time.")]),e._v(" "),r("p",[e._v("When the "),r("code",[e._v("sort")]),e._v(" ranking rule is in a "),r("strong",[e._v("higher")]),e._v(" position, sorting is exhaustive: results will be less relevant, but follow the user-defined sorting order more closely.")]),e._v(" "),r("p",[e._v("When the "),r("code",[e._v("sort")]),e._v(" ranking rule is in a "),r("strong",[e._v("lower")]),e._v(" position, sorting is relevant: results will be very relevant, but might not always follow the order defined by the user.")]),e._v(" "),r("p",[e._v("Unlike other ranking rules, "),r("code",[e._v("sort")]),e._v(" is only active for search queries containing the "),r("code",[e._v("sort")]),e._v(" search parameter ("),r("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#1213-sort"}},[e._v("See Sort Search Parameter")]),e._v("). If a search request does not contain "),r("code",[e._v("sort")]),e._v(", this ranking rule will be ignored.")],1),e._v(" "),r("p",[e._v("If a field has values of different types across documents, Meilisearch will give precedence to numbers over strings. It means documents with numeric field values will be ranked higher than those with string values.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-6-exactness-ranking-rule"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-6-exactness-ranking-rule"}},[e._v("#")]),e._v(" 3.1.1.6. Exactness Ranking Rule")]),e._v(" "),r("p",[e._v("Results are sorted by the similarity of the matched words with the query words. "),r("code",[e._v("exactness")]),e._v(" ranks documents that contain exactly the same terms as the ones queried first.")]),e._v(" "),r("h3",{attrs:{id:"_3-1-2-custom-ranking-rules"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-custom-ranking-rules"}},[e._v("#")]),e._v(" 3.1.2. Custom Ranking Rules")]),e._v(" "),r("p",[e._v("Meilisearch supports two custom rules expression that can be added to the ranking rules setting: one for ascending sort and one for descending sort.")]),e._v(" "),r("p",[e._v("To add a custom ranking rule, the attribute name must be specified and followed by a colon ("),r("code",[e._v(":")]),e._v(") and either "),r("code",[e._v("asc")]),e._v(" for ascending order or "),r("code",[e._v("desc")]),e._v(" for descending order.")]),e._v(" "),r("p",[e._v("To apply an ascending sort (results sorted by increasing value of the attribute): "),r("code",[e._v('"attribute_name:asc"')])]),e._v(" "),r("p",[e._v("To apply a descending sort (results sorted by decreasing value of the attribute): "),r("code",[e._v('"attribute_name:desc"')])]),e._v(" "),r("p",[e._v("The attribute must have either a numeric or a string value.")]),e._v(" "),r("p",[e._v("Contrary to the "),r("code",[e._v("sort")]),e._v(" ranking rule, custom ranking rules are always active after configured and can be helpful to promote certain types of results. The "),r("code",[e._v("sort")]),e._v(" ranking rule is most useful when end-users define what type of results they want to see first.")]),e._v(" "),r("h4",{attrs:{id:"_3-1-2-1-example"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-example"}},[e._v("#")]),e._v(" 3.1.2.1. Example")]),e._v(" "),r("p",[e._v("Suppose a movie dataset. The documents contain a field "),r("code",[e._v("release_date")]),e._v(" with a timestamp as a value.")]),e._v(" "),r("p",[e._v("The following example creates a custom ranking rule that makes recent movies more relevant than older ones. A movie released in 2020 will appear before a movie released in 1999.")]),e._v(" "),r("p",[r("em",[r("strong",[e._v("Request payload "),r("code",[e._v("PUT")]),e._v("- "),r("code",[e._v("/indexes/products/settings/ranking-rules")])])])]),e._v(" "),r("div",{staticClass:"language-json extra-class"},[r("pre",{pre:!0,attrs:{class:"language-json"}},[r("code",[r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"words"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"typo"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"proximity"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"sort"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"exactness"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"release_date:desc"')]),e._v("\n"),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),r("h3",{attrs:{id:"_3-2-global-settings-api-endpoints-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-global-settings-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2. Global Settings API Endpoints Definition")]),e._v(" "),r("p",[r("code",[e._v("rankingRules")]),e._v(" is a sub-resource of "),r("code",[e._v("/indexes/:index_uid/settings")]),e._v(".")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/specifications/text/0000-settings-api.html"}},[e._v("Settings API")]),e._v(".")],1),e._v(" "),r("h3",{attrs:{id:"_3-3-api-endpoints-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.3. API Endpoints Definition")]),e._v(" "),r("p",[e._v("Manipulate the "),r("code",[e._v("rankingRules")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),r("h4",{attrs:{id:"_3-3-1-get-indexes-index-uid-settings-ranking-rules"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get-indexes-index-uid-settings-ranking-rules"}},[e._v("#")]),e._v(" 3.3.1. "),r("code",[e._v("GET")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/settings/ranking-rules")])]),e._v(" "),r("p",[e._v("Fetch the "),r("code",[e._v("rankingRules")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),r("h5",{attrs:{id:"_3-3-1-1-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-response-definition"}},[e._v("#")]),e._v(" 3.3.1.1. Response Definition")]),e._v(" "),r("ul",[r("li",[e._v("Type: Array of String")]),e._v(" "),r("li",[e._v("Default: "),r("code",[e._v('["words", "typo", "proximity", "attribute", "sort", "exactness"]')])])]),e._v(" "),r("h5",{attrs:{id:"_3-3-1-2-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-2-errors"}},[e._v("#")]),e._v(" 3.3.1.2. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),r("h4",{attrs:{id:"_3-3-2-put-indexes-index-uid-settings-ranking-rules"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-put-indexes-index-uid-settings-ranking-rules"}},[e._v("#")]),e._v(" 3.3.2. "),r("code",[e._v("PUT")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/settings/ranking-rules")])]),e._v(" "),r("p",[e._v("Modify the "),r("code",[e._v("rankingRules")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),r("h5",{attrs:{id:"_3-3-2-1-request-payload-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-1-request-payload-definition"}},[e._v("#")]),e._v(" 3.3.2.1. Request Payload Definition")]),e._v(" "),r("ul",[r("li",[e._v("Type: Array of String / "),r("code",[e._v("null")])])]),e._v(" "),r("p",[e._v("Setting "),r("code",[e._v("null")]),e._v(" is equivalent to using the "),r("a",{attrs:{href:"#333-delete---indexesindexuidsettingsranking-rules"}},[e._v("3.3.3. "),r("code",[e._v("DELETE")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/settings/ranking-rules")])]),e._v(" API endpoint.")]),e._v(" "),r("p",[e._v("Specifying a document attribute that does not exist as a "),r("code",[e._v("rankingRules")]),e._v(" index setting returns no error.")]),e._v(" "),r("p",[e._v("Specifying "),r("code",[e._v("[]")]),e._v(" for the "),r("code",[e._v("rankingRules")]),e._v(" index setting allows specifying that no ranking rules are used to rank results. Search results are sorted by their "),r("strong",[e._v("internal id")]),e._v(" which can be considered as "),r("strong",[e._v("undefined order")]),e._v(".")]),e._v(" "),r("h5",{attrs:{id:"_3-3-2-2-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-2-response-definition"}},[e._v("#")]),e._v(" 3.3.2.2. Response Definition")]),e._v(" "),r("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),r("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),r("code",[e._v("task")]),e._v(" Object for "),r("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),r("h5",{attrs:{id:"_3-3-2-3-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-errors"}},[e._v("#")]),e._v(" 3.3.2.3. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Omitting Content-Type header returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an empty Content-Type returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a different Content-Type than "),r("code",[e._v("application/json")]),e._v(" returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an empty payload returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid JSON payload returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid index uid format for the "),r("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a request payload value type different of "),r("code",[e._v("Array of String")]),e._v(", "),r("code",[e._v("[]")]),e._v(", or "),r("code",[e._v("null")]),e._v(" returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_ranking_rules"}},[e._v("invalid_settings_ranking_rules")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid ranking rule returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_ranking_rules"}},[e._v("invalid_settings_ranking_rules")]),e._v(" error in the related asynchronous "),r("code",[e._v("task")]),e._v(" resource. See "),r("a",{attrs:{href:"#3222-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")],1)]),e._v(" "),r("h6",{attrs:{id:"_3-3-2-3-1-async-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-1-async-errors"}},[e._v("#")]),e._v(" 3.3.2.3.1. Async Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 When Meilisearch is secured, if the API Key do not have the "),r("code",[e._v("indexes.create")]),e._v(" action defined, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related asynchronous "),r("code",[e._v("task")]),e._v(" resource. See "),r("a",{attrs:{href:"#3222-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")],1)]),e._v(" "),r("blockquote",[r("p",[e._v("Otherwise, Meilisearch will create the index in a lazy way. See "),r("a",{attrs:{href:"#3224-lazy-index-creation"}},[e._v("3.2.2.4. Lazy Index Creation")]),e._v(".")])]),e._v(" "),r("h5",{attrs:{id:"_3-3-2-4-lazy-index-creation"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-4-lazy-index-creation"}},[e._v("#")]),e._v(" 3.3.2.4. Lazy Index Creation")]),e._v(" "),r("p",[e._v("If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, and the authorization layer allows it (See "),r("a",{attrs:{href:"#33231-async-errors"}},[e._v("3.3.2.3.1. Async Errors")]),e._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),r("a",{attrs:{href:"#3322-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")]),e._v(" "),r("h4",{attrs:{id:"_3-3-3-delete-indexes-index-uid-settings-ranking-rules"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-delete-indexes-index-uid-settings-ranking-rules"}},[e._v("#")]),e._v(" 3.3.3. "),r("code",[e._v("DELETE")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/settings/ranking-rules")])]),e._v(" "),r("p",[e._v("Reset the "),r("code",[e._v("rankingRules")]),e._v(" setting of a Meilisearch index to the default value "),r("code",[e._v('["*"]')]),e._v(".")]),e._v(" "),r("h5",{attrs:{id:"_3-3-3-1-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-1-response-definition"}},[e._v("#")]),e._v(" 3.3.3.1. Response Definition")]),e._v(" "),r("p",[e._v("When the request is in a successful state, Meilisearch returns the HTTP code "),r("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),r("code",[e._v("task")]),e._v(" Object for "),r("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),r("h5",{attrs:{id:"_3-3-3-3-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-errors"}},[e._v("#")]),e._v(" 3.3.3.3. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Sending an invalid index uid format for the "),r("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1)]),e._v(" "),r("h6",{attrs:{id:"_3-3-3-3-1-asynchronous-index-not-found-error"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-1-asynchronous-index-not-found-error"}},[e._v("#")]),e._v(" 3.3.3.3.1. Asynchronous Index Not Found Error")]),e._v(" "),r("ul",[r("li",[e._v("🔴 If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related async "),r("code",[e._v("task")]),e._v(" resource. See "),r("a",{attrs:{href:"#3331-response-definition"}},[e._v("3.3.3.1. Response Definition")]),e._v(".")],1)]),e._v(" "),r("h4",{attrs:{id:"_3-3-4-general-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-general-errors"}},[e._v("#")]),e._v(" 3.3.4. General Errors")]),e._v(" "),r("p",[e._v("These errors apply to all endpoints described here.")]),e._v(" "),r("h5",{attrs:{id:"_3-3-4-1-auth-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-1-auth-errors"}},[e._v("#")]),e._v(" 3.3.4.1 Auth Errors")]),e._v(" "),r("p",[e._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Accessing this route without the "),r("code",[e._v("Authorization")]),e._v(" header returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),r("h2",{attrs:{id:"_4-technical-details"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[e._v("#")]),e._v(" 4. Technical Details")]),e._v(" "),r("h3",{attrs:{id:"_4-1-bucket-sort"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-bucket-sort"}},[e._v("#")]),e._v(" 4.1. Bucket Sort")]),e._v(" "),r("p",[e._v("Whenever a search query is made, Meilisearch uses a "),r("a",{attrs:{href:"https://en.wikipedia.org/wiki/Bucket_sort",target:"_blank",rel:"noopener noreferrer"}},[e._v("bucket sort"),r("OutboundLink")],1),e._v(" algorithm to rank documents.")]),e._v(" "),r("p",[e._v("The first ranking rule is applied to all documents, while each subsequent rule is only applied to documents that are considered equal under the previous rule (i.e. as a tiebreaker).")]),e._v(" "),r("h2",{attrs:{id:"_5-future-possibilities"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),r("ul",[r("li",[e._v("Return an error when "),r("code",[e._v("rankingRules")]),e._v(" is defined as an empty array")])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/42.0ada06ba.js b/docs/assets/js/42.dc101efb.js similarity index 99% rename from docs/assets/js/42.0ada06ba.js rename to docs/assets/js/42.dc101efb.js index 5bbba2870..36e1f311a 100644 --- a/docs/assets/js/42.0ada06ba.js +++ b/docs/assets/js/42.dc101efb.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[42],{465:function(e,t,i){"use strict";i.r(t);var a=i(62),s=Object(a.a)({},(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[i("h1",{attrs:{id:"searchable-attributes-setting-api"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#searchable-attributes-setting-api"}},[e._v("#")]),e._v(" Searchable Attributes Setting API")]),e._v(" "),i("h2",{attrs:{id:"_1-summary"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),i("p",[e._v("This specification describes the "),i("code",[e._v("searchableAttributes")]),e._v(" index setting API endpoints.")]),e._v(" "),i("h2",{attrs:{id:"_2-motivation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),i("p",[e._v("N/A")]),e._v(" "),i("h2",{attrs:{id:"_3-functional-specification"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),i("h3",{attrs:{id:"_3-1-explanations"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-explanations"}},[e._v("#")]),e._v(" 3.1. Explanations")]),e._v(" "),i("p",[e._v("Documents in Meilisearch are composed of multiple fields. A field can either be searchable or non-searchable.")]),e._v(" "),i("p",[e._v("When a search query is performed, all searchable fields are checked for matching query words and used to assess document relevancy, while non-searchable fields are ignored entirely.")]),e._v(" "),i("p",[e._v("By default, Meilisearch looks for matches in every field, but the "),i("code",[e._v("searchableAttributes")]),e._v(" setting object allow to customize that behavior.")]),e._v(" "),i("h4",{attrs:{id:"_3-1-1-usage-example"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-usage-example"}},[e._v("#")]),e._v(" 3.1.1. Usage Example")]),e._v(" "),i("p",[e._v("Suppose a database of movies with the following fields: "),i("code",[e._v("id")]),e._v(", "),i("code",[e._v("overview")]),e._v(", "),i("code",[e._v("genres")]),e._v(", "),i("code",[e._v("title")]),e._v(", "),i("code",[e._v("release_date")]),e._v(". These fields all contain useful information; however, some are more useful to search than others. To make the "),i("code",[e._v("id")]),e._v(" and "),i("code",[e._v("release_date")]),e._v(" fields non-searchable and re-order the remaining fields by importance, it can be specified in the following way.")]),e._v(" "),i("p",[i("em",[i("strong",[e._v("Request payload "),i("code",[e._v("PUT")]),e._v("- "),i("code",[e._v("/indexes/movies/settings/searchable-attributes")])])])]),e._v(" "),i("div",{staticClass:"language-json extra-class"},[i("pre",{pre:!0,attrs:{class:"language-json"}},[i("code",[i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"overview"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"genres"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"title"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),i("h4",{attrs:{id:"_3-1-2-field-ordering"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-field-ordering"}},[e._v("#")]),e._v(" 3.1.2. Field Ordering")]),e._v(" "),i("p",[e._v("Meilisearch uses an ordered list to determine which attributes are searchable. The order in which attributes appear in this list also determines their impact on relevancy, from most impactful to least.")]),e._v(" "),i("p",[e._v("In other words, the "),i("code",[e._v("searchableAttributes")]),e._v(" setting serves two purposes:")]),e._v(" "),i("ul",[i("li",[e._v("It designates the fields that are searchable.")]),e._v(" "),i("li",[e._v("It dictates the attribute ranking order.")])]),e._v(" "),i("p",[e._v("There are two possible modes for the "),i("code",[e._v("searchableAttributes")]),e._v(" setting.")]),e._v(" "),i("h5",{attrs:{id:"_3-1-1-1-default-case-automatic"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-default-case-automatic"}},[e._v("#")]),e._v(" 3.1.1.1. Default case: Automatic")]),e._v(" "),i("p",[e._v("By default, all attributes are automatically added to the "),i("code",[e._v("searchableAttributes")]),e._v(" list in their order of appearance.")]),e._v(" "),i("p",[e._v("This means that the initial order will be based on the order of attributes in the first document indexed, with each new attribute found in subsequent documents added at the end of this list.")]),e._v(" "),i("p",[e._v("This default behavior is indicated by a "),i("code",[e._v("searchableAttributes")]),e._v(" value of "),i("code",[e._v('["*"]')]),e._v(".")]),e._v(" "),i("h5",{attrs:{id:"_3-1-1-2-manual"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-manual"}},[e._v("#")]),e._v(" 3.1.1.2. Manual")]),e._v(" "),i("p",[e._v("To make some attributes non-searchable, or change the attribute ranking order. Attributes must be described from most important to least important.")]),e._v(" "),i("p",[i("em",[i("strong",[e._v("Request payload "),i("code",[e._v("PUT")]),e._v("- "),i("code",[e._v("/indexes/movies/settings/searchable-attributes")])])])]),e._v(" "),i("div",{staticClass:"language-json extra-class"},[i("pre",{pre:!0,attrs:{class:"language-json"}},[i("code",[i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"title"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"overview"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"genres"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),i("p",[i("code",[e._v("title")]),e._v(" is considered more important than "),i("code",[e._v("overview")]),e._v(" while "),i("code",[e._v("overview")]),e._v(" is considered more important than "),i("code",[e._v("genres")]),e._v(".")]),e._v(" "),i("p",[e._v("The "),i("a",{attrs:{href:""}},[e._v("Attribute Ranking Rule")]),e._v(" ranks search results by the order defined in the "),i("code",[e._v("searchableAttributes")]),e._v(" setting. Documents that contain query terms in the more important searchable attribute will be returned first.")]),e._v(" "),i("p",[e._v("Manually updating "),i("code",[e._v("searchableAttributes")]),e._v(" will change the displayed order of document fields in the JSON response.")]),e._v(" "),i("h4",{attrs:{id:"_3-1-3-relationship-with-ranking-rules"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-relationship-with-ranking-rules"}},[e._v("#")]),e._v(" 3.1.3. Relationship With Ranking Rules")]),e._v(" "),i("p",[e._v("A document field that is not defined in the list of "),i("code",[e._v("searchableAttributes")]),e._v(" will not be considered by the following ranking rules to match and rank search results.")]),e._v(" "),i("ol",[i("li",[i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html#3111-words-ranking-rule"}},[e._v("Words")])],1),e._v(" "),i("li",[i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html#3112-typo-ranking-rule"}},[e._v("Typo")])],1),e._v(" "),i("li",[i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html#3113-proximity-ranking-rule"}},[e._v("Proximity")])],1),e._v(" "),i("li",[i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html#3114-attribute-ranking-rule"}},[e._v("Attribute")])],1),e._v(" "),i("li",[i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html#3116-exactness-ranking-rule"}},[e._v("Exactness")])],1)]),e._v(" "),i("h3",{attrs:{id:"_3-2-global-settings-api-endpoints-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-global-settings-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2. Global Settings API Endpoints Definition")]),e._v(" "),i("p",[i("code",[e._v("searchableAttributes")]),e._v(" is a sub-resource of "),i("code",[e._v("/indexes/:index_uid/settings")]),e._v(".")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html"}},[e._v("Settings API")]),e._v(".")],1),e._v(" "),i("h3",{attrs:{id:"_3-3-api-endpoints-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.3. API Endpoints Definition")]),e._v(" "),i("p",[e._v("Manipulate the "),i("code",[e._v("searchableAttributes")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h4",{attrs:{id:"_3-3-1-get-indexes-index-uid-settings-searchable-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get-indexes-index-uid-settings-searchable-attributes"}},[e._v("#")]),e._v(" 3.3.1. "),i("code",[e._v("GET")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/searchable-attributes")])]),e._v(" "),i("p",[e._v("Fetch the "),i("code",[e._v("searchableAttributes")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-1-1-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-response-definition"}},[e._v("#")]),e._v(" 3.3.1.1. Response Definition")]),e._v(" "),i("ul",[i("li",[e._v("Type: Array of String")]),e._v(" "),i("li",[e._v("Default: "),i("code",[e._v('["*"]')])])]),e._v(" "),i("h5",{attrs:{id:"_3-3-1-2-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-2-errors"}},[e._v("#")]),e._v(" 3.3.1.2. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),i("h4",{attrs:{id:"_3-3-2-put-indexes-index-uid-settings-searchable-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-put-indexes-index-uid-settings-searchable-attributes"}},[e._v("#")]),e._v(" 3.3.2. "),i("code",[e._v("PUT")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/searchable-attributes")])]),e._v(" "),i("p",[e._v("Modify the "),i("code",[e._v("searchableAttributes")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-2-1-request-payload-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-1-request-payload-definition"}},[e._v("#")]),e._v(" 3.3.2.1. Request Payload Definition")]),e._v(" "),i("ul",[i("li",[e._v("Type: Array of String / "),i("code",[e._v("null")])])]),e._v(" "),i("p",[e._v("Setting "),i("code",[e._v("null")]),e._v(" is equivalent to using the "),i("a",{attrs:{href:"#333-delete---indexesindexuidsettingssearchable-attributes"}},[e._v("3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/searchable-attributes")])]),e._v(" API endpoint.")]),e._v(" "),i("p",[e._v("Specifying a document attribute that does not exist as a "),i("code",[e._v("searchableAttributes")]),e._v(" index setting returns no error.")]),e._v(" "),i("p",[e._v("Specifying "),i("code",[e._v("[]")]),e._v(" for the "),i("code",[e._v("searchableAttributes")]),e._v(" index setting allows to specify that all fields are non-searchable.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-2-2-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-2-response-definition"}},[e._v("#")]),e._v(" 3.3.2.2. Response Definition")]),e._v(" "),i("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),i("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),i("code",[e._v("task")]),e._v(" Object for "),i("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),i("h5",{attrs:{id:"_3-3-2-3-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-errors"}},[e._v("#")]),e._v(" 3.3.2.3. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Omitting Content-Type header returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an empty Content-Type returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a different Content-Type than "),i("code",[e._v("application/json")]),e._v(" returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an empty payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an invalid JSON payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a request payload value type different of "),i("code",[e._v("Array of String")]),e._v(", "),i("code",[e._v("[]")]),e._v(" or "),i("code",[e._v("null")]),e._v(" returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_searchable_attributes"}},[e._v("invalid_settings_searchable_attributes")]),e._v(" error.")],1)]),e._v(" "),i("h6",{attrs:{id:"_3-3-2-3-1-async-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-1-async-errors"}},[e._v("#")]),e._v(" 3.3.2.3.1. Async Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 When Meilisearch is secured, if the API Key do not have the "),i("code",[e._v("indexes.create")]),e._v(" action defined, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related asynchronous "),i("code",[e._v("task")]),e._v(" resource. See "),i("a",{attrs:{href:"#3222-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")],1)]),e._v(" "),i("blockquote",[i("p",[e._v("Otherwise, Meilisearch will create the index in a lazy way. See "),i("a",{attrs:{href:"#3224-lazy-index-creation"}},[e._v("3.2.2.4. Lazy Index Creation")]),e._v(".")])]),e._v(" "),i("h5",{attrs:{id:"_3-3-2-4-lazy-index-creation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-4-lazy-index-creation"}},[e._v("#")]),e._v(" 3.3.2.4. Lazy Index Creation")]),e._v(" "),i("p",[e._v("If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, and the authorization layer allows it (See "),i("a",{attrs:{href:"#33231-async-errors"}},[e._v("3.3.2.3.1. Async Errors")]),e._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),i("a",{attrs:{href:"#3322-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")]),e._v(" "),i("h4",{attrs:{id:"_3-3-3-delete-indexes-index-uid-settings-searchable-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-delete-indexes-index-uid-settings-searchable-attributes"}},[e._v("#")]),e._v(" 3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/searchable-attributes")])]),e._v(" "),i("p",[e._v("Reset the "),i("code",[e._v("searchableAttributes")]),e._v(" setting of a Meilisearch index to the default value "),i("code",[e._v('["*"]')]),e._v(".")]),e._v(" "),i("h5",{attrs:{id:"_3-3-3-1-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-1-response-definition"}},[e._v("#")]),e._v(" 3.3.3.1. Response Definition")]),e._v(" "),i("p",[e._v("When the request is in a successful state, Meilisearch returns the HTTP code "),i("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),i("code",[e._v("task")]),e._v(" Object for "),i("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),i("h5",{attrs:{id:"_3-3-3-3-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-errors"}},[e._v("#")]),e._v(" 3.3.3.3. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1)]),e._v(" "),i("h6",{attrs:{id:"_3-3-3-3-1-asynchronous-index-not-found-error"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-1-asynchronous-index-not-found-error"}},[e._v("#")]),e._v(" 3.3.3.3.1. Asynchronous Index Not Found Error")]),e._v(" "),i("ul",[i("li",[e._v("🔴 If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related async "),i("code",[e._v("task")]),e._v(" resource. See "),i("a",{attrs:{href:"#3331-response-definition"}},[e._v("3.3.3.1. Response Definition")]),e._v(".")],1)]),e._v(" "),i("h4",{attrs:{id:"_3-3-4-general-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-general-errors"}},[e._v("#")]),e._v(" 3.3.4. General Errors")]),e._v(" "),i("p",[e._v("These errors apply to all endpoints described here.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-4-1-auth-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-1-auth-errors"}},[e._v("#")]),e._v(" 3.3.4.1 Auth Errors")]),e._v(" "),i("p",[e._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Accessing this route without the "),i("code",[e._v("Authorization")]),e._v(" header returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),i("h2",{attrs:{id:"_4-technical-details"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[e._v("#")]),e._v(" 4. Technical Details")]),e._v(" "),i("h3",{attrs:{id:"_4-1-triggering-documents-re-indexing"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-triggering-documents-re-indexing"}},[e._v("#")]),e._v(" 4.1. Triggering Documents Re-Indexing")]),e._v(" "),i("p",[e._v("Meilisearch favors search speed and makes a trade-off on indexing speed by computing internal data structures to get search results as fast as possible.")]),e._v(" "),i("p",[e._v("Modifying this index setting cause documents to be re-indexed.")]),e._v(" "),i("h2",{attrs:{id:"_5-future-possibilities"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),i("ul",[i("li",[e._v("Fix the reordering issue of document representation when "),i("code",[e._v("searchableAttributes")]),e._v(" is specified.")])])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[42],{464:function(e,t,i){"use strict";i.r(t);var a=i(62),s=Object(a.a)({},(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[i("h1",{attrs:{id:"searchable-attributes-setting-api"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#searchable-attributes-setting-api"}},[e._v("#")]),e._v(" Searchable Attributes Setting API")]),e._v(" "),i("h2",{attrs:{id:"_1-summary"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),i("p",[e._v("This specification describes the "),i("code",[e._v("searchableAttributes")]),e._v(" index setting API endpoints.")]),e._v(" "),i("h2",{attrs:{id:"_2-motivation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),i("p",[e._v("N/A")]),e._v(" "),i("h2",{attrs:{id:"_3-functional-specification"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),i("h3",{attrs:{id:"_3-1-explanations"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-explanations"}},[e._v("#")]),e._v(" 3.1. Explanations")]),e._v(" "),i("p",[e._v("Documents in Meilisearch are composed of multiple fields. A field can either be searchable or non-searchable.")]),e._v(" "),i("p",[e._v("When a search query is performed, all searchable fields are checked for matching query words and used to assess document relevancy, while non-searchable fields are ignored entirely.")]),e._v(" "),i("p",[e._v("By default, Meilisearch looks for matches in every field, but the "),i("code",[e._v("searchableAttributes")]),e._v(" setting object allow to customize that behavior.")]),e._v(" "),i("h4",{attrs:{id:"_3-1-1-usage-example"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-usage-example"}},[e._v("#")]),e._v(" 3.1.1. Usage Example")]),e._v(" "),i("p",[e._v("Suppose a database of movies with the following fields: "),i("code",[e._v("id")]),e._v(", "),i("code",[e._v("overview")]),e._v(", "),i("code",[e._v("genres")]),e._v(", "),i("code",[e._v("title")]),e._v(", "),i("code",[e._v("release_date")]),e._v(". These fields all contain useful information; however, some are more useful to search than others. To make the "),i("code",[e._v("id")]),e._v(" and "),i("code",[e._v("release_date")]),e._v(" fields non-searchable and re-order the remaining fields by importance, it can be specified in the following way.")]),e._v(" "),i("p",[i("em",[i("strong",[e._v("Request payload "),i("code",[e._v("PUT")]),e._v("- "),i("code",[e._v("/indexes/movies/settings/searchable-attributes")])])])]),e._v(" "),i("div",{staticClass:"language-json extra-class"},[i("pre",{pre:!0,attrs:{class:"language-json"}},[i("code",[i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"overview"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"genres"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"title"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),i("h4",{attrs:{id:"_3-1-2-field-ordering"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-field-ordering"}},[e._v("#")]),e._v(" 3.1.2. Field Ordering")]),e._v(" "),i("p",[e._v("Meilisearch uses an ordered list to determine which attributes are searchable. The order in which attributes appear in this list also determines their impact on relevancy, from most impactful to least.")]),e._v(" "),i("p",[e._v("In other words, the "),i("code",[e._v("searchableAttributes")]),e._v(" setting serves two purposes:")]),e._v(" "),i("ul",[i("li",[e._v("It designates the fields that are searchable.")]),e._v(" "),i("li",[e._v("It dictates the attribute ranking order.")])]),e._v(" "),i("p",[e._v("There are two possible modes for the "),i("code",[e._v("searchableAttributes")]),e._v(" setting.")]),e._v(" "),i("h5",{attrs:{id:"_3-1-1-1-default-case-automatic"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-default-case-automatic"}},[e._v("#")]),e._v(" 3.1.1.1. Default case: Automatic")]),e._v(" "),i("p",[e._v("By default, all attributes are automatically added to the "),i("code",[e._v("searchableAttributes")]),e._v(" list in their order of appearance.")]),e._v(" "),i("p",[e._v("This means that the initial order will be based on the order of attributes in the first document indexed, with each new attribute found in subsequent documents added at the end of this list.")]),e._v(" "),i("p",[e._v("This default behavior is indicated by a "),i("code",[e._v("searchableAttributes")]),e._v(" value of "),i("code",[e._v('["*"]')]),e._v(".")]),e._v(" "),i("h5",{attrs:{id:"_3-1-1-2-manual"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-manual"}},[e._v("#")]),e._v(" 3.1.1.2. Manual")]),e._v(" "),i("p",[e._v("To make some attributes non-searchable, or change the attribute ranking order. Attributes must be described from most important to least important.")]),e._v(" "),i("p",[i("em",[i("strong",[e._v("Request payload "),i("code",[e._v("PUT")]),e._v("- "),i("code",[e._v("/indexes/movies/settings/searchable-attributes")])])])]),e._v(" "),i("div",{staticClass:"language-json extra-class"},[i("pre",{pre:!0,attrs:{class:"language-json"}},[i("code",[i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"title"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"overview"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),i("span",{pre:!0,attrs:{class:"token string"}},[e._v('"genres"')]),i("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),i("p",[i("code",[e._v("title")]),e._v(" is considered more important than "),i("code",[e._v("overview")]),e._v(" while "),i("code",[e._v("overview")]),e._v(" is considered more important than "),i("code",[e._v("genres")]),e._v(".")]),e._v(" "),i("p",[e._v("The "),i("a",{attrs:{href:""}},[e._v("Attribute Ranking Rule")]),e._v(" ranks search results by the order defined in the "),i("code",[e._v("searchableAttributes")]),e._v(" setting. Documents that contain query terms in the more important searchable attribute will be returned first.")]),e._v(" "),i("p",[e._v("Manually updating "),i("code",[e._v("searchableAttributes")]),e._v(" will change the displayed order of document fields in the JSON response.")]),e._v(" "),i("h4",{attrs:{id:"_3-1-3-relationship-with-ranking-rules"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-relationship-with-ranking-rules"}},[e._v("#")]),e._v(" 3.1.3. Relationship With Ranking Rules")]),e._v(" "),i("p",[e._v("A document field that is not defined in the list of "),i("code",[e._v("searchableAttributes")]),e._v(" will not be considered by the following ranking rules to match and rank search results.")]),e._v(" "),i("ol",[i("li",[i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html#3111-words-ranking-rule"}},[e._v("Words")])],1),e._v(" "),i("li",[i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html#3112-typo-ranking-rule"}},[e._v("Typo")])],1),e._v(" "),i("li",[i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html#3113-proximity-ranking-rule"}},[e._v("Proximity")])],1),e._v(" "),i("li",[i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html#3114-attribute-ranking-rule"}},[e._v("Attribute")])],1),e._v(" "),i("li",[i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html#3116-exactness-ranking-rule"}},[e._v("Exactness")])],1)]),e._v(" "),i("h3",{attrs:{id:"_3-2-global-settings-api-endpoints-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-global-settings-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.2. Global Settings API Endpoints Definition")]),e._v(" "),i("p",[i("code",[e._v("searchableAttributes")]),e._v(" is a sub-resource of "),i("code",[e._v("/indexes/:index_uid/settings")]),e._v(".")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0123-settings-api.html"}},[e._v("Settings API")]),e._v(".")],1),e._v(" "),i("h3",{attrs:{id:"_3-3-api-endpoints-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.3. API Endpoints Definition")]),e._v(" "),i("p",[e._v("Manipulate the "),i("code",[e._v("searchableAttributes")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h4",{attrs:{id:"_3-3-1-get-indexes-index-uid-settings-searchable-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get-indexes-index-uid-settings-searchable-attributes"}},[e._v("#")]),e._v(" 3.3.1. "),i("code",[e._v("GET")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/searchable-attributes")])]),e._v(" "),i("p",[e._v("Fetch the "),i("code",[e._v("searchableAttributes")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-1-1-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-response-definition"}},[e._v("#")]),e._v(" 3.3.1.1. Response Definition")]),e._v(" "),i("ul",[i("li",[e._v("Type: Array of String")]),e._v(" "),i("li",[e._v("Default: "),i("code",[e._v('["*"]')])])]),e._v(" "),i("h5",{attrs:{id:"_3-3-1-2-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-2-errors"}},[e._v("#")]),e._v(" 3.3.1.2. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),i("h4",{attrs:{id:"_3-3-2-put-indexes-index-uid-settings-searchable-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-put-indexes-index-uid-settings-searchable-attributes"}},[e._v("#")]),e._v(" 3.3.2. "),i("code",[e._v("PUT")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/searchable-attributes")])]),e._v(" "),i("p",[e._v("Modify the "),i("code",[e._v("searchableAttributes")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-2-1-request-payload-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-1-request-payload-definition"}},[e._v("#")]),e._v(" 3.3.2.1. Request Payload Definition")]),e._v(" "),i("ul",[i("li",[e._v("Type: Array of String / "),i("code",[e._v("null")])])]),e._v(" "),i("p",[e._v("Setting "),i("code",[e._v("null")]),e._v(" is equivalent to using the "),i("a",{attrs:{href:"#333-delete---indexesindexuidsettingssearchable-attributes"}},[e._v("3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/searchable-attributes")])]),e._v(" API endpoint.")]),e._v(" "),i("p",[e._v("Specifying a document attribute that does not exist as a "),i("code",[e._v("searchableAttributes")]),e._v(" index setting returns no error.")]),e._v(" "),i("p",[e._v("Specifying "),i("code",[e._v("[]")]),e._v(" for the "),i("code",[e._v("searchableAttributes")]),e._v(" index setting allows to specify that all fields are non-searchable.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-2-2-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-2-response-definition"}},[e._v("#")]),e._v(" 3.3.2.2. Response Definition")]),e._v(" "),i("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),i("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),i("code",[e._v("task")]),e._v(" Object for "),i("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),i("h5",{attrs:{id:"_3-3-2-3-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-errors"}},[e._v("#")]),e._v(" 3.3.2.3. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Omitting Content-Type header returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an empty Content-Type returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a different Content-Type than "),i("code",[e._v("application/json")]),e._v(" returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an empty payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an invalid JSON payload returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Sending a request payload value type different of "),i("code",[e._v("Array of String")]),e._v(", "),i("code",[e._v("[]")]),e._v(" or "),i("code",[e._v("null")]),e._v(" returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_settings_searchable_attributes"}},[e._v("invalid_settings_searchable_attributes")]),e._v(" error.")],1)]),e._v(" "),i("h6",{attrs:{id:"_3-3-2-3-1-async-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-3-1-async-errors"}},[e._v("#")]),e._v(" 3.3.2.3.1. Async Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 When Meilisearch is secured, if the API Key do not have the "),i("code",[e._v("indexes.create")]),e._v(" action defined, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related asynchronous "),i("code",[e._v("task")]),e._v(" resource. See "),i("a",{attrs:{href:"#3222-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")],1)]),e._v(" "),i("blockquote",[i("p",[e._v("Otherwise, Meilisearch will create the index in a lazy way. See "),i("a",{attrs:{href:"#3224-lazy-index-creation"}},[e._v("3.2.2.4. Lazy Index Creation")]),e._v(".")])]),e._v(" "),i("h5",{attrs:{id:"_3-3-2-4-lazy-index-creation"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-4-lazy-index-creation"}},[e._v("#")]),e._v(" 3.3.2.4. Lazy Index Creation")]),e._v(" "),i("p",[e._v("If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, and the authorization layer allows it (See "),i("a",{attrs:{href:"#33231-async-errors"}},[e._v("3.3.2.3.1. Async Errors")]),e._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),i("a",{attrs:{href:"#3322-response-definition"}},[e._v("3.3.2.2. Response Definition")]),e._v(".")]),e._v(" "),i("h4",{attrs:{id:"_3-3-3-delete-indexes-index-uid-settings-searchable-attributes"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-delete-indexes-index-uid-settings-searchable-attributes"}},[e._v("#")]),e._v(" 3.3.3. "),i("code",[e._v("DELETE")]),e._v(" - "),i("code",[e._v("indexes/:index_uid/settings/searchable-attributes")])]),e._v(" "),i("p",[e._v("Reset the "),i("code",[e._v("searchableAttributes")]),e._v(" setting of a Meilisearch index to the default value "),i("code",[e._v('["*"]')]),e._v(".")]),e._v(" "),i("h5",{attrs:{id:"_3-3-3-1-response-definition"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-1-response-definition"}},[e._v("#")]),e._v(" 3.3.3.1. Response Definition")]),e._v(" "),i("p",[e._v("When the request is in a successful state, Meilisearch returns the HTTP code "),i("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),i("p",[e._v("See "),i("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),i("code",[e._v("task")]),e._v(" Object for "),i("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),i("h5",{attrs:{id:"_3-3-3-3-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-errors"}},[e._v("#")]),e._v(" 3.3.3.3. Errors")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Sending an invalid index uid format for the "),i("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1)]),e._v(" "),i("h6",{attrs:{id:"_3-3-3-3-1-asynchronous-index-not-found-error"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-3-1-asynchronous-index-not-found-error"}},[e._v("#")]),e._v(" 3.3.3.3.1. Asynchronous Index Not Found Error")]),e._v(" "),i("ul",[i("li",[e._v("🔴 If the requested "),i("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related async "),i("code",[e._v("task")]),e._v(" resource. See "),i("a",{attrs:{href:"#3331-response-definition"}},[e._v("3.3.3.1. Response Definition")]),e._v(".")],1)]),e._v(" "),i("h4",{attrs:{id:"_3-3-4-general-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-general-errors"}},[e._v("#")]),e._v(" 3.3.4. General Errors")]),e._v(" "),i("p",[e._v("These errors apply to all endpoints described here.")]),e._v(" "),i("h5",{attrs:{id:"_3-3-4-1-auth-errors"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-4-1-auth-errors"}},[e._v("#")]),e._v(" 3.3.4.1 Auth Errors")]),e._v(" "),i("p",[e._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),e._v(" "),i("ul",[i("li",[e._v("🔴 Accessing this route without the "),i("code",[e._v("Authorization")]),e._v(" header returns a "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),i("li",[e._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),i("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),i("h2",{attrs:{id:"_4-technical-details"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[e._v("#")]),e._v(" 4. Technical Details")]),e._v(" "),i("h3",{attrs:{id:"_4-1-triggering-documents-re-indexing"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-triggering-documents-re-indexing"}},[e._v("#")]),e._v(" 4.1. Triggering Documents Re-Indexing")]),e._v(" "),i("p",[e._v("Meilisearch favors search speed and makes a trade-off on indexing speed by computing internal data structures to get search results as fast as possible.")]),e._v(" "),i("p",[e._v("Modifying this index setting cause documents to be re-indexed.")]),e._v(" "),i("h2",{attrs:{id:"_5-future-possibilities"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),i("ul",[i("li",[e._v("Fix the reordering issue of document representation when "),i("code",[e._v("searchableAttributes")]),e._v(" is specified.")])])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/43.4bb7d0b6.js b/docs/assets/js/43.00df8636.js similarity index 99% rename from docs/assets/js/43.4bb7d0b6.js rename to docs/assets/js/43.00df8636.js index 72c6e604f..e21aa99d0 100644 --- a/docs/assets/js/43.4bb7d0b6.js +++ b/docs/assets/js/43.00df8636.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[43],{466:function(e,t,s){"use strict";s.r(t);var a=s(62),i=Object(a.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:"separators-setting-api"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#separators-setting-api"}},[e._v("#")]),e._v(" Separators 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("separatorTokens")]),e._v(" and "),s("code",[e._v("nonSeparatorTokens")]),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("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",[s("em",[s("strong",[e._v("Request payload "),s("code",[e._v("PUT")]),e._v("- "),s("code",[e._v("/indexes/articles/settings/separator-tokens")])])])]),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("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"|"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"/"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"&sep"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),s("p",[s("em",[s("strong",[e._v("Request payload "),s("code",[e._v("PUT")]),e._v("- "),s("code",[e._v("/indexes/articles/settings/non-separator-tokens")])])])]),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("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"@"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"#"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),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("separatorTokens")]),e._v(" and "),s("code",[e._v("nonSeparatorTokens")]),e._v(" are sub-resources 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("separatorTokens")]),e._v(" and "),s("code",[e._v("nonSeparatorTokens")]),e._v(" settings of a Meilisearch index.")]),e._v(" "),s("h4",{attrs:{id:"_3-3-1-get"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get"}},[e._v("#")]),e._v(" 3.3.1. "),s("code",[e._v("GET")])]),e._v(" "),s("h5",{attrs:{id:"_3-3-1-1-get-indexes-index-uid-settings-separator-tokens"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-get-indexes-index-uid-settings-separator-tokens"}},[e._v("#")]),e._v(" 3.3.1.1. "),s("code",[e._v("GET")]),e._v(" - "),s("code",[e._v("indexes/:index_uid/settings/separator-tokens")])]),e._v(" "),s("p",[e._v("Fetch the "),s("code",[e._v("separatorTokens")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),s("p",[s("em",[s("strong",[e._v("Response Definition:")])])]),e._v(" "),s("ul",[s("li",[e._v("Type: Array of String")]),e._v(" "),s("li",[e._v("Default: "),s("code",[e._v("[]")])])]),e._v(" "),s("h5",{attrs:{id:"_3-3-1-2-get-indexes-index-uid-settings-non-separator-tokens"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-2-get-indexes-index-uid-settings-non-separator-tokens"}},[e._v("#")]),e._v(" 3.3.1.2. "),s("code",[e._v("GET")]),e._v(" - "),s("code",[e._v("indexes/:index_uid/settings/non-separator-tokens")])]),e._v(" "),s("p",[e._v("Fetch the "),s("code",[e._v("nonSeparatorTokens")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),s("p",[s("em",[s("strong",[e._v("Response Definition:")])])]),e._v(" "),s("ul",[s("li",[e._v("Type: Array of String")]),e._v(" "),s("li",[e._v("Default: "),s("code",[e._v("[]")])])]),e._v(" "),s("h5",{attrs:{id:"_3-3-1-3-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-3-errors"}},[e._v("#")]),e._v(" 3.3.1.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("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"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-put"}},[e._v("#")]),e._v(" 3.3.2. "),s("code",[e._v("PUT")])]),e._v(" "),s("h5",{attrs:{id:"_3-3-2-1-put-indexes-index-uid-settings-separator-tokens"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-1-put-indexes-index-uid-settings-separator-tokens"}},[e._v("#")]),e._v(" 3.3.2.1. "),s("code",[e._v("PUT")]),e._v(" - "),s("code",[e._v("indexes/:index_uid/settings/separator-tokens")])]),e._v(" "),s("p",[e._v("Modify the "),s("code",[e._v("separatorTokens")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),s("h6",{attrs:{id:"_3-3-2-1-1-request-payload-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-1-1-request-payload-definition"}},[e._v("#")]),e._v(" 3.3.2.1.1. Request Payload Definition")]),e._v(" "),s("ul",[s("li",[e._v("Type: Array of String / "),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:"#3331-delete---indexesindexuidsettingsseparator-tokens"}},[e._v("3.3.3.1. "),s("code",[e._v("DELETE")]),e._v(" - "),s("code",[e._v("indexes/:index_uid/settings/separator-tokens")])]),e._v(" API endpoint.")]),e._v(" "),s("h6",{attrs:{id:"_3-3-2-1-2-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-1-2-response-definition"}},[e._v("#")]),e._v(" 3.3.2.1.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-2-put-indexes-index-uid-settings-non-separator-tokens"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-2-put-indexes-index-uid-settings-non-separator-tokens"}},[e._v("#")]),e._v(" 3.3.2.2. "),s("code",[e._v("PUT")]),e._v(" - "),s("code",[e._v("indexes/:index_uid/settings/non-separator-tokens")])]),e._v(" "),s("p",[e._v("Modify the "),s("code",[e._v("nonSeparatorTokens")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),s("h6",{attrs:{id:"_3-3-2-2-1-request-payload-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-2-1-request-payload-definition"}},[e._v("#")]),e._v(" 3.3.2.2.1. Request Payload Definition")]),e._v(" "),s("ul",[s("li",[e._v("Type: Array of String / "),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:"#3332-delete---indexesindexuidsettingsnon-separator-tokens"}},[e._v("3.3.3.2. "),s("code",[e._v("DELETE")]),e._v(" - "),s("code",[e._v("indexes/:index_uid/settings/non-separator-tokens")])]),e._v(" API endpoint.")]),e._v(" "),s("h6",{attrs:{id:"_3-3-2-2-2-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-2-2-response-definition"}},[e._v("#")]),e._v(" 3.3.2.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("Array of String")]),e._v(", "),s("code",[e._v("[]")]),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_stop_words"}},[e._v("invalid_settings_stop_words")]),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"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-delete"}},[e._v("#")]),e._v(" 3.3.3. "),s("code",[e._v("DELETE")])]),e._v(" "),s("h5",{attrs:{id:"_3-3-3-1-delete-indexes-index-uid-settings-separator-tokens"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-1-delete-indexes-index-uid-settings-separator-tokens"}},[e._v("#")]),e._v(" 3.3.3.1 "),s("code",[e._v("DELETE")]),e._v(" - "),s("code",[e._v("indexes/:index_uid/settings/separator-tokens")])]),e._v(" "),s("p",[e._v("Reset the "),s("code",[e._v("separatorTokens")]),e._v(" setting of a Meilisearch index to the default value "),s("code",[e._v("[]")]),e._v(".")]),e._v(" "),s("h6",{attrs:{id:"_3-3-3-1-1-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-1-1-response-definition"}},[e._v("#")]),e._v(" 3.3.3.1.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-2-delete-indexes-index-uid-settings-non-separator-tokens"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-2-delete-indexes-index-uid-settings-non-separator-tokens"}},[e._v("#")]),e._v(" 3.3.3.2 "),s("code",[e._v("DELETE")]),e._v(" - "),s("code",[e._v("indexes/:index_uid/settings/non-separator-tokens")])]),e._v(" "),s("p",[e._v("Reset the "),s("code",[e._v("nonSeparatorTokens")]),e._v(" setting of a Meilisearch index to the default value "),s("code",[e._v("[]")]),e._v(".")]),e._v(" "),s("h6",{attrs:{id:"_3-3-3-2-1-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-2-1-response-definition"}},[e._v("#")]),e._v(" 3.3.3.2.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-triggering-documents-re-indexing"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-triggering-documents-re-indexing"}},[e._v("#")]),e._v(" 4.1. Triggering Documents Re-Indexing")]),e._v(" "),s("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(" "),s("p",[e._v("Modifying this index setting cause documents to be re-indexed.")]),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("p",[e._v("n/a")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[43],{465:function(e,t,s){"use strict";s.r(t);var a=s(62),i=Object(a.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:"separators-setting-api"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#separators-setting-api"}},[e._v("#")]),e._v(" Separators 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("separatorTokens")]),e._v(" and "),s("code",[e._v("nonSeparatorTokens")]),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("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",[s("em",[s("strong",[e._v("Request payload "),s("code",[e._v("PUT")]),e._v("- "),s("code",[e._v("/indexes/articles/settings/separator-tokens")])])])]),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("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"|"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"/"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"&sep"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),s("p",[s("em",[s("strong",[e._v("Request payload "),s("code",[e._v("PUT")]),e._v("- "),s("code",[e._v("/indexes/articles/settings/non-separator-tokens")])])])]),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("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"@"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[e._v('"#"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),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("separatorTokens")]),e._v(" and "),s("code",[e._v("nonSeparatorTokens")]),e._v(" are sub-resources 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("separatorTokens")]),e._v(" and "),s("code",[e._v("nonSeparatorTokens")]),e._v(" settings of a Meilisearch index.")]),e._v(" "),s("h4",{attrs:{id:"_3-3-1-get"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get"}},[e._v("#")]),e._v(" 3.3.1. "),s("code",[e._v("GET")])]),e._v(" "),s("h5",{attrs:{id:"_3-3-1-1-get-indexes-index-uid-settings-separator-tokens"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-get-indexes-index-uid-settings-separator-tokens"}},[e._v("#")]),e._v(" 3.3.1.1. "),s("code",[e._v("GET")]),e._v(" - "),s("code",[e._v("indexes/:index_uid/settings/separator-tokens")])]),e._v(" "),s("p",[e._v("Fetch the "),s("code",[e._v("separatorTokens")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),s("p",[s("em",[s("strong",[e._v("Response Definition:")])])]),e._v(" "),s("ul",[s("li",[e._v("Type: Array of String")]),e._v(" "),s("li",[e._v("Default: "),s("code",[e._v("[]")])])]),e._v(" "),s("h5",{attrs:{id:"_3-3-1-2-get-indexes-index-uid-settings-non-separator-tokens"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-2-get-indexes-index-uid-settings-non-separator-tokens"}},[e._v("#")]),e._v(" 3.3.1.2. "),s("code",[e._v("GET")]),e._v(" - "),s("code",[e._v("indexes/:index_uid/settings/non-separator-tokens")])]),e._v(" "),s("p",[e._v("Fetch the "),s("code",[e._v("nonSeparatorTokens")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),s("p",[s("em",[s("strong",[e._v("Response Definition:")])])]),e._v(" "),s("ul",[s("li",[e._v("Type: Array of String")]),e._v(" "),s("li",[e._v("Default: "),s("code",[e._v("[]")])])]),e._v(" "),s("h5",{attrs:{id:"_3-3-1-3-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-3-errors"}},[e._v("#")]),e._v(" 3.3.1.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("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"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-put"}},[e._v("#")]),e._v(" 3.3.2. "),s("code",[e._v("PUT")])]),e._v(" "),s("h5",{attrs:{id:"_3-3-2-1-put-indexes-index-uid-settings-separator-tokens"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-1-put-indexes-index-uid-settings-separator-tokens"}},[e._v("#")]),e._v(" 3.3.2.1. "),s("code",[e._v("PUT")]),e._v(" - "),s("code",[e._v("indexes/:index_uid/settings/separator-tokens")])]),e._v(" "),s("p",[e._v("Modify the "),s("code",[e._v("separatorTokens")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),s("h6",{attrs:{id:"_3-3-2-1-1-request-payload-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-1-1-request-payload-definition"}},[e._v("#")]),e._v(" 3.3.2.1.1. Request Payload Definition")]),e._v(" "),s("ul",[s("li",[e._v("Type: Array of String / "),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:"#3331-delete---indexesindexuidsettingsseparator-tokens"}},[e._v("3.3.3.1. "),s("code",[e._v("DELETE")]),e._v(" - "),s("code",[e._v("indexes/:index_uid/settings/separator-tokens")])]),e._v(" API endpoint.")]),e._v(" "),s("h6",{attrs:{id:"_3-3-2-1-2-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-1-2-response-definition"}},[e._v("#")]),e._v(" 3.3.2.1.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-2-put-indexes-index-uid-settings-non-separator-tokens"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-2-put-indexes-index-uid-settings-non-separator-tokens"}},[e._v("#")]),e._v(" 3.3.2.2. "),s("code",[e._v("PUT")]),e._v(" - "),s("code",[e._v("indexes/:index_uid/settings/non-separator-tokens")])]),e._v(" "),s("p",[e._v("Modify the "),s("code",[e._v("nonSeparatorTokens")]),e._v(" setting of a Meilisearch index.")]),e._v(" "),s("h6",{attrs:{id:"_3-3-2-2-1-request-payload-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-2-1-request-payload-definition"}},[e._v("#")]),e._v(" 3.3.2.2.1. Request Payload Definition")]),e._v(" "),s("ul",[s("li",[e._v("Type: Array of String / "),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:"#3332-delete---indexesindexuidsettingsnon-separator-tokens"}},[e._v("3.3.3.2. "),s("code",[e._v("DELETE")]),e._v(" - "),s("code",[e._v("indexes/:index_uid/settings/non-separator-tokens")])]),e._v(" API endpoint.")]),e._v(" "),s("h6",{attrs:{id:"_3-3-2-2-2-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-2-2-response-definition"}},[e._v("#")]),e._v(" 3.3.2.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("Array of String")]),e._v(", "),s("code",[e._v("[]")]),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_stop_words"}},[e._v("invalid_settings_stop_words")]),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"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-delete"}},[e._v("#")]),e._v(" 3.3.3. "),s("code",[e._v("DELETE")])]),e._v(" "),s("h5",{attrs:{id:"_3-3-3-1-delete-indexes-index-uid-settings-separator-tokens"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-1-delete-indexes-index-uid-settings-separator-tokens"}},[e._v("#")]),e._v(" 3.3.3.1 "),s("code",[e._v("DELETE")]),e._v(" - "),s("code",[e._v("indexes/:index_uid/settings/separator-tokens")])]),e._v(" "),s("p",[e._v("Reset the "),s("code",[e._v("separatorTokens")]),e._v(" setting of a Meilisearch index to the default value "),s("code",[e._v("[]")]),e._v(".")]),e._v(" "),s("h6",{attrs:{id:"_3-3-3-1-1-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-1-1-response-definition"}},[e._v("#")]),e._v(" 3.3.3.1.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-2-delete-indexes-index-uid-settings-non-separator-tokens"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-2-delete-indexes-index-uid-settings-non-separator-tokens"}},[e._v("#")]),e._v(" 3.3.3.2 "),s("code",[e._v("DELETE")]),e._v(" - "),s("code",[e._v("indexes/:index_uid/settings/non-separator-tokens")])]),e._v(" "),s("p",[e._v("Reset the "),s("code",[e._v("nonSeparatorTokens")]),e._v(" setting of a Meilisearch index to the default value "),s("code",[e._v("[]")]),e._v(".")]),e._v(" "),s("h6",{attrs:{id:"_3-3-3-2-1-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-2-1-response-definition"}},[e._v("#")]),e._v(" 3.3.3.2.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-triggering-documents-re-indexing"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-triggering-documents-re-indexing"}},[e._v("#")]),e._v(" 4.1. Triggering Documents Re-Indexing")]),e._v(" "),s("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(" "),s("p",[e._v("Modifying this index setting cause documents to be re-indexed.")]),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("p",[e._v("n/a")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/44.437489b6.js b/docs/assets/js/44.7f7f2a04.js similarity index 99% rename from docs/assets/js/44.437489b6.js rename to docs/assets/js/44.7f7f2a04.js index d3b557a98..0b8164ab9 100644 --- a/docs/assets/js/44.437489b6.js +++ b/docs/assets/js/44.7f7f2a04.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[44],{467: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],{466: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/46.7f495a96.js b/docs/assets/js/46.28bc0390.js similarity index 99% rename from docs/assets/js/46.7f495a96.js rename to docs/assets/js/46.28bc0390.js index a250012a1..2c40b620e 100644 --- a/docs/assets/js/46.7f495a96.js +++ b/docs/assets/js/46.28bc0390.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],{469: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/49.ed10170c.js b/docs/assets/js/49.b53c1109.js similarity index 99% rename from docs/assets/js/49.ed10170c.js rename to docs/assets/js/49.b53c1109.js index 3203a7b0c..96b3e5282 100644 --- a/docs/assets/js/49.ed10170c.js +++ b/docs/assets/js/49.b53c1109.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[49],{474:function(e,t,r){"use strict";r.r(t);var i=r(62),a=Object(i.a)({},(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"documents-api"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#documents-api"}},[e._v("#")]),e._v(" Documents API")]),e._v(" "),r("h2",{attrs:{id:"_1-summary"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),r("p",[e._v("This specification describes the documents API endpoints permitting to list, fetch, add/replace, and delete index documents.")]),e._v(" "),r("p",[e._v("It is an API dedicated to document management within the Meilisearch index.")]),e._v(" "),r("h2",{attrs:{id:"_2-motivation"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),r("p",[e._v("N/A")]),e._v(" "),r("h2",{attrs:{id:"_3-functional-specification"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),r("p",[e._v("Documents are objects composed of fields that can store any type of data.\nEach field contains an attribute and its associated value.")]),e._v(" "),r("p",[e._v("Documents are stored inside indexes.")]),e._v(" "),r("h3",{attrs:{id:"_3-1-api-endpoints-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.1. API Endpoints Definition")]),e._v(" "),r("p",[e._v("Manipulate documents of a Meilisearch index.")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#311-fetch-documents-get-indexesindexuiddocuments-and-post-indexesindexuiddocumentsfetch"}},[e._v("3.1.1. (Fetch Documents) - "),r("code",[e._v("GET")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents")]),e._v(" and "),r("code",[e._v("POST")]),e._v(" - `indexes/:index_uid/documents/fetch")])]),e._v(" "),r("li",[r("a",{attrs:{href:"#312-get---indexesindexuiddocumentsdocumentid"}},[e._v("3.1.2. "),r("code",[e._v("GET")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents/:document_id")])])]),e._v(" "),r("li",[r("a",{attrs:{href:"#313-post---indexesindexuiddocuments"}},[e._v("3.1.3. "),r("code",[e._v("POST")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents")])])]),e._v(" "),r("li",[r("a",{attrs:{href:"#314-put---indexesindexuiddocuments"}},[e._v("3.1.4. "),r("code",[e._v("PUT")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents")])])]),e._v(" "),r("li",[r("a",{attrs:{href:"#315-delete---indexesindexuiddocuments"}},[e._v("3.1.5. "),r("code",[e._v("DELETE")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents")])])]),e._v(" "),r("li",[r("a",{attrs:{href:"#316-delete---indexesindexuiddocumentsdocumentid"}},[e._v("3.1.6. "),r("code",[e._v("DELETE")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents/:document_id")])])]),e._v(" "),r("li",[r("a",{attrs:{href:"#317-post---indexesindexuiddocumentsdelete-batch"}},[e._v("3.1.7. "),r("code",[e._v("POST")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents/delete-batch")])])])]),e._v(" "),r("h4",{attrs:{id:"_3-1-1-fetch-documents-get-indexes-index-uid-documents-and-post-indexes-index-uid-documents-fetch"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-fetch-documents-get-indexes-index-uid-documents-and-post-indexes-index-uid-documents-fetch"}},[e._v("#")]),e._v(" 3.1.1. (Fetch Documents) - "),r("code",[e._v("GET")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents")]),e._v(" and "),r("code",[e._v("POST")]),e._v(" - `indexes/:index_uid/documents/fetch")]),e._v(" "),r("p",[e._v("Meilisearch exposes 2 routes to get the documents:")]),e._v(" "),r("ul",[r("li",[e._v("GET "),r("code",[e._v("indexes/:index_uid/documents")]),e._v(", which gets its parameters as query parameters.")]),e._v(" "),r("li",[e._v("POST "),r("code",[e._v("indexes/:index_uid/documents/fetch")]),e._v(", which gets its parameters in a JSON payload.")])]),e._v(" "),r("p",[e._v("List all documents of a Meilisearch index.")]),e._v(" "),r("p",[e._v("The query parameters "),r("code",[e._v("offset")]),e._v(" and "),r("code",[e._v("limit")]),e._v(" permit browsing through all documents of an index.")]),e._v(" "),r("p",[e._v("Meilisearch orders documents depending on the order they were inserted in the db.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-1-path-parameters"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-path-parameters"}},[e._v("#")]),e._v(" 3.1.1.1. Path Parameters")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Parameters")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("index_uid")])]),e._v(" "),r("td",[e._v("String")]),e._v(" "),r("td",[e._v("true")])])])]),e._v(" "),r("h6",{attrs:{id:"_3-1-1-1-1-index-uid"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-1-index-uid"}},[e._v("#")]),e._v(" 3.1.1.1.1. "),r("code",[e._v("index_uid")])]),e._v(" "),r("ul",[r("li",[e._v("Type: String")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Unique identifier of an index.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-2-parameters"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-parameters"}},[e._v("#")]),e._v(" 3.1.1.2. Parameters")]),e._v(" "),r("p",[e._v("The following parameters need to be send as:")]),e._v(" "),r("ul",[r("li",[e._v("Query parameter for the "),r("code",[e._v("GET")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents")]),e._v(" route.")]),e._v(" "),r("li",[e._v("JSON body for the "),r("code",[e._v("POST")]),e._v("indexes/:index_uid/documents/fetch` route.")])]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Field")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("offset")])]),e._v(" "),r("td",[e._v("Integer")]),e._v(" "),r("td",[e._v("false")])]),e._v(" "),r("tr",[r("td",[r("code",[e._v("limit")])]),e._v(" "),r("td",[e._v("Integer")]),e._v(" "),r("td",[e._v("false")])]),e._v(" "),r("tr",[r("td",[r("code",[e._v("fields")])]),e._v(" "),r("td",[e._v("Array of Strings / "),r("code",[e._v("null")])]),e._v(" "),r("td",[e._v("false")])]),e._v(" "),r("tr",[r("td",[r("code",[e._v("filter")])]),e._v(" "),r("td",[e._v("filter / "),r("code",[e._v("null")])]),e._v(" "),r("td",[e._v("false")])])])]),e._v(" "),r("p",[e._v("In the case of the query parameter, as always, the "),r("code",[e._v("filter")]),e._v(" can only be a string, while it can be either a string, an array of strings, or an array of array of strings for the JSON body.")]),e._v(" "),r("h6",{attrs:{id:"_3-1-1-2-1-offset"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-1-offset"}},[e._v("#")]),e._v(" 3.1.1.2.1. "),r("code",[e._v("offset")])]),e._v(" "),r("ul",[r("li",[e._v("Type: Integer")]),e._v(" "),r("li",[e._v("Required: False")]),e._v(" "),r("li",[e._v("Default: "),r("code",[e._v("0")])])]),e._v(" "),r("p",[e._v("Sets the starting point in the results, effectively skipping over a given number of documents.")]),e._v(" "),r("h6",{attrs:{id:"_3-1-1-2-2-limit"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-2-limit"}},[e._v("#")]),e._v(" 3.1.1.2.2. "),r("code",[e._v("limit")])]),e._v(" "),r("ul",[r("li",[e._v("Type: Integer")]),e._v(" "),r("li",[e._v("Required: False")]),e._v(" "),r("li",[e._v("Default: "),r("code",[e._v("20")])])]),e._v(" "),r("p",[e._v("Sets the maximum number of documents to be returned by the current request.")]),e._v(" "),r("h6",{attrs:{id:"_3-1-1-2-3-fields"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-3-fields"}},[e._v("#")]),e._v(" 3.1.1.2.3. "),r("code",[e._v("fields")])]),e._v(" "),r("ul",[r("li",[e._v("Type: Array of Strings")]),e._v(" "),r("li",[e._v("Required: False")]),e._v(" "),r("li",[e._v("Default: "),r("code",[e._v("*")])])]),e._v(" "),r("p",[e._v("Configures which attributes will be retrieved in the returned documents.")]),e._v(" "),r("p",[e._v("If "),r("code",[e._v("fields")]),e._v(" is not specified, all attributes from the documents are returned in the response. It's equivalent to "),r("code",[e._v("fields=*")]),e._v(".")]),e._v(" "),r("ul",[r("li",[e._v("Sending "),r("code",[e._v("fields")]),e._v(" without specifying a value, returns empty documents ressources. "),r("code",[e._v("fields=")]),e._v(".")]),e._v(" "),r("li",[e._v("Sending "),r("code",[e._v("fields")]),e._v(" with a non-existent field as part of the value will not return an error, the non-existent field will not be displayed.")])]),e._v(" "),r("blockquote",[r("p",[r("code",[e._v("fields")]),e._v(" values are case-sensitive.")])]),e._v(" "),r("blockquote",[r("p",[e._v("Specified fields have to be separated by a comma. e.g. "),r("code",[e._v("&fields=title,description")])])]),e._v(" "),r("blockquote",[r("p",[e._v("The index setting "),r("code",[e._v("displayedAttributes")]),e._v(" has no impact on this endpoint.")])]),e._v(" "),r("h6",{attrs:{id:"_3-1-1-2-4-filter"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-4-filter"}},[e._v("#")]),e._v(" 3.1.1.2.4. "),r("code",[e._v("filter")])]),e._v(" "),r("ul",[r("li",[e._v("Type: String | Array of array of Strings")]),e._v(" "),r("li",[e._v("Required: False")]),e._v(" "),r("li",[e._v("Default: null")])]),e._v(" "),r("p",[e._v("Refine the results by selecting documents that match the given filter.\nIn the case of the POST route, it is possible to send the filter in the form of an array of array of strings akin to the search route.")]),e._v(" "),r("p",[e._v("Attributes used as filter criteria must be added to the "),r("code",[e._v("filterableAttributes")]),e._v(" list of an index settings. See "),r("RouterLink",{attrs:{to:"/specifications/text/0123-filterable-attributes-setting-api.html"}},[e._v("Filterable Attributes Setting API")]),e._v(".")],1),e._v(" "),r("h5",{attrs:{id:"_3-1-1-3-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-response-definition"}},[e._v("#")]),e._v(" 3.1.1.3. Response Definition")]),e._v(" "),r("p",[e._v("A "),r("code",[e._v("results")]),e._v(" array representing documents as JSON objects.")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Field")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("results")])]),e._v(" "),r("td",[e._v("Array[Document]")]),e._v(" "),r("td",[e._v("true")])]),e._v(" "),r("tr",[r("td",[r("code",[e._v("offset")])]),e._v(" "),r("td",[e._v("Integer")]),e._v(" "),r("td",[e._v("true")])]),e._v(" "),r("tr",[r("td",[r("code",[e._v("limit")])]),e._v(" "),r("td",[e._v("Integer")]),e._v(" "),r("td",[e._v("true")])]),e._v(" "),r("tr",[r("td",[r("code",[e._v("total")])]),e._v(" "),r("td",[e._v("Integer")]),e._v(" "),r("td",[e._v("true")])])])]),e._v(" "),r("h6",{attrs:{id:"_3-1-1-3-1-results"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-1-results"}},[e._v("#")]),e._v(" 3.1.1.3.1. "),r("code",[e._v("results")])]),e._v(" "),r("ul",[r("li",[e._v("Type: Array[Document]")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("An array containing the fetched documents.")]),e._v(" "),r("h6",{attrs:{id:"_3-1-1-3-2-offset"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-2-offset"}},[e._v("#")]),e._v(" 3.1.1.3.2. "),r("code",[e._v("offset")])]),e._v(" "),r("ul",[r("li",[e._v("Type: Integer")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Gives the "),r("code",[e._v("offset")]),e._v(" parameter used for the query.")]),e._v(" "),r("blockquote",[r("p",[e._v("See "),r("a",{attrs:{href:"#31121-offset"}},[e._v("3.1.1.2.1. "),r("code",[e._v("offset")])]),e._v(" section.")])]),e._v(" "),r("h6",{attrs:{id:"_3-1-1-3-3-limit"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-3-limit"}},[e._v("#")]),e._v(" 3.1.1.3.3. "),r("code",[e._v("limit")])]),e._v(" "),r("ul",[r("li",[e._v("Type: Integer")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Gives the "),r("code",[e._v("limit")]),e._v(" parameter used for the query.")]),e._v(" "),r("blockquote",[r("p",[e._v("See "),r("a",{attrs:{href:"#31122-limit"}},[e._v("3.1.1.2.2. "),r("code",[e._v("limit")])]),e._v(" section.")])]),e._v(" "),r("h6",{attrs:{id:"_3-1-1-3-3-total"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-3-total"}},[e._v("#")]),e._v(" 3.1.1.3.3. "),r("code",[e._v("total")])]),e._v(" "),r("ul",[r("li",[e._v("Type: Integer")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Gives the total number of documents that can be browsed in the related index.")]),e._v(" "),r("h6",{attrs:{id:"_3-1-1-3-4-example"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-4-example"}},[e._v("#")]),e._v(" 3.1.1.3.4. Example")]),e._v(" "),r("div",{staticClass:"language-json extra-class"},[r("pre",{pre:!0,attrs:{class:"language-json"}},[r("code",[r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"results"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"id"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token number"}},[e._v("25684")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"title"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"American Ninja 5"')]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"id"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token number"}},[e._v("468219")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"title"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Dead in a Week (Or Your Money Back)"')]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"offset"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"limit"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"total"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token number"}},[e._v("3")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token comment"}},[e._v("//The index contains 3 documents in total")]),e._v("\n"),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),r("h5",{attrs:{id:"_3-1-1-4-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-4-errors"}},[e._v("#")]),e._v(" 3.1.1.4. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Sending an invalid index uid format for the "),r("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a value with a different type than "),r("code",[e._v("Integer")]),e._v(" or "),r("code",[e._v("null")]),e._v(" for "),r("code",[e._v("offset")]),e._v(" will return a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_document_offset"}},[e._v("invalid_document_offset")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a value with a different type than "),r("code",[e._v("Integer")]),e._v(" or "),r("code",[e._v("null")]),e._v(" for "),r("code",[e._v("limit")]),e._v(" will return a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_document_limit"}},[e._v("invalid_document_limit")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a value with a different type than "),r("code",[e._v("String")]),e._v(" or "),r("code",[e._v("null")]),e._v(" for "),r("code",[e._v("fields")]),e._v(" will return a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_document_fields"}},[e._v("invalid_document_fields")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a value with a different type than "),r("code",[e._v("String")]),e._v(", "),r("code",[e._v("Array of strings")]),e._v(", "),r("code",[e._v("Array of array of strings")]),e._v(" or "),r("code",[e._v("null")]),e._v(" for "),r("code",[e._v("filter")]),e._v(" will return a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_document_filter"}},[e._v("invalid_document_filter")]),e._v(" error.")],1)]),e._v(" "),r("h4",{attrs:{id:"_3-1-2-get-indexes-index-uid-documents-document-id"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-get-indexes-index-uid-documents-document-id"}},[e._v("#")]),e._v(" 3.1.2. "),r("code",[e._v("GET")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents/:document_id")])]),e._v(" "),r("p",[e._v("Get a document using its unique id.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-2-1-path-parameters"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-path-parameters"}},[e._v("#")]),e._v(" 3.1.2.1. Path Parameters")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Parameters")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("index_uid")])]),e._v(" "),r("td",[e._v("String")]),e._v(" "),r("td",[e._v("true")])]),e._v(" "),r("tr",[r("td",[r("code",[e._v("document_id")])]),e._v(" "),r("td",[e._v("String / "),r("code",[e._v("null")])]),e._v(" "),r("td",[e._v("true")])])])]),e._v(" "),r("h6",{attrs:{id:"_3-1-2-1-1-index-uid"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-1-index-uid"}},[e._v("#")]),e._v(" 3.1.2.1.1. "),r("code",[e._v("index_uid")])]),e._v(" "),r("ul",[r("li",[e._v("Type: String")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Unique identifier of an index.")]),e._v(" "),r("h6",{attrs:{id:"_3-1-2-1-2-document-id"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-2-document-id"}},[e._v("#")]),e._v(" 3.1.2.1.2. "),r("code",[e._v("document_id")])]),e._v(" "),r("ul",[r("li",[e._v("Type: Integer")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Unique identifier of a document.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-2-2-query-parameters"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-2-query-parameters"}},[e._v("#")]),e._v(" 3.1.2.2. Query Parameters")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Field")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("fields")])]),e._v(" "),r("td",[e._v("String / "),r("code",[e._v("null")])]),e._v(" "),r("td",[e._v("false")])])])]),e._v(" "),r("h6",{attrs:{id:"_3-1-2-2-1-fields"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-2-1-fields"}},[e._v("#")]),e._v(" 3.1.2.2.1. "),r("code",[e._v("fields")])]),e._v(" "),r("ul",[r("li",[e._v("Type: String")]),e._v(" "),r("li",[e._v("Required: False")]),e._v(" "),r("li",[e._v("Default: "),r("code",[e._v("*")])])]),e._v(" "),r("p",[e._v("Configures which attributes will be retrieved in the returned documents.")]),e._v(" "),r("p",[e._v("If "),r("code",[e._v("fields")]),e._v(" is not specified, all attributes from the documents are returned in the response. It's equivalent to "),r("code",[e._v("fields=*")]),e._v(".")]),e._v(" "),r("ul",[r("li",[e._v("Sending "),r("code",[e._v("fields")]),e._v(" without specifying a value, returns empty documents ressources. "),r("code",[e._v("fields=")]),e._v(".")]),e._v(" "),r("li",[e._v("Sending "),r("code",[e._v("fields")]),e._v(" with a non-existent field as part of the value will not return an error, the non-existent field will not be displayed.")])]),e._v(" "),r("blockquote",[r("p",[r("code",[e._v("fields")]),e._v(" values are case-sensitive.")])]),e._v(" "),r("blockquote",[r("p",[e._v("Specified fields have to be separated by a comma. e.g. "),r("code",[e._v("&fields=title,description")])])]),e._v(" "),r("blockquote",[r("p",[e._v("The index setting "),r("code",[e._v("displayedAttributes")]),e._v(" has no impact on this endpoint.")])]),e._v(" "),r("h5",{attrs:{id:"_3-1-2-3-request-payload-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-3-request-payload-definition"}},[e._v("#")]),e._v(" 3.1.2.3. Request Payload Definition")]),e._v(" "),r("p",[e._v("N/A")]),e._v(" "),r("h5",{attrs:{id:"_3-1-2-4-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-4-response-definition"}},[e._v("#")]),e._v(" 3.1.2.4. Response Definition")]),e._v(" "),r("p",[e._v("A document represented as a JSON object.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-2-4-1-example"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-4-1-example"}},[e._v("#")]),e._v(" 3.1.2.4.1. Example")]),e._v(" "),r("div",{staticClass:"language-json extra-class"},[r("pre",{pre:!0,attrs:{class:"language-json"}},[r("code",[r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"id"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token number"}},[e._v("25684")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"title"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"American Ninja 5"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"poster"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"overview"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja."')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"release_date"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"1993-01-01"')]),e._v("\n"),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),r("h5",{attrs:{id:"_3-1-2-5-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-5-errors"}},[e._v("#")]),e._v(" 3.1.2.5. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Sending an invalid index uid format for the "),r("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 If the requested "),r("code",[e._v("document_id")]),e._v(" does not exist, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#document_not_found"}},[e._v("document_not_found")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a value with a different type than "),r("code",[e._v("String")]),e._v(" or "),r("code",[e._v("null")]),e._v(" for "),r("code",[e._v("fields")]),e._v(" will return a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_document_fields"}},[e._v("invalid_document_fields")]),e._v(" error.")],1)]),e._v(" "),r("h4",{attrs:{id:"_3-1-3-documents-body-special-properties"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-documents-body-special-properties"}},[e._v("#")]),e._v(" 3.1.3. Documents Body Special Properties")]),e._v(" "),r("p",[e._v("While the body of a document can contain any pair of keys and values, Meilisearch uses specific key names to leverage some search capabilities such as geo search and vector search.")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Field")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("a",{attrs:{href:"#3131-_geo"}},[r("code",[e._v("_geo")])])]),e._v(" "),r("td",[e._v("String")]),e._v(" "),r("td",[e._v("Object")])]),e._v(" "),r("tr",[r("td",[r("a",{attrs:{href:"#3132-_vectors-experimental"}},[r("code",[e._v("_vectors")])]),e._v(" "),r("code",[e._v("EXPERIMENTAL")])]),e._v(" "),r("td",[e._v("Array of Float")]),e._v(" "),r("td",[e._v("Array[Array of Float]")])])])]),e._v(" "),r("h5",{attrs:{id:"_3-1-3-1-geo"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-1-geo"}},[e._v("#")]),e._v(" 3.1.3.1. "),r("code",[e._v("_geo")])]),e._v(" "),r("p",[e._v("Holds latitude and longitude geo coordinates for a document.")]),e._v(" "),r("p",[e._v("Refer to the "),r("RouterLink",{attrs:{to:"/specifications/text/0059-geo-search.html"}},[e._v("geo search specification")])],1),e._v(" "),r("h5",{attrs:{id:"_3-1-3-2-vectors-experimental"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-2-vectors-experimental"}},[e._v("#")]),e._v(" 3.1.3.2. "),r("code",[e._v("_vectors")]),e._v(" "),r("code",[e._v("EXPERIMENTAL")])]),e._v(" "),r("p",[e._v("Type: Array of Float | Array[Array of Float]\nRequired: False")]),e._v(" "),r("p",[e._v("Holds a vectorized representation of a document. It is possible to send either one or several vectorized representations of the same document.")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Sending a value with a different type than "),r("code",[e._v("Array of Float")]),e._v(", "),r("code",[e._v("Array[Array of Float]")]),e._v(" or "),r("code",[e._v("null")]),e._v(" as a value for "),r("code",[e._v("_vectors")]),e._v(" returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_document_vectors_field"}},[e._v("invalid_document_vectors_field")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a value for "),r("code",[e._v("_vectors")]),e._v(" whose length differs from another document "),r("code",[e._v("_vectors")]),e._v(" field returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_document_vectors_field"}},[e._v("invalid_document_vectors_field")]),e._v(" error.")],1)]),e._v(" "),r("h4",{attrs:{id:"_3-1-4-post-indexes-index-uid-documents"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-post-indexes-index-uid-documents"}},[e._v("#")]),e._v(" 3.1.4. "),r("code",[e._v("POST")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents")])]),e._v(" "),r("p",[e._v("Add a list of documents or replace them if they already exist.")]),e._v(" "),r("p",[e._v("If the provided index does not exist, it will be created. See "),r("a",{attrs:{href:"#3145-lazy-index-creation"}},[e._v("3.1.3.5. Lazy Index Creation")])]),e._v(" "),r("p",[e._v("If an already existing document (same document id) is sent, the whole existing document will be overwritten by the new document.")]),e._v(" "),r("p",[e._v("Fields that are no longer present in the new document are removed.")]),e._v(" "),r("p",[e._v("This endpoint accepts various content-type:")]),e._v(" "),r("ul",[r("li",[r("RouterLink",{attrs:{to:"/specifications/text/0135-indexing-json.html"}},[r("code",[e._v("application/json")])])],1),e._v(" "),r("li",[r("RouterLink",{attrs:{to:"/specifications/text/0028-indexing-csv.html"}},[r("code",[e._v("text/csv")])])],1),e._v(" "),r("li",[r("RouterLink",{attrs:{to:"/specifications/text/0029-indexing-ndjson.html"}},[r("code",[e._v("application/x-ndjson")])])],1)]),e._v(" "),r("h5",{attrs:{id:"_3-1-4-1-path-parameters"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-1-path-parameters"}},[e._v("#")]),e._v(" 3.1.4.1. Path Parameters")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Field")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("index_uid")])]),e._v(" "),r("td",[e._v("String")]),e._v(" "),r("td",[e._v("True")])])])]),e._v(" "),r("h6",{attrs:{id:"_3-1-4-1-1-index-uid"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-1-1-index-uid"}},[e._v("#")]),e._v(" 3.1.4.1.1 "),r("code",[e._v("index_uid")])]),e._v(" "),r("ul",[r("li",[e._v("Type: String")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Unique identifier of an index.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-4-2-request-payload-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-2-request-payload-definition"}},[e._v("#")]),e._v(" 3.1.4.2. Request Payload Definition")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Field")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("primaryKey")])]),e._v(" "),r("td",[e._v("String")]),e._v(" "),r("td",[e._v("False")])])])]),e._v(" "),r("h6",{attrs:{id:"_3-1-4-2-1-primarykey"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-2-1-primarykey"}},[e._v("#")]),e._v(" 3.1.4.2.1 "),r("code",[e._v("primaryKey")])]),e._v(" "),r("ul",[r("li",[e._v("Type: String")]),e._v(" "),r("li",[e._v("Required: False")]),e._v(" "),r("li",[e._v("Default: "),r("code",[e._v("null")])])]),e._v(" "),r("p",[e._v("Allows to bypass the auto-inference mechanism of the document identifiers.")]),e._v(" "),r("p",[e._v("By default, the "),r("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(" "),r("p",[e._v("Specifying this field tells the engine to use the document attribute specified in "),r("code",[e._v("primaryKey")]),e._v(" and bypasses this mechanism.")]),e._v(" "),r("p",[e._v("When the index is empty, it is possible to modify the "),r("code",[e._v("primaryKey")]),e._v(".")]),e._v(" "),r("p",[e._v("If the index is not empty, the query parameter "),r("code",[e._v("primaryKey")]),e._v(" is ignored.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-4-3-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-3-response-definition"}},[e._v("#")]),e._v(" 3.1.4.3. Response Definition")]),e._v(" "),r("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),r("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),r("code",[e._v("task")]),e._v(" Object for "),r("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),r("h5",{attrs:{id:"_3-1-4-4-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-4-errors"}},[e._v("#")]),e._v(" 3.1.4.4. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Omitting Content-Type header returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an empty Content-Type returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a different Content-Type than "),r("code",[e._v("application/json")]),e._v(", "),r("code",[e._v("text/csv")]),e._v(", or "),r("code",[e._v("application/x-ndjson")]),e._v(" returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an empty payload returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid payload returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid index uid format for the "),r("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a value with a different type than "),r("code",[e._v("String")]),e._v(" or "),r("code",[e._v("null")]),e._v(" for the "),r("code",[e._v("primaryKey")]),e._v(" parameter will return a "),r("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(" "),r("h6",{attrs:{id:"_3-1-4-4-1-async-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-4-1-async-errors"}},[e._v("#")]),e._v(" 3.1.4.4.1. Async Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 When Meilisearch is secured, if the API Key do not have the "),r("code",[e._v("indexes.create")]),e._v(" action defined, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related asynchronous "),r("code",[e._v("task")]),e._v(" resource. See "),r("a",{attrs:{href:"#3222-response-definition"}},[e._v("3.2.2.2. Response Definition")]),e._v(".")],1),e._v(" "),r("li",[e._v("🔴 When updating the "),r("code",[e._v("primaryKey")]),e._v(", if the previous "),r("code",[e._v("primaryKey")]),e._v(" value has already been used for a document, the API returns an "),r("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(" "),r("h5",{attrs:{id:"_3-1-4-5-lazy-index-creation"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-5-lazy-index-creation"}},[e._v("#")]),e._v(" 3.1.4.5. Lazy Index Creation")]),e._v(" "),r("p",[e._v("If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, and the authorization layer allows it (See "),r("a",{attrs:{href:"#31341-async-errors"}},[e._v("3.1.3.4.1. Async Errors")]),e._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),r("a",{attrs:{href:"#3133-response-definition"}},[e._v("3.1.3.3. Response Definition")]),e._v(".")]),e._v(" "),r("h4",{attrs:{id:"_3-1-5-put-indexes-index-uid-documents"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-5-put-indexes-index-uid-documents"}},[e._v("#")]),e._v(" 3.1.5. "),r("code",[e._v("PUT")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents")])]),e._v(" "),r("p",[e._v("Add a list of documents or update them if they already exist.")]),e._v(" "),r("p",[e._v("If the provided index does not exist, it will be created. See "),r("a",{attrs:{href:"#3145-lazy-index-creation"}},[e._v("3.1.4.5. Lazy Index Creation")])]),e._v(" "),r("p",[e._v("If an already existing document (same identifier) is set, the old document will be only partially updated according to the fields of the new document. Thus, any fields not present in the new document are kept and remain unchanged.")]),e._v(" "),r("p",[e._v("This endpoint accepts various content-type:")]),e._v(" "),r("ul",[r("li",[r("RouterLink",{attrs:{to:"/specifications/text/0135-indexing-json.html"}},[r("code",[e._v("application/json")])])],1),e._v(" "),r("li",[r("RouterLink",{attrs:{to:"/specifications/text/0028-indexing-csv.html"}},[r("code",[e._v("text/csv")])])],1),e._v(" "),r("li",[r("RouterLink",{attrs:{to:"/specifications/text/0029-indexing-ndjson.html"}},[r("code",[e._v("application/x-ndjson")])])],1)]),e._v(" "),r("h5",{attrs:{id:"_3-1-5-1-path-parameters"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-5-1-path-parameters"}},[e._v("#")]),e._v(" 3.1.5.1. Path Parameters")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Field")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("index_uid")])]),e._v(" "),r("td",[e._v("String")]),e._v(" "),r("td",[e._v("True")])])])]),e._v(" "),r("h6",{attrs:{id:"_3-1-5-1-1-index-uid"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-5-1-1-index-uid"}},[e._v("#")]),e._v(" 3.1.5.1.1. "),r("code",[e._v("index_uid")])]),e._v(" "),r("ul",[r("li",[e._v("Type: String")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Unique identifier of an index.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-5-2-query-parameters-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-5-2-query-parameters-definition"}},[e._v("#")]),e._v(" 3.1.5.2. Query Parameters Definition")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Field")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("primaryKey")])]),e._v(" "),r("td",[e._v("String")]),e._v(" "),r("td",[e._v("False")])])])]),e._v(" "),r("h6",{attrs:{id:"_3-1-5-2-1-primarykey"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-5-2-1-primarykey"}},[e._v("#")]),e._v(" 3.1.5.2.1. "),r("code",[e._v("primaryKey")])]),e._v(" "),r("ul",[r("li",[e._v("Type: String")]),e._v(" "),r("li",[e._v("Required: False")]),e._v(" "),r("li",[e._v("Default: "),r("code",[e._v("null")])])]),e._v(" "),r("p",[e._v("Allows to bypass the auto-inference mechanism of the document identifiers.")]),e._v(" "),r("p",[e._v("By default, the "),r("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(" "),r("p",[e._v("Specifying this field tells the engine to use the document attribute specified in "),r("code",[e._v("primaryKey")]),e._v(" and bypasses this mechanism.")]),e._v(" "),r("p",[e._v("When the index is empty, it is possible to modify the "),r("code",[e._v("primaryKey")]),e._v(".")]),e._v(" "),r("p",[e._v("If the index is not empty, the query parameter "),r("code",[e._v("primaryKey")]),e._v(" is ignored.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-5-3-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-5-3-response-definition"}},[e._v("#")]),e._v(" 3.1.5.3. Response Definition")]),e._v(" "),r("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),r("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),r("code",[e._v("task")]),e._v(" Object for "),r("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),r("h5",{attrs:{id:"_3-1-5-4-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-5-4-errors"}},[e._v("#")]),e._v(" 3.1.5.4. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Omitting Content-Type header returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an empty Content-Type returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a different Content-Type than "),r("code",[e._v("application/json")]),e._v(", "),r("code",[e._v("text/csv")]),e._v(", or "),r("code",[e._v("application/x-ndjson")]),e._v(" returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an empty payload returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid payload returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid index uid format for the "),r("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a value with a different type than "),r("code",[e._v("String")]),e._v(" or "),r("code",[e._v("null")]),e._v(" for the "),r("code",[e._v("primaryKey")]),e._v(" parameter will return a "),r("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(" "),r("h6",{attrs:{id:"_3-1-5-4-1-async-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-5-4-1-async-errors"}},[e._v("#")]),e._v(" 3.1.5.4.1. Async Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 When Meilisearch is secured, if the API Key do not have the "),r("code",[e._v("indexes.create")]),e._v(" action defined, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related asynchronous "),r("code",[e._v("task")]),e._v(" resource. See "),r("a",{attrs:{href:"#3222-response-definition"}},[e._v("3.2.2.2. Response Definition")]),e._v(".")],1),e._v(" "),r("li",[e._v("🔴 When updating the "),r("code",[e._v("primaryKey")]),e._v(", if the previous "),r("code",[e._v("primaryKey")]),e._v(" value has already been used for a document, the API returns an "),r("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(" "),r("h5",{attrs:{id:"_3-1-5-5-lazy-index-creation"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-5-5-lazy-index-creation"}},[e._v("#")]),e._v(" 3.1.5.5. Lazy Index Creation")]),e._v(" "),r("p",[e._v("If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, and the authorization layer allows it (See "),r("a",{attrs:{href:"#31441-async-errors"}},[e._v("3.1.4.4.1. Async Errors")]),e._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),r("a",{attrs:{href:"#3143-response-definition"}},[e._v("3.1.4.3. Response Definition")]),e._v(".")]),e._v(" "),r("h4",{attrs:{id:"_3-1-6-delete-indexes-index-uid-documents"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-6-delete-indexes-index-uid-documents"}},[e._v("#")]),e._v(" 3.1.6. "),r("code",[e._v("DELETE")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents")])]),e._v(" "),r("p",[e._v("Delete all documents in the specified index.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-6-1-path-parameters"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-6-1-path-parameters"}},[e._v("#")]),e._v(" 3.1.6.1. Path Parameters")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Field")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("index_uid")])]),e._v(" "),r("td",[e._v("String")]),e._v(" "),r("td",[e._v("true")])])])]),e._v(" "),r("h6",{attrs:{id:"_3-1-6-1-1-index-uid"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-6-1-1-index-uid"}},[e._v("#")]),e._v(" 3.1.6.1.1. "),r("code",[e._v("index_uid")])]),e._v(" "),r("ul",[r("li",[e._v("Type: String")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Unique identifier of an index.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-6-2-request-payload-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-6-2-request-payload-definition"}},[e._v("#")]),e._v(" 3.1.6.2. Request Payload Definition")]),e._v(" "),r("p",[e._v("N/A")]),e._v(" "),r("h5",{attrs:{id:"_3-1-6-3-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-6-3-response-definition"}},[e._v("#")]),e._v(" 3.1.6.3. Response Definition")]),e._v(" "),r("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),r("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),r("code",[e._v("task")]),e._v(" Object for "),r("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),r("h5",{attrs:{id:"_3-1-6-4-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-6-4-errors"}},[e._v("#")]),e._v(" 3.1.6.4. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Sending an invalid index uid format for the "),r("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1)]),e._v(" "),r("h6",{attrs:{id:"_3-1-6-4-1-async-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-6-4-1-async-errors"}},[e._v("#")]),e._v(" 3.1.6.4.1. Async Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),r("h4",{attrs:{id:"_3-1-7-delete-indexes-index-uid-documents-document-id"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-7-delete-indexes-index-uid-documents-document-id"}},[e._v("#")]),e._v(" 3.1.7. "),r("code",[e._v("DELETE")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents/:document_id")])]),e._v(" "),r("p",[e._v("Delete one document based on its unique id.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-7-1-path-parameters"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-7-1-path-parameters"}},[e._v("#")]),e._v(" 3.1.7.1. Path Parameters")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Field")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("index_uid")])]),e._v(" "),r("td",[e._v("String")]),e._v(" "),r("td",[e._v("True")])]),e._v(" "),r("tr",[r("td",[r("code",[e._v("document_id")])]),e._v(" "),r("td",[e._v("String")]),e._v(" "),r("td",[e._v("True")])])])]),e._v(" "),r("h6",{attrs:{id:"_3-1-7-1-1-index-uid"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-7-1-1-index-uid"}},[e._v("#")]),e._v(" 3.1.7.1.1. "),r("code",[e._v("index_uid")])]),e._v(" "),r("ul",[r("li",[e._v("Type: String")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Unique identifier of an index.")]),e._v(" "),r("h6",{attrs:{id:"_3-1-7-1-2-document-id"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-7-1-2-document-id"}},[e._v("#")]),e._v(" 3.1.7.1.2. "),r("code",[e._v("document_id")])]),e._v(" "),r("ul",[r("li",[e._v("Type: Integer")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Unique identifier of a document.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-7-2-request-payload-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-7-2-request-payload-definition"}},[e._v("#")]),e._v(" 3.1.7.2. Request Payload Definition")]),e._v(" "),r("p",[e._v("N/A")]),e._v(" "),r("h5",{attrs:{id:"_3-1-7-3-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-7-3-response-definition"}},[e._v("#")]),e._v(" 3.1.7.3. Response Definition")]),e._v(" "),r("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),r("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),r("code",[e._v("task")]),e._v(" Object for "),r("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),r("h5",{attrs:{id:"_3-1-7-4-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-7-4-errors"}},[e._v("#")]),e._v(" 3.1.7.4. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Sending an invalid index uid format for the "),r("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1)]),e._v(" "),r("h6",{attrs:{id:"_3-1-7-4-1-async-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-7-4-1-async-errors"}},[e._v("#")]),e._v(" 3.1.7.4.1. Async Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),r("h4",{attrs:{id:"_3-1-8-post-indexes-index-uid-documents-delete-batch"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-post-indexes-index-uid-documents-delete-batch"}},[e._v("#")]),e._v(" 3.1.8. "),r("code",[e._v("POST")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents/delete-batch")])]),e._v(" "),r("p",[e._v("Delete a selection of documents based on array of document id's.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-8-1-path-parameters"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-1-path-parameters"}},[e._v("#")]),e._v(" 3.1.8.1. Path Parameters")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Field")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("index_uid")])]),e._v(" "),r("td",[e._v("String")]),e._v(" "),r("td",[e._v("True")])])])]),e._v(" "),r("h6",{attrs:{id:"_3-1-8-1-1-index-uid"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-1-1-index-uid"}},[e._v("#")]),e._v(" 3.1.8.1.1. "),r("code",[e._v("index_uid")])]),e._v(" "),r("ul",[r("li",[e._v("Type: String")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Unique identifier of an index.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-8-2-request-payload-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-2-request-payload-definition"}},[e._v("#")]),e._v(" 3.1.8.2 Request Payload Definition")]),e._v(" "),r("p",[e._v("An array of document ids to delete.")]),e._v(" "),r("ul",[r("li",[e._v("Type: Array")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("e.g.")]),e._v(" "),r("div",{staticClass:"language-json extra-class"},[r("pre",{pre:!0,attrs:{class:"language-json"}},[r("code",[r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),r("span",{pre:!0,attrs:{class:"token number"}},[e._v("122")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token number"}},[e._v("1194")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token number"}},[e._v("2501")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),r("h5",{attrs:{id:"_3-1-8-3-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-3-response-definition"}},[e._v("#")]),e._v(" 3.1.8.3. Response Definition")]),e._v(" "),r("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),r("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task with the type "),r("code",[e._v("documentDeletion")]),e._v(".")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),r("code",[e._v("task")]),e._v(" Object for "),r("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),r("h5",{attrs:{id:"_3-1-8-4-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-4-errors"}},[e._v("#")]),e._v(" 3.1.8.4. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Omitting Content-Type header returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an empty Content-Type returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a different Content-Type than "),r("code",[e._v("application/json")]),e._v(" returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an empty payload returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid payload returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid index uid format for the "),r("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a value with a different type than "),r("code",[e._v("Array")]),e._v(" for the body request will return a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#bad_request"}},[e._v("bad_request")]),e._v(" error.")],1)]),e._v(" "),r("h6",{attrs:{id:"_3-1-8-4-1-async-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-4-1-async-errors"}},[e._v("#")]),e._v(" 3.1.8.4.1 Async Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),r("h4",{attrs:{id:"_3-1-9-post-indexes-index-uid-documents-delete"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-9-post-indexes-index-uid-documents-delete"}},[e._v("#")]),e._v(" 3.1.9. "),r("code",[e._v("POST")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents/delete")])]),e._v(" "),r("p",[e._v("Delete a selection of documents based on a filter.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-9-1-path-parameters"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-9-1-path-parameters"}},[e._v("#")]),e._v(" 3.1.9.1. Path Parameters")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Field")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("index_uid")])]),e._v(" "),r("td",[e._v("String")]),e._v(" "),r("td",[e._v("True")])])])]),e._v(" "),r("h6",{attrs:{id:"_3-1-9-1-1-index-uid"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-9-1-1-index-uid"}},[e._v("#")]),e._v(" 3.1.9.1.1. "),r("code",[e._v("index_uid")])]),e._v(" "),r("ul",[r("li",[e._v("Type: String")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Unique identifier of an index.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-9-2-request-payload-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-9-2-request-payload-definition"}},[e._v("#")]),e._v(" 3.1.9.2 Request Payload Definition")]),e._v(" "),r("p",[e._v("A filter.")]),e._v(" "),r("ul",[r("li",[e._v("Type: String or array of array of strings")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("e.g.")]),e._v(" "),r("div",{staticClass:"language-json extra-class"},[r("pre",{pre:!0,attrs:{class:"language-json"}},[r("code",[r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v("\"doggo = 'bernese mountain'\"")]),e._v("\n"),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),r("h5",{attrs:{id:"_3-1-9-3-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-9-3-response-definition"}},[e._v("#")]),e._v(" 3.1.9.3. Response Definition")]),e._v(" "),r("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),r("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task with the type "),r("code",[e._v("documentDeletion")]),e._v(".")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),r("code",[e._v("task")]),e._v(" Object for "),r("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),r("h5",{attrs:{id:"_3-1-9-4-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-9-4-errors"}},[e._v("#")]),e._v(" 3.1.9.4. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Omitting Content-Type header returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an empty Content-Type returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a different Content-Type than "),r("code",[e._v("application/json")]),e._v(" returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an empty payload returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid payload returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid index uid format for the "),r("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a value without a filter will return a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_document_filter"}},[e._v("missing_document_filter")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a value with an invalid or empty filter will return an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_document_filter"}},[e._v("invalid_document_filter")]),e._v(" error.")],1)]),e._v(" "),r("h6",{attrs:{id:"_3-1-9-4-1-async-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-9-4-1-async-errors"}},[e._v("#")]),e._v(" 3.1.9.4.1 Async Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),r("h4",{attrs:{id:"_3-1-10-general-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-10-general-errors"}},[e._v("#")]),e._v(" 3.1.10. General Errors")]),e._v(" "),r("p",[e._v("These errors apply to all endpoints described here.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-10-1-auth-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-10-1-auth-errors"}},[e._v("#")]),e._v(" 3.1.10.1 Auth Errors")]),e._v(" "),r("p",[e._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Accessing this route without the "),r("code",[e._v("Authorization")]),e._v(" header returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),r("h2",{attrs:{id:"_4-technical-details"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[e._v("#")]),e._v(" 4. Technical Details")]),e._v(" "),r("p",[e._v("N/A")]),e._v(" "),r("h2",{attrs:{id:"_5-future-possibilities"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),r("ul",[r("li",[e._v("Introduce a way to reject fields from a document in the response. e.g. "),r("code",[e._v("?fields=-createdAt")])])])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[49],{477:function(e,t,r){"use strict";r.r(t);var i=r(62),a=Object(i.a)({},(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"documents-api"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#documents-api"}},[e._v("#")]),e._v(" Documents API")]),e._v(" "),r("h2",{attrs:{id:"_1-summary"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),r("p",[e._v("This specification describes the documents API endpoints permitting to list, fetch, add/replace, and delete index documents.")]),e._v(" "),r("p",[e._v("It is an API dedicated to document management within the Meilisearch index.")]),e._v(" "),r("h2",{attrs:{id:"_2-motivation"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),r("p",[e._v("N/A")]),e._v(" "),r("h2",{attrs:{id:"_3-functional-specification"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),r("p",[e._v("Documents are objects composed of fields that can store any type of data.\nEach field contains an attribute and its associated value.")]),e._v(" "),r("p",[e._v("Documents are stored inside indexes.")]),e._v(" "),r("h3",{attrs:{id:"_3-1-api-endpoints-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.1. API Endpoints Definition")]),e._v(" "),r("p",[e._v("Manipulate documents of a Meilisearch index.")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#311-fetch-documents-get-indexesindexuiddocuments-and-post-indexesindexuiddocumentsfetch"}},[e._v("3.1.1. (Fetch Documents) - "),r("code",[e._v("GET")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents")]),e._v(" and "),r("code",[e._v("POST")]),e._v(" - `indexes/:index_uid/documents/fetch")])]),e._v(" "),r("li",[r("a",{attrs:{href:"#312-get---indexesindexuiddocumentsdocumentid"}},[e._v("3.1.2. "),r("code",[e._v("GET")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents/:document_id")])])]),e._v(" "),r("li",[r("a",{attrs:{href:"#313-post---indexesindexuiddocuments"}},[e._v("3.1.3. "),r("code",[e._v("POST")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents")])])]),e._v(" "),r("li",[r("a",{attrs:{href:"#314-put---indexesindexuiddocuments"}},[e._v("3.1.4. "),r("code",[e._v("PUT")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents")])])]),e._v(" "),r("li",[r("a",{attrs:{href:"#315-delete---indexesindexuiddocuments"}},[e._v("3.1.5. "),r("code",[e._v("DELETE")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents")])])]),e._v(" "),r("li",[r("a",{attrs:{href:"#316-delete---indexesindexuiddocumentsdocumentid"}},[e._v("3.1.6. "),r("code",[e._v("DELETE")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents/:document_id")])])]),e._v(" "),r("li",[r("a",{attrs:{href:"#317-post---indexesindexuiddocumentsdelete-batch"}},[e._v("3.1.7. "),r("code",[e._v("POST")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents/delete-batch")])])])]),e._v(" "),r("h4",{attrs:{id:"_3-1-1-fetch-documents-get-indexes-index-uid-documents-and-post-indexes-index-uid-documents-fetch"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-fetch-documents-get-indexes-index-uid-documents-and-post-indexes-index-uid-documents-fetch"}},[e._v("#")]),e._v(" 3.1.1. (Fetch Documents) - "),r("code",[e._v("GET")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents")]),e._v(" and "),r("code",[e._v("POST")]),e._v(" - `indexes/:index_uid/documents/fetch")]),e._v(" "),r("p",[e._v("Meilisearch exposes 2 routes to get the documents:")]),e._v(" "),r("ul",[r("li",[e._v("GET "),r("code",[e._v("indexes/:index_uid/documents")]),e._v(", which gets its parameters as query parameters.")]),e._v(" "),r("li",[e._v("POST "),r("code",[e._v("indexes/:index_uid/documents/fetch")]),e._v(", which gets its parameters in a JSON payload.")])]),e._v(" "),r("p",[e._v("List all documents of a Meilisearch index.")]),e._v(" "),r("p",[e._v("The query parameters "),r("code",[e._v("offset")]),e._v(" and "),r("code",[e._v("limit")]),e._v(" permit browsing through all documents of an index.")]),e._v(" "),r("p",[e._v("Meilisearch orders documents depending on the order they were inserted in the db.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-1-path-parameters"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-path-parameters"}},[e._v("#")]),e._v(" 3.1.1.1. Path Parameters")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Parameters")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("index_uid")])]),e._v(" "),r("td",[e._v("String")]),e._v(" "),r("td",[e._v("true")])])])]),e._v(" "),r("h6",{attrs:{id:"_3-1-1-1-1-index-uid"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-1-index-uid"}},[e._v("#")]),e._v(" 3.1.1.1.1. "),r("code",[e._v("index_uid")])]),e._v(" "),r("ul",[r("li",[e._v("Type: String")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Unique identifier of an index.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-1-2-parameters"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-parameters"}},[e._v("#")]),e._v(" 3.1.1.2. Parameters")]),e._v(" "),r("p",[e._v("The following parameters need to be send as:")]),e._v(" "),r("ul",[r("li",[e._v("Query parameter for the "),r("code",[e._v("GET")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents")]),e._v(" route.")]),e._v(" "),r("li",[e._v("JSON body for the "),r("code",[e._v("POST")]),e._v("indexes/:index_uid/documents/fetch` route.")])]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Field")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("offset")])]),e._v(" "),r("td",[e._v("Integer")]),e._v(" "),r("td",[e._v("false")])]),e._v(" "),r("tr",[r("td",[r("code",[e._v("limit")])]),e._v(" "),r("td",[e._v("Integer")]),e._v(" "),r("td",[e._v("false")])]),e._v(" "),r("tr",[r("td",[r("code",[e._v("fields")])]),e._v(" "),r("td",[e._v("Array of Strings / "),r("code",[e._v("null")])]),e._v(" "),r("td",[e._v("false")])]),e._v(" "),r("tr",[r("td",[r("code",[e._v("filter")])]),e._v(" "),r("td",[e._v("filter / "),r("code",[e._v("null")])]),e._v(" "),r("td",[e._v("false")])])])]),e._v(" "),r("p",[e._v("In the case of the query parameter, as always, the "),r("code",[e._v("filter")]),e._v(" can only be a string, while it can be either a string, an array of strings, or an array of array of strings for the JSON body.")]),e._v(" "),r("h6",{attrs:{id:"_3-1-1-2-1-offset"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-1-offset"}},[e._v("#")]),e._v(" 3.1.1.2.1. "),r("code",[e._v("offset")])]),e._v(" "),r("ul",[r("li",[e._v("Type: Integer")]),e._v(" "),r("li",[e._v("Required: False")]),e._v(" "),r("li",[e._v("Default: "),r("code",[e._v("0")])])]),e._v(" "),r("p",[e._v("Sets the starting point in the results, effectively skipping over a given number of documents.")]),e._v(" "),r("h6",{attrs:{id:"_3-1-1-2-2-limit"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-2-limit"}},[e._v("#")]),e._v(" 3.1.1.2.2. "),r("code",[e._v("limit")])]),e._v(" "),r("ul",[r("li",[e._v("Type: Integer")]),e._v(" "),r("li",[e._v("Required: False")]),e._v(" "),r("li",[e._v("Default: "),r("code",[e._v("20")])])]),e._v(" "),r("p",[e._v("Sets the maximum number of documents to be returned by the current request.")]),e._v(" "),r("h6",{attrs:{id:"_3-1-1-2-3-fields"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-3-fields"}},[e._v("#")]),e._v(" 3.1.1.2.3. "),r("code",[e._v("fields")])]),e._v(" "),r("ul",[r("li",[e._v("Type: Array of Strings")]),e._v(" "),r("li",[e._v("Required: False")]),e._v(" "),r("li",[e._v("Default: "),r("code",[e._v("*")])])]),e._v(" "),r("p",[e._v("Configures which attributes will be retrieved in the returned documents.")]),e._v(" "),r("p",[e._v("If "),r("code",[e._v("fields")]),e._v(" is not specified, all attributes from the documents are returned in the response. It's equivalent to "),r("code",[e._v("fields=*")]),e._v(".")]),e._v(" "),r("ul",[r("li",[e._v("Sending "),r("code",[e._v("fields")]),e._v(" without specifying a value, returns empty documents ressources. "),r("code",[e._v("fields=")]),e._v(".")]),e._v(" "),r("li",[e._v("Sending "),r("code",[e._v("fields")]),e._v(" with a non-existent field as part of the value will not return an error, the non-existent field will not be displayed.")])]),e._v(" "),r("blockquote",[r("p",[r("code",[e._v("fields")]),e._v(" values are case-sensitive.")])]),e._v(" "),r("blockquote",[r("p",[e._v("Specified fields have to be separated by a comma. e.g. "),r("code",[e._v("&fields=title,description")])])]),e._v(" "),r("blockquote",[r("p",[e._v("The index setting "),r("code",[e._v("displayedAttributes")]),e._v(" has no impact on this endpoint.")])]),e._v(" "),r("h6",{attrs:{id:"_3-1-1-2-4-filter"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-4-filter"}},[e._v("#")]),e._v(" 3.1.1.2.4. "),r("code",[e._v("filter")])]),e._v(" "),r("ul",[r("li",[e._v("Type: String | Array of array of Strings")]),e._v(" "),r("li",[e._v("Required: False")]),e._v(" "),r("li",[e._v("Default: null")])]),e._v(" "),r("p",[e._v("Refine the results by selecting documents that match the given filter.\nIn the case of the POST route, it is possible to send the filter in the form of an array of array of strings akin to the search route.")]),e._v(" "),r("p",[e._v("Attributes used as filter criteria must be added to the "),r("code",[e._v("filterableAttributes")]),e._v(" list of an index settings. See "),r("RouterLink",{attrs:{to:"/specifications/text/0123-filterable-attributes-setting-api.html"}},[e._v("Filterable Attributes Setting API")]),e._v(".")],1),e._v(" "),r("h5",{attrs:{id:"_3-1-1-3-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-response-definition"}},[e._v("#")]),e._v(" 3.1.1.3. Response Definition")]),e._v(" "),r("p",[e._v("A "),r("code",[e._v("results")]),e._v(" array representing documents as JSON objects.")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Field")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("results")])]),e._v(" "),r("td",[e._v("Array[Document]")]),e._v(" "),r("td",[e._v("true")])]),e._v(" "),r("tr",[r("td",[r("code",[e._v("offset")])]),e._v(" "),r("td",[e._v("Integer")]),e._v(" "),r("td",[e._v("true")])]),e._v(" "),r("tr",[r("td",[r("code",[e._v("limit")])]),e._v(" "),r("td",[e._v("Integer")]),e._v(" "),r("td",[e._v("true")])]),e._v(" "),r("tr",[r("td",[r("code",[e._v("total")])]),e._v(" "),r("td",[e._v("Integer")]),e._v(" "),r("td",[e._v("true")])])])]),e._v(" "),r("h6",{attrs:{id:"_3-1-1-3-1-results"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-1-results"}},[e._v("#")]),e._v(" 3.1.1.3.1. "),r("code",[e._v("results")])]),e._v(" "),r("ul",[r("li",[e._v("Type: Array[Document]")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("An array containing the fetched documents.")]),e._v(" "),r("h6",{attrs:{id:"_3-1-1-3-2-offset"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-2-offset"}},[e._v("#")]),e._v(" 3.1.1.3.2. "),r("code",[e._v("offset")])]),e._v(" "),r("ul",[r("li",[e._v("Type: Integer")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Gives the "),r("code",[e._v("offset")]),e._v(" parameter used for the query.")]),e._v(" "),r("blockquote",[r("p",[e._v("See "),r("a",{attrs:{href:"#31121-offset"}},[e._v("3.1.1.2.1. "),r("code",[e._v("offset")])]),e._v(" section.")])]),e._v(" "),r("h6",{attrs:{id:"_3-1-1-3-3-limit"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-3-limit"}},[e._v("#")]),e._v(" 3.1.1.3.3. "),r("code",[e._v("limit")])]),e._v(" "),r("ul",[r("li",[e._v("Type: Integer")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Gives the "),r("code",[e._v("limit")]),e._v(" parameter used for the query.")]),e._v(" "),r("blockquote",[r("p",[e._v("See "),r("a",{attrs:{href:"#31122-limit"}},[e._v("3.1.1.2.2. "),r("code",[e._v("limit")])]),e._v(" section.")])]),e._v(" "),r("h6",{attrs:{id:"_3-1-1-3-3-total"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-3-total"}},[e._v("#")]),e._v(" 3.1.1.3.3. "),r("code",[e._v("total")])]),e._v(" "),r("ul",[r("li",[e._v("Type: Integer")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Gives the total number of documents that can be browsed in the related index.")]),e._v(" "),r("h6",{attrs:{id:"_3-1-1-3-4-example"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-4-example"}},[e._v("#")]),e._v(" 3.1.1.3.4. Example")]),e._v(" "),r("div",{staticClass:"language-json extra-class"},[r("pre",{pre:!0,attrs:{class:"language-json"}},[r("code",[r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"results"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"id"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token number"}},[e._v("25684")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"title"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"American Ninja 5"')]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"id"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token number"}},[e._v("468219")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"title"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Dead in a Week (Or Your Money Back)"')]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"offset"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"limit"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"total"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token number"}},[e._v("3")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token comment"}},[e._v("//The index contains 3 documents in total")]),e._v("\n"),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),r("h5",{attrs:{id:"_3-1-1-4-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-4-errors"}},[e._v("#")]),e._v(" 3.1.1.4. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Sending an invalid index uid format for the "),r("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a value with a different type than "),r("code",[e._v("Integer")]),e._v(" or "),r("code",[e._v("null")]),e._v(" for "),r("code",[e._v("offset")]),e._v(" will return a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_document_offset"}},[e._v("invalid_document_offset")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a value with a different type than "),r("code",[e._v("Integer")]),e._v(" or "),r("code",[e._v("null")]),e._v(" for "),r("code",[e._v("limit")]),e._v(" will return a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_document_limit"}},[e._v("invalid_document_limit")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a value with a different type than "),r("code",[e._v("String")]),e._v(" or "),r("code",[e._v("null")]),e._v(" for "),r("code",[e._v("fields")]),e._v(" will return a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_document_fields"}},[e._v("invalid_document_fields")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a value with a different type than "),r("code",[e._v("String")]),e._v(", "),r("code",[e._v("Array of strings")]),e._v(", "),r("code",[e._v("Array of array of strings")]),e._v(" or "),r("code",[e._v("null")]),e._v(" for "),r("code",[e._v("filter")]),e._v(" will return a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_document_filter"}},[e._v("invalid_document_filter")]),e._v(" error.")],1)]),e._v(" "),r("h4",{attrs:{id:"_3-1-2-get-indexes-index-uid-documents-document-id"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-get-indexes-index-uid-documents-document-id"}},[e._v("#")]),e._v(" 3.1.2. "),r("code",[e._v("GET")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents/:document_id")])]),e._v(" "),r("p",[e._v("Get a document using its unique id.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-2-1-path-parameters"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-path-parameters"}},[e._v("#")]),e._v(" 3.1.2.1. Path Parameters")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Parameters")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("index_uid")])]),e._v(" "),r("td",[e._v("String")]),e._v(" "),r("td",[e._v("true")])]),e._v(" "),r("tr",[r("td",[r("code",[e._v("document_id")])]),e._v(" "),r("td",[e._v("String / "),r("code",[e._v("null")])]),e._v(" "),r("td",[e._v("true")])])])]),e._v(" "),r("h6",{attrs:{id:"_3-1-2-1-1-index-uid"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-1-index-uid"}},[e._v("#")]),e._v(" 3.1.2.1.1. "),r("code",[e._v("index_uid")])]),e._v(" "),r("ul",[r("li",[e._v("Type: String")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Unique identifier of an index.")]),e._v(" "),r("h6",{attrs:{id:"_3-1-2-1-2-document-id"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-2-document-id"}},[e._v("#")]),e._v(" 3.1.2.1.2. "),r("code",[e._v("document_id")])]),e._v(" "),r("ul",[r("li",[e._v("Type: Integer")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Unique identifier of a document.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-2-2-query-parameters"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-2-query-parameters"}},[e._v("#")]),e._v(" 3.1.2.2. Query Parameters")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Field")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("fields")])]),e._v(" "),r("td",[e._v("String / "),r("code",[e._v("null")])]),e._v(" "),r("td",[e._v("false")])])])]),e._v(" "),r("h6",{attrs:{id:"_3-1-2-2-1-fields"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-2-1-fields"}},[e._v("#")]),e._v(" 3.1.2.2.1. "),r("code",[e._v("fields")])]),e._v(" "),r("ul",[r("li",[e._v("Type: String")]),e._v(" "),r("li",[e._v("Required: False")]),e._v(" "),r("li",[e._v("Default: "),r("code",[e._v("*")])])]),e._v(" "),r("p",[e._v("Configures which attributes will be retrieved in the returned documents.")]),e._v(" "),r("p",[e._v("If "),r("code",[e._v("fields")]),e._v(" is not specified, all attributes from the documents are returned in the response. It's equivalent to "),r("code",[e._v("fields=*")]),e._v(".")]),e._v(" "),r("ul",[r("li",[e._v("Sending "),r("code",[e._v("fields")]),e._v(" without specifying a value, returns empty documents ressources. "),r("code",[e._v("fields=")]),e._v(".")]),e._v(" "),r("li",[e._v("Sending "),r("code",[e._v("fields")]),e._v(" with a non-existent field as part of the value will not return an error, the non-existent field will not be displayed.")])]),e._v(" "),r("blockquote",[r("p",[r("code",[e._v("fields")]),e._v(" values are case-sensitive.")])]),e._v(" "),r("blockquote",[r("p",[e._v("Specified fields have to be separated by a comma. e.g. "),r("code",[e._v("&fields=title,description")])])]),e._v(" "),r("blockquote",[r("p",[e._v("The index setting "),r("code",[e._v("displayedAttributes")]),e._v(" has no impact on this endpoint.")])]),e._v(" "),r("h5",{attrs:{id:"_3-1-2-3-request-payload-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-3-request-payload-definition"}},[e._v("#")]),e._v(" 3.1.2.3. Request Payload Definition")]),e._v(" "),r("p",[e._v("N/A")]),e._v(" "),r("h5",{attrs:{id:"_3-1-2-4-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-4-response-definition"}},[e._v("#")]),e._v(" 3.1.2.4. Response Definition")]),e._v(" "),r("p",[e._v("A document represented as a JSON object.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-2-4-1-example"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-4-1-example"}},[e._v("#")]),e._v(" 3.1.2.4.1. Example")]),e._v(" "),r("div",{staticClass:"language-json extra-class"},[r("pre",{pre:!0,attrs:{class:"language-json"}},[r("code",[r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"id"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token number"}},[e._v("25684")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"title"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"American Ninja 5"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"poster"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg"')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"overview"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja."')]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"release_date"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"1993-01-01"')]),e._v("\n"),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),r("h5",{attrs:{id:"_3-1-2-5-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-5-errors"}},[e._v("#")]),e._v(" 3.1.2.5. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Sending an invalid index uid format for the "),r("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 If the requested "),r("code",[e._v("document_id")]),e._v(" does not exist, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#document_not_found"}},[e._v("document_not_found")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a value with a different type than "),r("code",[e._v("String")]),e._v(" or "),r("code",[e._v("null")]),e._v(" for "),r("code",[e._v("fields")]),e._v(" will return a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_document_fields"}},[e._v("invalid_document_fields")]),e._v(" error.")],1)]),e._v(" "),r("h4",{attrs:{id:"_3-1-3-documents-body-special-properties"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-documents-body-special-properties"}},[e._v("#")]),e._v(" 3.1.3. Documents Body Special Properties")]),e._v(" "),r("p",[e._v("While the body of a document can contain any pair of keys and values, Meilisearch uses specific key names to leverage some search capabilities such as geo search and vector search.")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Field")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("a",{attrs:{href:"#3131-_geo"}},[r("code",[e._v("_geo")])])]),e._v(" "),r("td",[e._v("String")]),e._v(" "),r("td",[e._v("Object")])]),e._v(" "),r("tr",[r("td",[r("a",{attrs:{href:"#3132-_vectors-experimental"}},[r("code",[e._v("_vectors")])]),e._v(" "),r("code",[e._v("EXPERIMENTAL")])]),e._v(" "),r("td",[e._v("Array of Float")]),e._v(" "),r("td",[e._v("Array[Array of Float]")])])])]),e._v(" "),r("h5",{attrs:{id:"_3-1-3-1-geo"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-1-geo"}},[e._v("#")]),e._v(" 3.1.3.1. "),r("code",[e._v("_geo")])]),e._v(" "),r("p",[e._v("Holds latitude and longitude geo coordinates for a document.")]),e._v(" "),r("p",[e._v("Refer to the "),r("RouterLink",{attrs:{to:"/specifications/text/0059-geo-search.html"}},[e._v("geo search specification")])],1),e._v(" "),r("h5",{attrs:{id:"_3-1-3-2-vectors-experimental"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-2-vectors-experimental"}},[e._v("#")]),e._v(" 3.1.3.2. "),r("code",[e._v("_vectors")]),e._v(" "),r("code",[e._v("EXPERIMENTAL")])]),e._v(" "),r("p",[e._v("Type: Array of Float | Array[Array of Float]\nRequired: False")]),e._v(" "),r("p",[e._v("Holds a vectorized representation of a document. It is possible to send either one or several vectorized representations of the same document.")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Sending a value with a different type than "),r("code",[e._v("Array of Float")]),e._v(", "),r("code",[e._v("Array[Array of Float]")]),e._v(" or "),r("code",[e._v("null")]),e._v(" as a value for "),r("code",[e._v("_vectors")]),e._v(" returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_document_vectors_field"}},[e._v("invalid_document_vectors_field")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a value for "),r("code",[e._v("_vectors")]),e._v(" whose length differs from another document "),r("code",[e._v("_vectors")]),e._v(" field returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_document_vectors_field"}},[e._v("invalid_document_vectors_field")]),e._v(" error.")],1)]),e._v(" "),r("h4",{attrs:{id:"_3-1-4-post-indexes-index-uid-documents"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-post-indexes-index-uid-documents"}},[e._v("#")]),e._v(" 3.1.4. "),r("code",[e._v("POST")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents")])]),e._v(" "),r("p",[e._v("Add a list of documents or replace them if they already exist.")]),e._v(" "),r("p",[e._v("If the provided index does not exist, it will be created. See "),r("a",{attrs:{href:"#3145-lazy-index-creation"}},[e._v("3.1.3.5. Lazy Index Creation")])]),e._v(" "),r("p",[e._v("If an already existing document (same document id) is sent, the whole existing document will be overwritten by the new document.")]),e._v(" "),r("p",[e._v("Fields that are no longer present in the new document are removed.")]),e._v(" "),r("p",[e._v("This endpoint accepts various content-type:")]),e._v(" "),r("ul",[r("li",[r("RouterLink",{attrs:{to:"/specifications/text/0135-indexing-json.html"}},[r("code",[e._v("application/json")])])],1),e._v(" "),r("li",[r("RouterLink",{attrs:{to:"/specifications/text/0028-indexing-csv.html"}},[r("code",[e._v("text/csv")])])],1),e._v(" "),r("li",[r("RouterLink",{attrs:{to:"/specifications/text/0029-indexing-ndjson.html"}},[r("code",[e._v("application/x-ndjson")])])],1)]),e._v(" "),r("h5",{attrs:{id:"_3-1-4-1-path-parameters"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-1-path-parameters"}},[e._v("#")]),e._v(" 3.1.4.1. Path Parameters")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Field")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("index_uid")])]),e._v(" "),r("td",[e._v("String")]),e._v(" "),r("td",[e._v("True")])])])]),e._v(" "),r("h6",{attrs:{id:"_3-1-4-1-1-index-uid"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-1-1-index-uid"}},[e._v("#")]),e._v(" 3.1.4.1.1 "),r("code",[e._v("index_uid")])]),e._v(" "),r("ul",[r("li",[e._v("Type: String")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Unique identifier of an index.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-4-2-request-payload-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-2-request-payload-definition"}},[e._v("#")]),e._v(" 3.1.4.2. Request Payload Definition")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Field")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("primaryKey")])]),e._v(" "),r("td",[e._v("String")]),e._v(" "),r("td",[e._v("False")])])])]),e._v(" "),r("h6",{attrs:{id:"_3-1-4-2-1-primarykey"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-2-1-primarykey"}},[e._v("#")]),e._v(" 3.1.4.2.1 "),r("code",[e._v("primaryKey")])]),e._v(" "),r("ul",[r("li",[e._v("Type: String")]),e._v(" "),r("li",[e._v("Required: False")]),e._v(" "),r("li",[e._v("Default: "),r("code",[e._v("null")])])]),e._v(" "),r("p",[e._v("Allows to bypass the auto-inference mechanism of the document identifiers.")]),e._v(" "),r("p",[e._v("By default, the "),r("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(" "),r("p",[e._v("Specifying this field tells the engine to use the document attribute specified in "),r("code",[e._v("primaryKey")]),e._v(" and bypasses this mechanism.")]),e._v(" "),r("p",[e._v("When the index is empty, it is possible to modify the "),r("code",[e._v("primaryKey")]),e._v(".")]),e._v(" "),r("p",[e._v("If the index is not empty, the query parameter "),r("code",[e._v("primaryKey")]),e._v(" is ignored.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-4-3-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-3-response-definition"}},[e._v("#")]),e._v(" 3.1.4.3. Response Definition")]),e._v(" "),r("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),r("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),r("code",[e._v("task")]),e._v(" Object for "),r("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),r("h5",{attrs:{id:"_3-1-4-4-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-4-errors"}},[e._v("#")]),e._v(" 3.1.4.4. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Omitting Content-Type header returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an empty Content-Type returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a different Content-Type than "),r("code",[e._v("application/json")]),e._v(", "),r("code",[e._v("text/csv")]),e._v(", or "),r("code",[e._v("application/x-ndjson")]),e._v(" returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an empty payload returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid payload returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid index uid format for the "),r("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a value with a different type than "),r("code",[e._v("String")]),e._v(" or "),r("code",[e._v("null")]),e._v(" for the "),r("code",[e._v("primaryKey")]),e._v(" parameter will return a "),r("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(" "),r("h6",{attrs:{id:"_3-1-4-4-1-async-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-4-1-async-errors"}},[e._v("#")]),e._v(" 3.1.4.4.1. Async Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 When Meilisearch is secured, if the API Key do not have the "),r("code",[e._v("indexes.create")]),e._v(" action defined, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related asynchronous "),r("code",[e._v("task")]),e._v(" resource. See "),r("a",{attrs:{href:"#3222-response-definition"}},[e._v("3.2.2.2. Response Definition")]),e._v(".")],1),e._v(" "),r("li",[e._v("🔴 When updating the "),r("code",[e._v("primaryKey")]),e._v(", if the previous "),r("code",[e._v("primaryKey")]),e._v(" value has already been used for a document, the API returns an "),r("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(" "),r("h5",{attrs:{id:"_3-1-4-5-lazy-index-creation"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-4-5-lazy-index-creation"}},[e._v("#")]),e._v(" 3.1.4.5. Lazy Index Creation")]),e._v(" "),r("p",[e._v("If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, and the authorization layer allows it (See "),r("a",{attrs:{href:"#31341-async-errors"}},[e._v("3.1.3.4.1. Async Errors")]),e._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),r("a",{attrs:{href:"#3133-response-definition"}},[e._v("3.1.3.3. Response Definition")]),e._v(".")]),e._v(" "),r("h4",{attrs:{id:"_3-1-5-put-indexes-index-uid-documents"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-5-put-indexes-index-uid-documents"}},[e._v("#")]),e._v(" 3.1.5. "),r("code",[e._v("PUT")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents")])]),e._v(" "),r("p",[e._v("Add a list of documents or update them if they already exist.")]),e._v(" "),r("p",[e._v("If the provided index does not exist, it will be created. See "),r("a",{attrs:{href:"#3145-lazy-index-creation"}},[e._v("3.1.4.5. Lazy Index Creation")])]),e._v(" "),r("p",[e._v("If an already existing document (same identifier) is set, the old document will be only partially updated according to the fields of the new document. Thus, any fields not present in the new document are kept and remain unchanged.")]),e._v(" "),r("p",[e._v("This endpoint accepts various content-type:")]),e._v(" "),r("ul",[r("li",[r("RouterLink",{attrs:{to:"/specifications/text/0135-indexing-json.html"}},[r("code",[e._v("application/json")])])],1),e._v(" "),r("li",[r("RouterLink",{attrs:{to:"/specifications/text/0028-indexing-csv.html"}},[r("code",[e._v("text/csv")])])],1),e._v(" "),r("li",[r("RouterLink",{attrs:{to:"/specifications/text/0029-indexing-ndjson.html"}},[r("code",[e._v("application/x-ndjson")])])],1)]),e._v(" "),r("h5",{attrs:{id:"_3-1-5-1-path-parameters"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-5-1-path-parameters"}},[e._v("#")]),e._v(" 3.1.5.1. Path Parameters")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Field")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("index_uid")])]),e._v(" "),r("td",[e._v("String")]),e._v(" "),r("td",[e._v("True")])])])]),e._v(" "),r("h6",{attrs:{id:"_3-1-5-1-1-index-uid"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-5-1-1-index-uid"}},[e._v("#")]),e._v(" 3.1.5.1.1. "),r("code",[e._v("index_uid")])]),e._v(" "),r("ul",[r("li",[e._v("Type: String")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Unique identifier of an index.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-5-2-query-parameters-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-5-2-query-parameters-definition"}},[e._v("#")]),e._v(" 3.1.5.2. Query Parameters Definition")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Field")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("primaryKey")])]),e._v(" "),r("td",[e._v("String")]),e._v(" "),r("td",[e._v("False")])])])]),e._v(" "),r("h6",{attrs:{id:"_3-1-5-2-1-primarykey"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-5-2-1-primarykey"}},[e._v("#")]),e._v(" 3.1.5.2.1. "),r("code",[e._v("primaryKey")])]),e._v(" "),r("ul",[r("li",[e._v("Type: String")]),e._v(" "),r("li",[e._v("Required: False")]),e._v(" "),r("li",[e._v("Default: "),r("code",[e._v("null")])])]),e._v(" "),r("p",[e._v("Allows to bypass the auto-inference mechanism of the document identifiers.")]),e._v(" "),r("p",[e._v("By default, the "),r("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(" "),r("p",[e._v("Specifying this field tells the engine to use the document attribute specified in "),r("code",[e._v("primaryKey")]),e._v(" and bypasses this mechanism.")]),e._v(" "),r("p",[e._v("When the index is empty, it is possible to modify the "),r("code",[e._v("primaryKey")]),e._v(".")]),e._v(" "),r("p",[e._v("If the index is not empty, the query parameter "),r("code",[e._v("primaryKey")]),e._v(" is ignored.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-5-3-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-5-3-response-definition"}},[e._v("#")]),e._v(" 3.1.5.3. Response Definition")]),e._v(" "),r("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),r("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),r("code",[e._v("task")]),e._v(" Object for "),r("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),r("h5",{attrs:{id:"_3-1-5-4-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-5-4-errors"}},[e._v("#")]),e._v(" 3.1.5.4. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Omitting Content-Type header returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an empty Content-Type returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a different Content-Type than "),r("code",[e._v("application/json")]),e._v(", "),r("code",[e._v("text/csv")]),e._v(", or "),r("code",[e._v("application/x-ndjson")]),e._v(" returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an empty payload returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid payload returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid index uid format for the "),r("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a value with a different type than "),r("code",[e._v("String")]),e._v(" or "),r("code",[e._v("null")]),e._v(" for the "),r("code",[e._v("primaryKey")]),e._v(" parameter will return a "),r("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(" "),r("h6",{attrs:{id:"_3-1-5-4-1-async-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-5-4-1-async-errors"}},[e._v("#")]),e._v(" 3.1.5.4.1. Async Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 When Meilisearch is secured, if the API Key do not have the "),r("code",[e._v("indexes.create")]),e._v(" action defined, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error in the related asynchronous "),r("code",[e._v("task")]),e._v(" resource. See "),r("a",{attrs:{href:"#3222-response-definition"}},[e._v("3.2.2.2. Response Definition")]),e._v(".")],1),e._v(" "),r("li",[e._v("🔴 When updating the "),r("code",[e._v("primaryKey")]),e._v(", if the previous "),r("code",[e._v("primaryKey")]),e._v(" value has already been used for a document, the API returns an "),r("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(" "),r("h5",{attrs:{id:"_3-1-5-5-lazy-index-creation"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-5-5-lazy-index-creation"}},[e._v("#")]),e._v(" 3.1.5.5. Lazy Index Creation")]),e._v(" "),r("p",[e._v("If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, and the authorization layer allows it (See "),r("a",{attrs:{href:"#31441-async-errors"}},[e._v("3.1.4.4.1. Async Errors")]),e._v("), Meilisearch will create the index when the related asynchronous task resource is executed. See "),r("a",{attrs:{href:"#3143-response-definition"}},[e._v("3.1.4.3. Response Definition")]),e._v(".")]),e._v(" "),r("h4",{attrs:{id:"_3-1-6-delete-indexes-index-uid-documents"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-6-delete-indexes-index-uid-documents"}},[e._v("#")]),e._v(" 3.1.6. "),r("code",[e._v("DELETE")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents")])]),e._v(" "),r("p",[e._v("Delete all documents in the specified index.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-6-1-path-parameters"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-6-1-path-parameters"}},[e._v("#")]),e._v(" 3.1.6.1. Path Parameters")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Field")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("index_uid")])]),e._v(" "),r("td",[e._v("String")]),e._v(" "),r("td",[e._v("true")])])])]),e._v(" "),r("h6",{attrs:{id:"_3-1-6-1-1-index-uid"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-6-1-1-index-uid"}},[e._v("#")]),e._v(" 3.1.6.1.1. "),r("code",[e._v("index_uid")])]),e._v(" "),r("ul",[r("li",[e._v("Type: String")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Unique identifier of an index.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-6-2-request-payload-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-6-2-request-payload-definition"}},[e._v("#")]),e._v(" 3.1.6.2. Request Payload Definition")]),e._v(" "),r("p",[e._v("N/A")]),e._v(" "),r("h5",{attrs:{id:"_3-1-6-3-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-6-3-response-definition"}},[e._v("#")]),e._v(" 3.1.6.3. Response Definition")]),e._v(" "),r("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),r("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),r("code",[e._v("task")]),e._v(" Object for "),r("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),r("h5",{attrs:{id:"_3-1-6-4-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-6-4-errors"}},[e._v("#")]),e._v(" 3.1.6.4. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Sending an invalid index uid format for the "),r("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1)]),e._v(" "),r("h6",{attrs:{id:"_3-1-6-4-1-async-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-6-4-1-async-errors"}},[e._v("#")]),e._v(" 3.1.6.4.1. Async Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),r("h4",{attrs:{id:"_3-1-7-delete-indexes-index-uid-documents-document-id"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-7-delete-indexes-index-uid-documents-document-id"}},[e._v("#")]),e._v(" 3.1.7. "),r("code",[e._v("DELETE")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents/:document_id")])]),e._v(" "),r("p",[e._v("Delete one document based on its unique id.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-7-1-path-parameters"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-7-1-path-parameters"}},[e._v("#")]),e._v(" 3.1.7.1. Path Parameters")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Field")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("index_uid")])]),e._v(" "),r("td",[e._v("String")]),e._v(" "),r("td",[e._v("True")])]),e._v(" "),r("tr",[r("td",[r("code",[e._v("document_id")])]),e._v(" "),r("td",[e._v("String")]),e._v(" "),r("td",[e._v("True")])])])]),e._v(" "),r("h6",{attrs:{id:"_3-1-7-1-1-index-uid"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-7-1-1-index-uid"}},[e._v("#")]),e._v(" 3.1.7.1.1. "),r("code",[e._v("index_uid")])]),e._v(" "),r("ul",[r("li",[e._v("Type: String")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Unique identifier of an index.")]),e._v(" "),r("h6",{attrs:{id:"_3-1-7-1-2-document-id"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-7-1-2-document-id"}},[e._v("#")]),e._v(" 3.1.7.1.2. "),r("code",[e._v("document_id")])]),e._v(" "),r("ul",[r("li",[e._v("Type: Integer")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Unique identifier of a document.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-7-2-request-payload-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-7-2-request-payload-definition"}},[e._v("#")]),e._v(" 3.1.7.2. Request Payload Definition")]),e._v(" "),r("p",[e._v("N/A")]),e._v(" "),r("h5",{attrs:{id:"_3-1-7-3-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-7-3-response-definition"}},[e._v("#")]),e._v(" 3.1.7.3. Response Definition")]),e._v(" "),r("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),r("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),r("code",[e._v("task")]),e._v(" Object for "),r("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),r("h5",{attrs:{id:"_3-1-7-4-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-7-4-errors"}},[e._v("#")]),e._v(" 3.1.7.4. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Sending an invalid index uid format for the "),r("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1)]),e._v(" "),r("h6",{attrs:{id:"_3-1-7-4-1-async-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-7-4-1-async-errors"}},[e._v("#")]),e._v(" 3.1.7.4.1. Async Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),r("h4",{attrs:{id:"_3-1-8-post-indexes-index-uid-documents-delete-batch"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-post-indexes-index-uid-documents-delete-batch"}},[e._v("#")]),e._v(" 3.1.8. "),r("code",[e._v("POST")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents/delete-batch")])]),e._v(" "),r("p",[e._v("Delete a selection of documents based on array of document id's.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-8-1-path-parameters"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-1-path-parameters"}},[e._v("#")]),e._v(" 3.1.8.1. Path Parameters")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Field")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("index_uid")])]),e._v(" "),r("td",[e._v("String")]),e._v(" "),r("td",[e._v("True")])])])]),e._v(" "),r("h6",{attrs:{id:"_3-1-8-1-1-index-uid"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-1-1-index-uid"}},[e._v("#")]),e._v(" 3.1.8.1.1. "),r("code",[e._v("index_uid")])]),e._v(" "),r("ul",[r("li",[e._v("Type: String")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Unique identifier of an index.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-8-2-request-payload-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-2-request-payload-definition"}},[e._v("#")]),e._v(" 3.1.8.2 Request Payload Definition")]),e._v(" "),r("p",[e._v("An array of document ids to delete.")]),e._v(" "),r("ul",[r("li",[e._v("Type: Array")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("e.g.")]),e._v(" "),r("div",{staticClass:"language-json extra-class"},[r("pre",{pre:!0,attrs:{class:"language-json"}},[r("code",[r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),r("span",{pre:!0,attrs:{class:"token number"}},[e._v("122")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token number"}},[e._v("1194")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token number"}},[e._v("2501")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),r("h5",{attrs:{id:"_3-1-8-3-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-3-response-definition"}},[e._v("#")]),e._v(" 3.1.8.3. Response Definition")]),e._v(" "),r("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),r("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task with the type "),r("code",[e._v("documentDeletion")]),e._v(".")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),r("code",[e._v("task")]),e._v(" Object for "),r("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),r("h5",{attrs:{id:"_3-1-8-4-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-4-errors"}},[e._v("#")]),e._v(" 3.1.8.4. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Omitting Content-Type header returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an empty Content-Type returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a different Content-Type than "),r("code",[e._v("application/json")]),e._v(" returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an empty payload returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid payload returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid index uid format for the "),r("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a value with a different type than "),r("code",[e._v("Array")]),e._v(" for the body request will return a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#bad_request"}},[e._v("bad_request")]),e._v(" error.")],1)]),e._v(" "),r("h6",{attrs:{id:"_3-1-8-4-1-async-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-8-4-1-async-errors"}},[e._v("#")]),e._v(" 3.1.8.4.1 Async Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),r("h4",{attrs:{id:"_3-1-9-post-indexes-index-uid-documents-delete"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-9-post-indexes-index-uid-documents-delete"}},[e._v("#")]),e._v(" 3.1.9. "),r("code",[e._v("POST")]),e._v(" - "),r("code",[e._v("indexes/:index_uid/documents/delete")])]),e._v(" "),r("p",[e._v("Delete a selection of documents based on a filter.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-9-1-path-parameters"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-9-1-path-parameters"}},[e._v("#")]),e._v(" 3.1.9.1. Path Parameters")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th",[e._v("Field")]),e._v(" "),r("th",[e._v("Type")]),e._v(" "),r("th",[e._v("Required")])])]),e._v(" "),r("tbody",[r("tr",[r("td",[r("code",[e._v("index_uid")])]),e._v(" "),r("td",[e._v("String")]),e._v(" "),r("td",[e._v("True")])])])]),e._v(" "),r("h6",{attrs:{id:"_3-1-9-1-1-index-uid"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-9-1-1-index-uid"}},[e._v("#")]),e._v(" 3.1.9.1.1. "),r("code",[e._v("index_uid")])]),e._v(" "),r("ul",[r("li",[e._v("Type: String")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("Unique identifier of an index.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-9-2-request-payload-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-9-2-request-payload-definition"}},[e._v("#")]),e._v(" 3.1.9.2 Request Payload Definition")]),e._v(" "),r("p",[e._v("A filter.")]),e._v(" "),r("ul",[r("li",[e._v("Type: String or array of array of strings")]),e._v(" "),r("li",[e._v("Required: True")])]),e._v(" "),r("p",[e._v("e.g.")]),e._v(" "),r("div",{staticClass:"language-json extra-class"},[r("pre",{pre:!0,attrs:{class:"language-json"}},[r("code",[r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),r("span",{pre:!0,attrs:{class:"token property"}},[e._v('"filter"')]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),r("span",{pre:!0,attrs:{class:"token string"}},[e._v("\"doggo = 'bernese mountain'\"")]),e._v("\n"),r("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),r("h5",{attrs:{id:"_3-1-9-3-response-definition"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-9-3-response-definition"}},[e._v("#")]),e._v(" 3.1.9.3. Response Definition")]),e._v(" "),r("p",[e._v("When the request is successful, Meilisearch returns the HTTP code "),r("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task with the type "),r("code",[e._v("documentDeletion")]),e._v(".")]),e._v(" "),r("p",[e._v("See "),r("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),r("code",[e._v("task")]),e._v(" Object for "),r("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),r("h5",{attrs:{id:"_3-1-9-4-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-9-4-errors"}},[e._v("#")]),e._v(" 3.1.9.4. Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Omitting Content-Type header returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an empty Content-Type returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a different Content-Type than "),r("code",[e._v("application/json")]),e._v(" returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an empty payload returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid payload returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending an invalid index uid format for the "),r("code",[e._v(":index_uid")]),e._v(" path parameter returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[e._v("invalid_index_uid")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a value without a filter will return a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_document_filter"}},[e._v("missing_document_filter")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Sending a value with an invalid or empty filter will return an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_document_filter"}},[e._v("invalid_document_filter")]),e._v(" error.")],1)]),e._v(" "),r("h6",{attrs:{id:"_3-1-9-4-1-async-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-9-4-1-async-errors"}},[e._v("#")]),e._v(" 3.1.9.4.1 Async Errors")]),e._v(" "),r("ul",[r("li",[e._v("🔴 If the requested "),r("code",[e._v("index_uid")]),e._v(" does not exist, the API returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),r("h4",{attrs:{id:"_3-1-10-general-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-10-general-errors"}},[e._v("#")]),e._v(" 3.1.10. General Errors")]),e._v(" "),r("p",[e._v("These errors apply to all endpoints described here.")]),e._v(" "),r("h5",{attrs:{id:"_3-1-10-1-auth-errors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-10-1-auth-errors"}},[e._v("#")]),e._v(" 3.1.10.1 Auth Errors")]),e._v(" "),r("p",[e._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),e._v(" "),r("ul",[r("li",[e._v("🔴 Accessing this route without the "),r("code",[e._v("Authorization")]),e._v(" header returns a "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),r("li",[e._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),r("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),r("h2",{attrs:{id:"_4-technical-details"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[e._v("#")]),e._v(" 4. Technical Details")]),e._v(" "),r("p",[e._v("N/A")]),e._v(" "),r("h2",{attrs:{id:"_5-future-possibilities"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),r("ul",[r("li",[e._v("Introduce a way to reject fields from a document in the response. e.g. "),r("code",[e._v("?fields=-createdAt")])])])])}),[],!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.2eb15273.js similarity index 99% rename from docs/assets/js/51.a5cea8ee.js rename to docs/assets/js/51.2eb15273.js index a2f13c440..76a57bdd8 100644 --- a/docs/assets/js/51.a5cea8ee.js +++ b/docs/assets/js/51.2eb15273.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],{474:function(t,e,s){"use strict";s.r(e);var a=s(62),r=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"stats-api"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#stats-api"}},[t._v("#")]),t._v(" Stats API")]),t._v(" "),s("h2",{attrs:{id:"_1-summary"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),s("p",[t._v("This specification describes the stats API endpoints.")]),t._v(" "),s("p",[t._v("Stats routes give information and metrics about indexes and the Meilisearch database.")]),t._v(" "),s("h2",{attrs:{id:"_2-motivation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),s("p",[t._v("N/A")]),t._v(" "),s("h2",{attrs:{id:"_3-functional-specification"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),s("h3",{attrs:{id:"_3-1-api-endpoints-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-api-endpoints-definition"}},[t._v("#")]),t._v(" 3.1. API Endpoints Definition")]),t._v(" "),s("p",[t._v("See statistics of Meilisearch indexes.")]),t._v(" "),s("ul",[s("li",[s("a",{attrs:{href:"#311-get---indexesindexuidstats"}},[t._v("3.1.1. "),s("code",[t._v("GET")]),t._v(" - "),s("code",[t._v("indexes/:index_uid/stats")])])]),t._v(" "),s("li",[s("a",{attrs:{href:"#312-get---stats"}},[t._v("3.1.2. "),s("code",[t._v("GET")]),t._v(" - "),s("code",[t._v("stats")])])])]),t._v(" "),s("h4",{attrs:{id:"_3-1-1-get-indexes-index-uid-stats"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-get-indexes-index-uid-stats"}},[t._v("#")]),t._v(" 3.1.1. "),s("code",[t._v("GET")]),t._v(" - "),s("code",[t._v("indexes/:index_uid/stats")])]),t._v(" "),s("p",[t._v("Get stats of an index.")]),t._v(" "),s("h5",{attrs:{id:"_3-1-1-1-path-parameters"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-path-parameters"}},[t._v("#")]),t._v(" 3.1.1.1. Path Parameters")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Parameters")]),t._v(" "),s("th",[t._v("Type")]),t._v(" "),s("th",[t._v("Required")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("code",[t._v("index_uid")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("true")])])])]),t._v(" "),s("h6",{attrs:{id:"_3-1-1-1-1-index-uid"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-1-1-index-uid"}},[t._v("#")]),t._v(" 3.1.1.1.1. "),s("code",[t._v("index_uid")])]),t._v(" "),s("ul",[s("li",[t._v("Type: String")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("Unique identifier of an index.")]),t._v(" "),s("h5",{attrs:{id:"_3-1-1-2-request-payload-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-2-request-payload-definition"}},[t._v("#")]),t._v(" 3.1.1.2. Request Payload Definition")]),t._v(" "),s("p",[t._v("N/A")]),t._v(" "),s("h5",{attrs:{id:"_3-1-1-3-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-response-definition"}},[t._v("#")]),t._v(" 3.1.1.3. Response Definition")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Field")]),t._v(" "),s("th",[t._v("Type")]),t._v(" "),s("th",[t._v("Required")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("code",[t._v("numberOfDocuments")])]),t._v(" "),s("td",[t._v("Integer")]),t._v(" "),s("td",[t._v("true")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("isIndexing")])]),t._v(" "),s("td",[t._v("Boolean")]),t._v(" "),s("td",[t._v("true")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("fieldDistribution")])]),t._v(" "),s("td",[t._v("Object")]),t._v(" "),s("td",[t._v("true")])])])]),t._v(" "),s("h6",{attrs:{id:"_3-1-1-3-1-numberofdocuments"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-1-numberofdocuments"}},[t._v("#")]),t._v(" 3.1.1.3.1. "),s("code",[t._v("numberOfDocuments")])]),t._v(" "),s("ul",[s("li",[t._v("Type: Integer")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("The total number of documents in the index.")]),t._v(" "),s("h6",{attrs:{id:"_3-1-1-3-2-isindexing"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-2-isindexing"}},[t._v("#")]),t._v(" 3.1.1.3.2. "),s("code",[t._v("isIndexing")])]),t._v(" "),s("ul",[s("li",[t._v("Type: Boolean")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("If true, it indicates that the index is processing documents.")]),t._v(" "),s("h6",{attrs:{id:"_3-1-1-3-3-fielddistribution"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-3-3-fielddistribution"}},[t._v("#")]),t._v(" 3.1.1.3.3. "),s("code",[t._v("fieldDistribution")])]),t._v(" "),s("ul",[s("li",[t._v("Type: Object")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("Lists every field in the index and the total number of documents in the index containing that field.")]),t._v(" "),s("p",[s("code",[t._v("fieldDistribution")]),t._v(" is not impacted by searchableAttributes or displayedAttributes. If one of the fields is not displayed or searchable, it will still be displayed in the "),s("code",[t._v("fieldDistribution")]),t._v(" object.")]),t._v(" "),s("h5",{attrs:{id:"_3-1-1-4-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-4-errors"}},[t._v("#")]),t._v(" 3.1.1.4. Errors")]),t._v(" "),s("ul",[s("li",[t._v("🔴 Sending an invalid index uid format for the "),s("code",[t._v(":index_uid")]),t._v(" path parameter returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[t._v("invalid_index_uid")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 If the requested "),s("code",[t._v("index_uid")]),t._v(" does not exist, the API returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[t._v("index_not_found")]),t._v(" error.")],1)]),t._v(" "),s("h4",{attrs:{id:"_3-1-2-get-stats"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-get-stats"}},[t._v("#")]),t._v(" 3.1.2. "),s("code",[t._v("GET")]),t._v(" - "),s("code",[t._v("stats")])]),t._v(" "),s("p",[t._v("Get stats for all indexes.")]),t._v(" "),s("h5",{attrs:{id:"_3-1-2-1-path-parameters"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-path-parameters"}},[t._v("#")]),t._v(" 3.1.2.1. Path Parameters")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Parameter")]),t._v(" "),s("th",[t._v("Type")]),t._v(" "),s("th",[t._v("Required")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("code",[t._v("index_uid")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("true")])])])]),t._v(" "),s("h6",{attrs:{id:"_3-1-2-1-1-index-uid"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-1-1-index-uid"}},[t._v("#")]),t._v(" 3.1.2.1.1. "),s("code",[t._v("index_uid")])]),t._v(" "),s("ul",[s("li",[t._v("Type: String")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("Unique identifier of an index.")]),t._v(" "),s("h5",{attrs:{id:"_3-1-2-2-response-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-2-response-definition"}},[t._v("#")]),t._v(" 3.1.2.2. Response Definition")]),t._v(" "),s("p",[t._v("In addition to all fields returned by "),s("a",{attrs:{href:"#311-get---indexesindexuidstats"}},[t._v("3.1.1. "),s("code",[t._v("GET")]),t._v(" - "),s("code",[t._v("indexes/:index_uid/stats")])]),t._v(", this route returns the instance-level fields.")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Field")]),t._v(" "),s("th",[t._v("Type")]),t._v(" "),s("th",[t._v("Required")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("code",[t._v("databaseSize")])]),t._v(" "),s("td",[t._v("Integer")]),t._v(" "),s("td",[t._v("true")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("lastUpdate")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("true")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("indexes")])]),t._v(" "),s("td",[t._v("Object")]),t._v(" "),s("td",[t._v("true")])])])]),t._v(" "),s("h6",{attrs:{id:"_3-1-2-2-1-databasesize"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-2-1-databasesize"}},[t._v("#")]),t._v(" 3.1.2.2.1. "),s("code",[t._v("databaseSize")])]),t._v(" "),s("ul",[s("li",[t._v("Type: Integer")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("Size of the database in bytes. It represents the size on the disk of all the indexes.")]),t._v(" "),s("h6",{attrs:{id:"_3-1-2-2-2-lastupdate"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-2-2-lastupdate"}},[t._v("#")]),t._v(" 3.1.2.2.2. "),s("code",[t._v("lastUpdate")])]),t._v(" "),s("ul",[s("li",[t._v("Type: String")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("The last update date time when the index was updated.")]),t._v(" "),s("p",[t._v("Represented wih the RFC 3339 format.")]),t._v(" "),s("h6",{attrs:{id:"_3-1-2-2-3-indexes"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-2-3-indexes"}},[t._v("#")]),t._v(" 3.1.2.2.3. "),s("code",[t._v("indexes")])]),t._v(" "),s("ul",[s("li",[t._v("Type: Object")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("An object representing the statistics for each index found in the database.")]),t._v(" "),s("p",[t._v("e.g.")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"databaseSize"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("447819776")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"lastUpdate"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-11-15T11:15:22.092896Z"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexes"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"movies"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"numberOfDocuments"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19654")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"isIndexing"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"fieldDistribution"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"poster"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19654")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"overview"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19654")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19654")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19654")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"release_date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19654")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("See "),s("a",{attrs:{href:"#3113-response-definition"}},[t._v("3.1.1.3. Response Definition")]),t._v(" section for more details.")]),t._v(" "),s("h5",{attrs:{id:"_3-1-2-3-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-3-errors"}},[t._v("#")]),t._v(" 3.1.2.3. Errors")]),t._v(" "),s("ul",[s("li",[t._v("🔴 If the requested "),s("code",[t._v("index_uid")]),t._v(" does not exist, the API returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[t._v("index_not_found")]),t._v(" error.")],1)]),t._v(" "),s("h4",{attrs:{id:"_3-1-3-general-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-general-errors"}},[t._v("#")]),t._v(" 3.1.3. General Errors")]),t._v(" "),s("p",[t._v("These errors apply to all endpoints described here.")]),t._v(" "),s("h5",{attrs:{id:"_3-1-3-1-auth-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-3-1-auth-errors"}},[t._v("#")]),t._v(" 3.1.3.1 Auth Errors")]),t._v(" "),s("p",[t._v("The auth layer can return the following errors if Meilisearch is secured (a master-key is defined).")]),t._v(" "),s("ul",[s("li",[t._v("🔴 Accessing this route without the "),s("code",[t._v("Authorization")]),t._v(" header returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),s("h2",{attrs:{id:"_4-technical-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[t._v("#")]),t._v(" 4. Technical Details")]),t._v(" "),s("p",[t._v("N/A")]),t._v(" "),s("h2",{attrs:{id:"_5-future-possibilities"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[t._v("#")]),t._v(" 5. Future Possibilities")]),t._v(" "),s("ul",[s("li",[t._v("Rename "),s("code",[t._v("lastUpdate")]),t._v(" to "),s("code",[t._v("updatedAt")])]),t._v(" "),s("li",[t._v("Reconsider the existence of "),s("code",[t._v("isIndexing")])])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/52.55ac3382.js b/docs/assets/js/52.0681cb16.js similarity index 99% rename from docs/assets/js/52.55ac3382.js rename to docs/assets/js/52.0681cb16.js index 279037526..4314bd8b6 100644 --- a/docs/assets/js/52.55ac3382.js +++ b/docs/assets/js/52.0681cb16.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[52],{475:function(t,s,a){"use strict";a.r(s);var e=a(62),n=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("ul",[a("li",[t._v("Title: Indexing JSON")]),t._v(" "),a("li",[t._v("Start Date: 2022-08-16")]),t._v(" "),a("li",[t._v("Specification PR: "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/167",target:"_blank",rel:"noopener noreferrer"}},[t._v("PR-#167"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("Discovery Issue: n/a")])]),t._v(" "),a("h1",{attrs:{id:"indexing-json"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#indexing-json"}},[t._v("#")]),t._v(" Indexing JSON")]),t._v(" "),a("h2",{attrs:{id:"_1-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-functional-specification"}},[t._v("#")]),t._v(" 1. Functional Specification")]),t._v(" "),a("h3",{attrs:{id:"i-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#i-summary"}},[t._v("#")]),t._v(" I. Summary")]),t._v(" "),a("p",[t._v("To index documents, the body of the add documents request has to match a specific format. That specific format is then parsed and tokenized inside MeiliSearch. After which, the documents added are in the pool of searchable and returnable documents.")]),t._v(" "),a("p",[t._v("A "),a("a",{attrs:{href:"http://json.org/",target:"_blank",rel:"noopener noreferrer"}},[t._v("JSON"),a("OutboundLink")],1),t._v(" data format is easier to use than a CSV format because it propose a convenient format for storing structured data.\nWhen indexing multiple documents you should prefer using "),a("RouterLink",{attrs:{to:"/specifications/text/0028-indexing-ndjson.html"}},[t._v("ndjson")]),t._v(". It's faster and more concise.")],1),t._v(" "),a("h4",{attrs:{id:"summary-key-points"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#summary-key-points"}},[t._v("#")]),t._v(" Summary Key Points")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("application/json")]),t._v(" Content-Type header is now supported.")]),t._v(" "),a("li",[t._v("The error cases have been strengthened and completed. See Errors part.")])]),t._v(" "),a("h3",{attrs:{id:"ii-explanation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ii-explanation"}},[t._v("#")]),t._v(" II. Explanation")]),t._v(" "),a("ul",[a("li",[t._v("Meilisearch accept an array of documents")]),t._v(" "),a("li",[t._v("Or a single document.")]),t._v(" "),a("li",[t._v("The data should be encoded in UTF-8.")])]),t._v(" "),a("h4",{attrs:{id:"example-of-a-valid-json"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-of-a-valid-json"}},[t._v("#")]),t._v(" Example of a valid JSON")]),t._v(" "),a("p",[t._v('To send the following documents;\n\'\'\'\n{"id":1, "label": "t-shirt", "colors": ["red", "green", "blue"]}\n{"id":499, "label": "hoodie", "colors": ["purple"]}\n\'\'\'')]),t._v(" "),a("p",[t._v("You can send them in an array like that;")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t-shirt"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"blue"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("499")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"hoodie"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"purple"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("You also have the possibility to format the json however you like. Here is another way to send the two same documents;")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t-shirt"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"blue"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("499")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"hoodie"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"purple"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Or you could two requests to send the documents directly;")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t-shirt"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"blue"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("And")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("499")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"hoodie"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"purple"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("For example.")]),t._v(" "),a("p",[t._v("/!\\ Be cautious though, if you send the two documents in a single request like that for example;")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t-shirt"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"blue"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("499")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"hoodie"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"purple"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Meilisearch will only index the first document and "),a("strong",[t._v("won't")]),t._v(" throw an error.")]),t._v(" "),a("h4",{attrs:{id:"api-endpoints"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#api-endpoints"}},[t._v("#")]),t._v(" API Endpoints")]),t._v(" "),a("blockquote",[a("p",[t._v("Each API endpoints mentioned above will now require a "),a("code",[t._v("application/json")]),t._v(" as "),a("code",[t._v("Content-Type")]),t._v(" header to be processed as JSON data.")])]),t._v(" "),a("p",[a("strong",[t._v("As a developer, I want to upload a JSON payload of documents so that end-user can search them")])]),t._v(" "),a("p",[a("strong",[t._v("POST documents")]),t._v(" "),a("code",[t._v("/indexes/:indexUid/documents")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("curl")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n -X POST "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'http://localhost:7700/indexes/movies/documents'")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n -H "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Content-Type: application/json'")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n --data-binary "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('\'\n [{"id":1, "label": "t-shirt", "price": 4.99, "colors": ["red", "green", "blue"]},{"id":499, "label": "hoodie", "price": 19.99, "colors": ["purple"]}]\'')]),t._v("\n")])])]),a("blockquote",[a("p",[t._v("202 Accepted - Response")])]),t._v(" "),a("p",[a("strong",[t._v("PUT documents")]),t._v(" "),a("code",[t._v("/indexes/:indexUid/documents")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("curl")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n -X PUT "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'http://localhost:7700/indexes/movies/documents'")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n -H "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Content-Type: application/json'")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n --data-binary "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('\'\n [{"id":1, "label": "t-shirt", "price": 4.99, "colors": ["red", "green", "blue"]},{"id":499, "label": "hoodie", "price": 19.99, "colors": ["purple"]}]\'')]),t._v("\n")])])]),a("blockquote",[a("p",[t._v("202 Accepted - Response")])]),t._v(" "),a("h5",{attrs:{id:"errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#errors"}},[t._v("#")]),t._v(" Errors")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Omitted "),a("code",[t._v("Content-Type")]),t._v(" header will lead to a 415 Unsupported Media Type - "),a("strong",[t._v("missing_content_type")]),t._v(" error code.")]),t._v(" "),a("li",[t._v("🔴 Sending an empty "),a("code",[t._v("Content-Type")]),t._v(" will lead to a 415 Unsupported Media Type - "),a("strong",[t._v("invalid_content_type")]),t._v(" error code.")]),t._v(" "),a("li",[t._v("🔴 Sending a different "),a("code",[t._v("Content-Type")]),t._v(" than "),a("code",[t._v("application/json")]),t._v(", "),a("code",[t._v("application/x-ndjson")]),t._v(" or "),a("code",[t._v("text/csv")]),t._v(" will lead to 415 Unsupported Media Type "),a("strong",[t._v("invalid_content_type")]),t._v(" error code.")]),t._v(" "),a("li",[t._v("🔴 Sending an empty payload will lead to a 400 Bad Request - "),a("strong",[t._v("missing_payload")]),t._v(" error code.")]),t._v(" "),a("li",[t._v("🔴 Sending a different payload type than the "),a("code",[t._v("Content-Type")]),t._v(" header should return a 400 Bad Request - "),a("strong",[t._v("malformed_payload")]),t._v(" error code.")]),t._v(" "),a("li",[t._v("🔴 Sending a payload excessing the limit will lead to a 413 Payload Too Large - "),a("strong",[t._v("payload_too_large")]),t._v(" error code.")]),t._v(" "),a("li",[t._v("🔴 Sending an invalid json format will lead to a 400 bad_request - "),a("strong",[t._v("malformed_payload")]),t._v(" error code.")])]),t._v(" "),a("h5",{attrs:{id:"errors-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#errors-definition"}},[t._v("#")]),t._v(" Errors Definition")]),t._v(" "),a("h2",{attrs:{id:"missing-content-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-content-type"}},[t._v("#")]),t._v(" missing_content_type")]),t._v(" "),a("h3",{attrs:{id:"context"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the Content-Type header is missing.")]),t._v(" "),a("h3",{attrs:{id:"error-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("415 Unsupported Media Type")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"A Content-Type header is missing. Accepted values for the Content-Type header are: :contentTypeList"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_content_type"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_content_type"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[t._v("The "),a("code",[t._v(":contentTypeList")]),t._v(" is inferred when the message is generated. The values are separated by a "),a("code",[t._v(",")]),t._v(" char. e.g. "),a("code",[t._v("application/json")]),t._v(", "),a("code",[t._v("text/csv")]),t._v(".")])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-content-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-content-type"}},[t._v("#")]),t._v(" invalid_content_type")]),t._v(" "),a("h3",{attrs:{id:"context-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-2"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the provided content-type is not handled by the API method.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-2"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("415 Unsupported Media Type")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Content-Type :contentType is invalid. Accepted values for the Content-Type header are: :contentTypeList"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_content_type"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_content_type"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[t._v("The "),a("code",[t._v(":contentTypeList")]),t._v(" is inferred when the message is generated. The values are separated by a "),a("code",[t._v(",")]),t._v(" char. e.g. "),a("code",[t._v("application/json")]),t._v(", "),a("code",[t._v("text/csv")]),t._v(".")])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-payload"}},[t._v("#")]),t._v(" missing_payload")]),t._v(" "),a("h3",{attrs:{id:"context-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-3"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the client does not provide a mandatory payload to the request.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-3"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"A :payloadType payload is missing."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_payload"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_payload"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[t._v("The "),a("code",[t._v(":payloadType")]),t._v(" is inferred when the message is generated. e.g. "),a("code",[t._v("json")]),t._v(", "),a("code",[t._v("ndjson")]),t._v(", "),a("code",[t._v("csv")])])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"malformed-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#malformed-payload"}},[t._v("#")]),t._v(" malformed_payload")]),t._v(" "),a("h3",{attrs:{id:"context-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-4"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the format sent in the payload is malformed. The payload contains a syntax error.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-4"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The :payloadType payload provided is malformed. :syntaxErrorHelper."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"malformed_payload"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#malformed_payload"')]),t._v("\n")])])]),a("ul",[a("li",[t._v("The "),a("code",[t._v(":payloadType")]),t._v(" is inferred when the message is generated. e.g. "),a("code",[t._v("json")]),t._v(", "),a("code",[t._v("ndjson")]),t._v(", "),a("code",[t._v("csv")])]),t._v(" "),a("li",[t._v("The "),a("code",[t._v(":syntaxErrorHelper")]),t._v(" is inferred when the message is generated.")])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"_2-technical-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-details"}},[t._v("#")]),t._v(" 2. Technical details")]),t._v(" "),a("p",[t._v("n/a")]),t._v(" "),a("h2",{attrs:{id:"_3-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[t._v("#")]),t._v(" 3. Future possibilities")]),t._v(" "),a("ul",[a("li",[t._v("Throw an error when there is multiple documents in the payload but not in an array.")])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[52],{478:function(t,s,a){"use strict";a.r(s);var e=a(62),n=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("ul",[a("li",[t._v("Title: Indexing JSON")]),t._v(" "),a("li",[t._v("Start Date: 2022-08-16")]),t._v(" "),a("li",[t._v("Specification PR: "),a("a",{attrs:{href:"https://github.com/meilisearch/specifications/pull/167",target:"_blank",rel:"noopener noreferrer"}},[t._v("PR-#167"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("Discovery Issue: n/a")])]),t._v(" "),a("h1",{attrs:{id:"indexing-json"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#indexing-json"}},[t._v("#")]),t._v(" Indexing JSON")]),t._v(" "),a("h2",{attrs:{id:"_1-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-functional-specification"}},[t._v("#")]),t._v(" 1. Functional Specification")]),t._v(" "),a("h3",{attrs:{id:"i-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#i-summary"}},[t._v("#")]),t._v(" I. Summary")]),t._v(" "),a("p",[t._v("To index documents, the body of the add documents request has to match a specific format. That specific format is then parsed and tokenized inside MeiliSearch. After which, the documents added are in the pool of searchable and returnable documents.")]),t._v(" "),a("p",[t._v("A "),a("a",{attrs:{href:"http://json.org/",target:"_blank",rel:"noopener noreferrer"}},[t._v("JSON"),a("OutboundLink")],1),t._v(" data format is easier to use than a CSV format because it propose a convenient format for storing structured data.\nWhen indexing multiple documents you should prefer using "),a("RouterLink",{attrs:{to:"/specifications/text/0028-indexing-ndjson.html"}},[t._v("ndjson")]),t._v(". It's faster and more concise.")],1),t._v(" "),a("h4",{attrs:{id:"summary-key-points"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#summary-key-points"}},[t._v("#")]),t._v(" Summary Key Points")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("application/json")]),t._v(" Content-Type header is now supported.")]),t._v(" "),a("li",[t._v("The error cases have been strengthened and completed. See Errors part.")])]),t._v(" "),a("h3",{attrs:{id:"ii-explanation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ii-explanation"}},[t._v("#")]),t._v(" II. Explanation")]),t._v(" "),a("ul",[a("li",[t._v("Meilisearch accept an array of documents")]),t._v(" "),a("li",[t._v("Or a single document.")]),t._v(" "),a("li",[t._v("The data should be encoded in UTF-8.")])]),t._v(" "),a("h4",{attrs:{id:"example-of-a-valid-json"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-of-a-valid-json"}},[t._v("#")]),t._v(" Example of a valid JSON")]),t._v(" "),a("p",[t._v('To send the following documents;\n\'\'\'\n{"id":1, "label": "t-shirt", "colors": ["red", "green", "blue"]}\n{"id":499, "label": "hoodie", "colors": ["purple"]}\n\'\'\'')]),t._v(" "),a("p",[t._v("You can send them in an array like that;")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t-shirt"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"blue"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("499")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"hoodie"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"purple"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("You also have the possibility to format the json however you like. Here is another way to send the two same documents;")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t-shirt"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"blue"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("499")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"hoodie"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"purple"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("p",[t._v("Or you could two requests to send the documents directly;")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t-shirt"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"blue"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("And")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("499")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"hoodie"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"purple"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("For example.")]),t._v(" "),a("p",[t._v("/!\\ Be cautious though, if you send the two documents in a single request like that for example;")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t-shirt"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"blue"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("499")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"label"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"hoodie"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"colors"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"purple"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Meilisearch will only index the first document and "),a("strong",[t._v("won't")]),t._v(" throw an error.")]),t._v(" "),a("h4",{attrs:{id:"api-endpoints"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#api-endpoints"}},[t._v("#")]),t._v(" API Endpoints")]),t._v(" "),a("blockquote",[a("p",[t._v("Each API endpoints mentioned above will now require a "),a("code",[t._v("application/json")]),t._v(" as "),a("code",[t._v("Content-Type")]),t._v(" header to be processed as JSON data.")])]),t._v(" "),a("p",[a("strong",[t._v("As a developer, I want to upload a JSON payload of documents so that end-user can search them")])]),t._v(" "),a("p",[a("strong",[t._v("POST documents")]),t._v(" "),a("code",[t._v("/indexes/:indexUid/documents")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("curl")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n -X POST "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'http://localhost:7700/indexes/movies/documents'")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n -H "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Content-Type: application/json'")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n --data-binary "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('\'\n [{"id":1, "label": "t-shirt", "price": 4.99, "colors": ["red", "green", "blue"]},{"id":499, "label": "hoodie", "price": 19.99, "colors": ["purple"]}]\'')]),t._v("\n")])])]),a("blockquote",[a("p",[t._v("202 Accepted - Response")])]),t._v(" "),a("p",[a("strong",[t._v("PUT documents")]),t._v(" "),a("code",[t._v("/indexes/:indexUid/documents")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("curl")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n -X PUT "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'http://localhost:7700/indexes/movies/documents'")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n -H "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Content-Type: application/json'")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n --data-binary "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('\'\n [{"id":1, "label": "t-shirt", "price": 4.99, "colors": ["red", "green", "blue"]},{"id":499, "label": "hoodie", "price": 19.99, "colors": ["purple"]}]\'')]),t._v("\n")])])]),a("blockquote",[a("p",[t._v("202 Accepted - Response")])]),t._v(" "),a("h5",{attrs:{id:"errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#errors"}},[t._v("#")]),t._v(" Errors")]),t._v(" "),a("ul",[a("li",[t._v("🔴 Omitted "),a("code",[t._v("Content-Type")]),t._v(" header will lead to a 415 Unsupported Media Type - "),a("strong",[t._v("missing_content_type")]),t._v(" error code.")]),t._v(" "),a("li",[t._v("🔴 Sending an empty "),a("code",[t._v("Content-Type")]),t._v(" will lead to a 415 Unsupported Media Type - "),a("strong",[t._v("invalid_content_type")]),t._v(" error code.")]),t._v(" "),a("li",[t._v("🔴 Sending a different "),a("code",[t._v("Content-Type")]),t._v(" than "),a("code",[t._v("application/json")]),t._v(", "),a("code",[t._v("application/x-ndjson")]),t._v(" or "),a("code",[t._v("text/csv")]),t._v(" will lead to 415 Unsupported Media Type "),a("strong",[t._v("invalid_content_type")]),t._v(" error code.")]),t._v(" "),a("li",[t._v("🔴 Sending an empty payload will lead to a 400 Bad Request - "),a("strong",[t._v("missing_payload")]),t._v(" error code.")]),t._v(" "),a("li",[t._v("🔴 Sending a different payload type than the "),a("code",[t._v("Content-Type")]),t._v(" header should return a 400 Bad Request - "),a("strong",[t._v("malformed_payload")]),t._v(" error code.")]),t._v(" "),a("li",[t._v("🔴 Sending a payload excessing the limit will lead to a 413 Payload Too Large - "),a("strong",[t._v("payload_too_large")]),t._v(" error code.")]),t._v(" "),a("li",[t._v("🔴 Sending an invalid json format will lead to a 400 bad_request - "),a("strong",[t._v("malformed_payload")]),t._v(" error code.")])]),t._v(" "),a("h5",{attrs:{id:"errors-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#errors-definition"}},[t._v("#")]),t._v(" Errors Definition")]),t._v(" "),a("h2",{attrs:{id:"missing-content-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-content-type"}},[t._v("#")]),t._v(" missing_content_type")]),t._v(" "),a("h3",{attrs:{id:"context"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the Content-Type header is missing.")]),t._v(" "),a("h3",{attrs:{id:"error-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("415 Unsupported Media Type")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"A Content-Type header is missing. Accepted values for the Content-Type header are: :contentTypeList"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_content_type"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_content_type"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[t._v("The "),a("code",[t._v(":contentTypeList")]),t._v(" is inferred when the message is generated. The values are separated by a "),a("code",[t._v(",")]),t._v(" char. e.g. "),a("code",[t._v("application/json")]),t._v(", "),a("code",[t._v("text/csv")]),t._v(".")])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"invalid-content-type"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#invalid-content-type"}},[t._v("#")]),t._v(" invalid_content_type")]),t._v(" "),a("h3",{attrs:{id:"context-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-2"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the provided content-type is not handled by the API method.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-2"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("415 Unsupported Media Type")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The Content-Type :contentType is invalid. Accepted values for the Content-Type header are: :contentTypeList"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_content_type"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#invalid_content_type"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[t._v("The "),a("code",[t._v(":contentTypeList")]),t._v(" is inferred when the message is generated. The values are separated by a "),a("code",[t._v(",")]),t._v(" char. e.g. "),a("code",[t._v("application/json")]),t._v(", "),a("code",[t._v("text/csv")]),t._v(".")])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"missing-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#missing-payload"}},[t._v("#")]),t._v(" missing_payload")]),t._v(" "),a("h3",{attrs:{id:"context-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-3"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the client does not provide a mandatory payload to the request.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-3"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"A :payloadType payload is missing."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"missing_payload"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#missing_payload"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("ul",[a("li",[t._v("The "),a("code",[t._v(":payloadType")]),t._v(" is inferred when the message is generated. e.g. "),a("code",[t._v("json")]),t._v(", "),a("code",[t._v("ndjson")]),t._v(", "),a("code",[t._v("csv")])])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"malformed-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#malformed-payload"}},[t._v("#")]),t._v(" malformed_payload")]),t._v(" "),a("h3",{attrs:{id:"context-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#context-4"}},[t._v("#")]),t._v(" Context")]),t._v(" "),a("p",[t._v("This error occurs when the format sent in the payload is malformed. The payload contains a syntax error.")]),t._v(" "),a("h3",{attrs:{id:"error-definition-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#error-definition-4"}},[t._v("#")]),t._v(" Error Definition")]),t._v(" "),a("p",[t._v("HTTP Code: "),a("code",[t._v("400 Bad Request")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[t._v(" "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The :payloadType payload provided is malformed. :syntaxErrorHelper."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"code"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"malformed_payload"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"invalid_request"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"link"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://docs.meilisearch.com/errors#malformed_payload"')]),t._v("\n")])])]),a("ul",[a("li",[t._v("The "),a("code",[t._v(":payloadType")]),t._v(" is inferred when the message is generated. e.g. "),a("code",[t._v("json")]),t._v(", "),a("code",[t._v("ndjson")]),t._v(", "),a("code",[t._v("csv")])]),t._v(" "),a("li",[t._v("The "),a("code",[t._v(":syntaxErrorHelper")]),t._v(" is inferred when the message is generated.")])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"_2-technical-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-details"}},[t._v("#")]),t._v(" 2. Technical details")]),t._v(" "),a("p",[t._v("n/a")]),t._v(" "),a("h2",{attrs:{id:"_3-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[t._v("#")]),t._v(" 3. Future possibilities")]),t._v(" "),a("ul",[a("li",[t._v("Throw an error when there is multiple documents in the payload but not in an array.")])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/53.f57a89e9.js b/docs/assets/js/53.d16d1983.js similarity index 98% rename from docs/assets/js/53.f57a89e9.js rename to docs/assets/js/53.d16d1983.js index cbdaba7c0..91570acfd 100644 --- a/docs/assets/js/53.f57a89e9.js +++ b/docs/assets/js/53.d16d1983.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[53],{477:function(e,t,s){"use strict";s.r(t);var a=s(62),o=Object(a.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:"documents-soft-deletion"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#documents-soft-deletion"}},[e._v("#")]),e._v(" Documents Soft Deletion")]),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 internals of the document soft-deletion algorithm.")]),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("Deleting documents is extremely slow and can happen when;")]),e._v(" "),s("ul",[s("li",[e._v("A user deletes a single document.")]),e._v(" "),s("li",[e._v("A user deletes a batch of documents.")]),e._v(" "),s("li",[e._v("A user updates one or multiple documents (i.e., the primary key is the same, but the document's content is not the same).")])]),e._v(" "),s("p",[e._v("The purpose of the document soft-deletion feature is to make the deletion of documents almost instantaneous by "),s("strong",[e._v("not")]),e._v(" deleting the document when asked.")]),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("p",[e._v("Instead of deleting the documents, Meilisearch marks them internally as deleted and then excludes them from all the other algorithms of the engine.\nThat's fast but takes up space; thus, at some point, we need to "),s("em",[e._v("really")]),e._v(" delete the soft-deleted documents.")]),e._v(" "),s("p",[e._v("This can happen for two reasons;")]),e._v(" "),s("ol",[s("li",[e._v("when there are more soft-deleted documents than regular documents in the database, or")]),e._v(" "),s("li",[e._v("when the soft-deleted documents occupy more disk space than a fixed threshold.")])]),e._v(" "),s("p",[e._v("Reason (2) presents the drawback that we don't know the precise disk space taken by a document, for technical reasons. Since the information we have is the total size taken by all documents (soft-deleted or not) and the number of documents, we approximate the size of a document to the average size of a document.\nThis means that if a few outliers are updated/deleted, they can take up much more disk space than the fixed threshold.")]),e._v(" "),s("h2",{attrs:{id:"_4-future-possibilities"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-future-possibilities"}},[e._v("#")]),e._v(" 4. Future Possibilities")]),e._v(" "),s("ul",[s("li",[e._v("Work again on the way to get the size of the disk the "),s("code",[e._v("data.ms")]),e._v(" is currently running on. This would improve the analytics as well.")]),e._v(" "),s("li",[e._v("Provide a CLI parameter to select how much space can be used to store the soft deleted documents.\n"),s("ul",[s("li",[e._v("It could be expressed as a real size or in terms of percentage.")])])]),e._v(" "),s("li",[e._v("Provide a route to delete the soft-deleted documents.\n"),s("ul",[s("li",[e._v("It could be useful if a user "),s("strong",[e._v("knows")]),e._v(" they will have a lot of updates during the day but nothing around midnight, for example.")]),e._v(" "),s("li",[e._v("It would allow a user to clear the soft-deleted when Meilisearch is not under pressure to ensure all your updates stay fast during the day.")])])])])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[53],{475:function(e,t,s){"use strict";s.r(t);var a=s(62),o=Object(a.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:"documents-soft-deletion"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#documents-soft-deletion"}},[e._v("#")]),e._v(" Documents Soft Deletion")]),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 internals of the document soft-deletion algorithm.")]),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("Deleting documents is extremely slow and can happen when;")]),e._v(" "),s("ul",[s("li",[e._v("A user deletes a single document.")]),e._v(" "),s("li",[e._v("A user deletes a batch of documents.")]),e._v(" "),s("li",[e._v("A user updates one or multiple documents (i.e., the primary key is the same, but the document's content is not the same).")])]),e._v(" "),s("p",[e._v("The purpose of the document soft-deletion feature is to make the deletion of documents almost instantaneous by "),s("strong",[e._v("not")]),e._v(" deleting the document when asked.")]),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("p",[e._v("Instead of deleting the documents, Meilisearch marks them internally as deleted and then excludes them from all the other algorithms of the engine.\nThat's fast but takes up space; thus, at some point, we need to "),s("em",[e._v("really")]),e._v(" delete the soft-deleted documents.")]),e._v(" "),s("p",[e._v("This can happen for two reasons;")]),e._v(" "),s("ol",[s("li",[e._v("when there are more soft-deleted documents than regular documents in the database, or")]),e._v(" "),s("li",[e._v("when the soft-deleted documents occupy more disk space than a fixed threshold.")])]),e._v(" "),s("p",[e._v("Reason (2) presents the drawback that we don't know the precise disk space taken by a document, for technical reasons. Since the information we have is the total size taken by all documents (soft-deleted or not) and the number of documents, we approximate the size of a document to the average size of a document.\nThis means that if a few outliers are updated/deleted, they can take up much more disk space than the fixed threshold.")]),e._v(" "),s("h2",{attrs:{id:"_4-future-possibilities"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-future-possibilities"}},[e._v("#")]),e._v(" 4. Future Possibilities")]),e._v(" "),s("ul",[s("li",[e._v("Work again on the way to get the size of the disk the "),s("code",[e._v("data.ms")]),e._v(" is currently running on. This would improve the analytics as well.")]),e._v(" "),s("li",[e._v("Provide a CLI parameter to select how much space can be used to store the soft deleted documents.\n"),s("ul",[s("li",[e._v("It could be expressed as a real size or in terms of percentage.")])])]),e._v(" "),s("li",[e._v("Provide a route to delete the soft-deleted documents.\n"),s("ul",[s("li",[e._v("It could be useful if a user "),s("strong",[e._v("knows")]),e._v(" they will have a lot of updates during the day but nothing around midnight, for example.")]),e._v(" "),s("li",[e._v("It would allow a user to clear the soft-deleted when Meilisearch is not under pressure to ensure all your updates stay fast during the day.")])])])])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/54.70550584.js b/docs/assets/js/54.c149ca97.js similarity index 99% rename from docs/assets/js/54.70550584.js rename to docs/assets/js/54.c149ca97.js index d6aa82aee..9ce7863bc 100644 --- a/docs/assets/js/54.70550584.js +++ b/docs/assets/js/54.c149ca97.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],{476: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/56.dfe45e94.js b/docs/assets/js/56.a3d19c35.js similarity index 99% rename from docs/assets/js/56.dfe45e94.js rename to docs/assets/js/56.a3d19c35.js index 105eaa9ad..02551afa7 100644 --- a/docs/assets/js/56.dfe45e94.js +++ b/docs/assets/js/56.a3d19c35.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[56],{482:function(e,t,s){"use strict";s.r(t);var a=s(62),i=Object(a.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:"metrics-api"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#metrics-api"}},[e._v("#")]),e._v(" Metrics API")]),e._v(" "),s("p",[e._v("This endpoint is currently "),s("RouterLink",{attrs:{to:"/specifications/text/0193-experimental-features.html"}},[e._v("experimental")]),e._v(".")],1),e._v(" "),s("p",[e._v("This means that it can break at any time between two minor versions as long as it is not stabilized.")]),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 metrics API endpoint with the exhaustive list of returned metrics.")]),e._v(" "),s("p",[e._v("The endpoint returns observability data to monitor a Meilisearch instance using "),s("a",{attrs:{href:"https://prometheus.io/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Prometheus"),s("OutboundLink")],1),e._v(".")]),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("Improve the capabilities of a Meilisearch instance regarding observability and ease its integration into monitoring stacks.")]),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-activating-the-feature"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-activating-the-feature"}},[e._v("#")]),e._v(" 3.1. Activating the feature")]),e._v(" "),s("p",[e._v("By default, the "),s("code",[e._v("/metrics")]),e._v(" endpoint is not accessible. To activate it, the "),s("code",[e._v("--experimental-enable-metrics")]),e._v(" CLI option or "),s("code",[e._v("MEILI_EXPERIMENTAL_ENABLE_METRICS")]),e._v(" env var must be specified at launch. See "),s("RouterLink",{attrs:{to:"/specifications/text/0119-instance-options.html"}},[e._v("Instance Options")])],1),e._v(" "),s("h3",{attrs:{id:"_3-2-metrics-api-resource-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-metrics-api-resource-definition"}},[e._v("#")]),e._v(" 3.2. "),s("code",[e._v("metrics")]),e._v(" API resource definition")]),e._v(" "),s("p",[e._v("Prometheus metrics format is text-based and line-oriented. Lines are separated by a line feed character (n).")]),e._v(" "),s("p",[e._v("A metric is composed of several fields:")]),e._v(" "),s("ul",[s("li",[s("code",[e._v("# HELP")]),e._v(" metadata")]),e._v(" "),s("li",[s("code",[e._v("# TYPE")]),e._v(" metadata")]),e._v(" "),s("li",[e._v("Metric name")]),e._v(" "),s("li",[e._v("Current metric value")])]),e._v(" "),s("p",[e._v("Meilisearch returns the metrics specified in the table below.")]),e._v(" "),s("table",[s("thead",[s("tr",[s("th",[e._v("Name")]),e._v(" "),s("th",[e._v("Type")])])]),e._v(" "),s("tbody",[s("tr",[s("td",[s("a",{attrs:{href:"#321-meilisearch_http_requests_total"}},[s("code",[e._v("meilisearch_http_requests_total")])])]),e._v(" "),s("td",[e._v("counter")])]),e._v(" "),s("tr",[s("td",[s("a",{attrs:{href:"#322-meilisearch_http_response_time_seconds"}},[s("code",[e._v("meilisearch_http_response_time_seconds")])])]),e._v(" "),s("td",[e._v("histogram")])]),e._v(" "),s("tr",[s("td",[s("a",{attrs:{href:"#323-meilisearch_db_size_bytes"}},[s("code",[e._v("meilisearch_db_size_bytes")])])]),e._v(" "),s("td",[e._v("gauge")])]),e._v(" "),s("tr",[s("td",[s("a",{attrs:{href:"#324-meilisearch_used_db_size_bytes"}},[s("code",[e._v("meilisearch_used_db_size_bytes")])])]),e._v(" "),s("td",[e._v("gauge")])]),e._v(" "),s("tr",[s("td",[s("a",{attrs:{href:"#325-meilisearch_index_docs_count"}},[s("code",[e._v("meilisearch_index_docs_count")])])]),e._v(" "),s("td",[e._v("gauge")])]),e._v(" "),s("tr",[s("td",[s("a",{attrs:{href:"#326-meilisearch_index_count"}},[s("code",[e._v("meilisearch_index_count")])])]),e._v(" "),s("td",[e._v("gauge")])]),e._v(" "),s("tr",[s("td",[s("a",{attrs:{href:"#327-meilisearch_nb_tasks"}},[s("code",[e._v("meilisearch_nb_tasks")])])]),e._v(" "),s("td",[e._v("counter")])]),e._v(" "),s("tr",[s("td",[s("a",{attrs:{href:"#328-meilisearch_last_update"}},[s("code",[e._v("meilisearch_last_update")])])]),e._v(" "),s("td",[e._v("gauge")])]),e._v(" "),s("tr",[s("td",[s("a",{attrs:{href:"#329-meilisearch_is_indexing"}},[s("code",[e._v("meilisearch_is_indexing")])])]),e._v(" "),s("td",[e._v("gauge")])])])]),e._v(" "),s("h4",{attrs:{id:"_3-2-1-meilisearch-http-requests-total"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-meilisearch-http-requests-total"}},[e._v("#")]),e._v(" 3.2.1 "),s("code",[e._v("meilisearch_http_requests_total")])]),e._v(" "),s("p",[e._v("Returns the number of times an API resource is accessed.")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v('# HELP http_requests_total HTTP requests total\n# TYPE http_requests_total counter\nmeilisearch_http_requests_total{method=":httpMethod",path=":resourcePath"} :numberOfRequest\n')])])]),s("h4",{attrs:{id:"_3-2-2-meilisearch-http-response-time-seconds"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-meilisearch-http-response-time-seconds"}},[e._v("#")]),e._v(" 3.2.2. "),s("code",[e._v("meilisearch_http_response_time_seconds")])]),e._v(" "),s("p",[e._v("Returns a time histogram showing the number of times an API resource call goes into a time bucket (expressed in second).")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v('# HELP http_response_time_seconds HTTP response times\n# TYPE http_response_time_seconds histogram\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.0005"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.0008"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.00085"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.0009"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.00095"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.001"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.00105"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.0011"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.00115"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.0012"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.0015"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.002"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.003"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="1"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="+Inf"} :numberOfRequest\nhttp_response_time_seconds_sum{method=":httpMethod",path=":resourcePath"} :numberOfRequest\nmeilisearch_http_response_time_seconds_count{method=":httpMethod",path=":resourcePath"} :numberOfRequest\n')])])]),s("h4",{attrs:{id:"_3-2-3-meilisearch-db-size-bytes"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-meilisearch-db-size-bytes"}},[e._v("#")]),e._v(" 3.2.3. "),s("code",[e._v("meilisearch_db_size_bytes")])]),e._v(" "),s("p",[e._v("Returns the “real” size of the database on disk in bytes.\nIt includes all the lmdb memory mapped files plus all the files contained in the "),s("code",[e._v("data.ms")]),e._v(" directory (mainly the updates files that were not processed yet).")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("# HELP meilisearch_db_size_bytes Meilisearch Db Size In Bytes\n# TYPE meilisearch_db_size_bytes gauge\nmeilisearch_db_size_bytes :databaseSizeInBytes\n")])])]),s("h4",{attrs:{id:"_3-2-4-meilisearch-used-db-size-bytes"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-meilisearch-used-db-size-bytes"}},[e._v("#")]),e._v(" 3.2.4. "),s("code",[e._v("meilisearch_used_db_size_bytes")])]),e._v(" "),s("p",[e._v("Returns the size of the database actually used by meilisearch in bytes.\nInclude all the same files as "),s("code",[e._v("meilisearch_db_size_bytes")]),e._v(" except that when it comes to an LMDB database, we only count the pages used by meilisearch.\nThis means if you see a large gap between both metrics, adding documents will probably re-use freed pages instead of growing "),s("code",[e._v("meilisearch_db_size_bytes")]),e._v(".")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("# HELP meilisearch_used_db_size_bytes Meilisearch Used DB Size In Bytes\n# TYPE meilisearch_used_db_size_bytes gauge\nmeilisearch_used_db_size_bytes :databaseSizeInBytes\n")])])]),s("h4",{attrs:{id:"_3-2-5-meilisearch-index-docs-count"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-5-meilisearch-index-docs-count"}},[e._v("#")]),e._v(" 3.2.5. "),s("code",[e._v("meilisearch_index_docs_count")])]),e._v(" "),s("p",[e._v("Returns the number of documents for an index.")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v('# HELP meilisearch_index_docs_count Meilisearch Index Docs Count\n# TYPE meilisearch_index_docs_count gauge\nmeilisearch_index_docs_count{index=":indexUid"} :numberOfDocuments\n')])])]),s("h4",{attrs:{id:"_3-2-6-meilisearch-index-count"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-6-meilisearch-index-count"}},[e._v("#")]),e._v(" 3.2.6. "),s("code",[e._v("meilisearch_index_count")])]),e._v(" "),s("p",[e._v("Returns the total number of indexes for the Meilisearch instance.")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("# HELP meilisearch_index_count Meilisearch Index Count\n# TYPE meilisearch_index_count gauge\nmeilisearch_index_count :numberOfIndex\n")])])]),s("h4",{attrs:{id:"_3-2-7-meilisearch-nb-tasks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-7-meilisearch-nb-tasks"}},[e._v("#")]),e._v(" 3.2.7. "),s("code",[e._v("meilisearch_nb_tasks")])]),e._v(" "),s("p",[e._v("Returns the total number of tasks for the Meilisearch instance parametrized by the kind of task and its value (see the table below).")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v('# HELP meilisearch_nb_tasks Meilisearch Number of tasks\n# TYPE meilisearch_nb_tasks gauge\nmeilisearch_nb_tasks{kind=":kind",value=":value"} :number\n')])])]),s("p",[e._v("Here is a list of available kind and associated values:")]),e._v(" "),s("table",[s("thead",[s("tr",[s("th",[e._v("Kind")]),e._v(" "),s("th",[e._v("values")])])]),e._v(" "),s("tbody",[s("tr",[s("td",[e._v("indexes")]),e._v(" "),s("td",[e._v("Any created indexes")])]),e._v(" "),s("tr",[s("td",[e._v("statuses")]),e._v(" "),s("td",[e._v("Any task statuses (i.e.: succeeded, failed, enqueued, etc...)")])]),e._v(" "),s("tr",[s("td",[e._v("types")]),e._v(" "),s("td",[e._v("Any task types (i.e.: documentAdditionOrUpdate, settingsUpdate, etc...)")])])])]),e._v(" "),s("h4",{attrs:{id:"_3-2-8-meilisearch-last-update"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-8-meilisearch-last-update"}},[e._v("#")]),e._v(" 3.2.8. "),s("code",[e._v("meilisearch_last_update")])]),e._v(" "),s("p",[e._v("Returns the timestamp of the last update.")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("# HELP meilisearch_last_update Meilisearch Last Update\n# TYPE meilisearch_last_update gauge\nmeilisearch_last_update :unixTimestamp\n")])])]),s("h4",{attrs:{id:"_3-2-8-meilisearch-is-indexing"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-8-meilisearch-is-indexing"}},[e._v("#")]),e._v(" 3.2.8. "),s("code",[e._v("meilisearch_is_indexing")])]),e._v(" "),s("p",[e._v("Returns "),s("code",[e._v("1")]),e._v(" if Meilisearch is indexing or "),s("code",[e._v("0")]),e._v(" if not.")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("# HELP meilisearch_is_indexing Meilisearch Is Indexing\n# TYPE meilisearch_is_indexing gauge\nmeilisearch_is_indexing :isIndexing\n")])])]),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("h4",{attrs:{id:"_3-3-1-get-metrics"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get-metrics"}},[e._v("#")]),e._v(" 3.3.1. "),s("code",[e._v("GET")]),e._v(" - "),s("code",[e._v("/metrics")])]),e._v(" "),s("p",[e._v("Fetch the metrics of the Meilisearch instance.")]),e._v(" "),s("p",[s("code",[e._v("200")]),e._v(" - Response body example")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v('# HELP meilisearch_database_size MeiliSearch Stats DbSize\n# TYPE meilisearch_database_size gauge\nmeilisearch_database_size 1097728\n# HELP meilisearch_docs_count MeiliSearch Stats Docs Count\n# TYPE meilisearch_docs_count gauge\nmeilisearch_docs_count{index="movies"} 807\nmeilisearch_docs_count{index="movies_2"} 0\n# HELP meilisearch_total_index MeiliSearch Stats Index Count\n# TYPE meilisearch_total_index gauge\nmeilisearch_total_index 2\n')])])]),s("h4",{attrs:{id:"_3-3-2-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-errors"}},[e._v("#")]),e._v(" 3.3.2. Errors")]),e._v(" "),s("ul",[s("li",[e._v("🔴 If "),s("code",[e._v("--experimental-enable-metrics")]),e._v(" CLI option / "),s("code",[e._v("MEILI_EXPERIMENTAL_ENABLE_METRICS")]),e._v(" env var is not specified at launch, the API returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#feature-not-enabled"}},[e._v("feature_not_enabled")]),e._v(" error.")],1)]),e._v(" "),s("h5",{attrs:{id:"_3-3-2-1-auth-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-1-auth-errors"}},[e._v("#")]),e._v(" 3.3.2.1 Auth Errors")]),e._v(" "),s("p",[e._v("If a master key is used to secure a Meilisearch instance, the auth layer returns the following errors:")]),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 the permission "),s("code",[e._v("metrics.get")]),e._v(" (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("li",[e._v("🔴 Accessing this route with a key that has a restriction on the indexes 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("p",[e._v("N/A")]),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("Merge "),s("code",[e._v("/stats")]),e._v(" with "),s("code",[e._v("/metrics")]),e._v(". A header could specify the preferred format. e.g "),s("code",[e._v("application/json")]),e._v(" (similar to actual "),s("code",[e._v("stats")]),e._v(" resource) or "),s("code",[e._v("text/plain")]),e._v(" (Prometheus)")])])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[56],{480:function(e,t,s){"use strict";s.r(t);var a=s(62),i=Object(a.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:"metrics-api"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#metrics-api"}},[e._v("#")]),e._v(" Metrics API")]),e._v(" "),s("p",[e._v("This endpoint is currently "),s("RouterLink",{attrs:{to:"/specifications/text/0193-experimental-features.html"}},[e._v("experimental")]),e._v(".")],1),e._v(" "),s("p",[e._v("This means that it can break at any time between two minor versions as long as it is not stabilized.")]),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 metrics API endpoint with the exhaustive list of returned metrics.")]),e._v(" "),s("p",[e._v("The endpoint returns observability data to monitor a Meilisearch instance using "),s("a",{attrs:{href:"https://prometheus.io/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Prometheus"),s("OutboundLink")],1),e._v(".")]),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("Improve the capabilities of a Meilisearch instance regarding observability and ease its integration into monitoring stacks.")]),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-activating-the-feature"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-activating-the-feature"}},[e._v("#")]),e._v(" 3.1. Activating the feature")]),e._v(" "),s("p",[e._v("By default, the "),s("code",[e._v("/metrics")]),e._v(" endpoint is not accessible. To activate it, the "),s("code",[e._v("--experimental-enable-metrics")]),e._v(" CLI option or "),s("code",[e._v("MEILI_EXPERIMENTAL_ENABLE_METRICS")]),e._v(" env var must be specified at launch. See "),s("RouterLink",{attrs:{to:"/specifications/text/0119-instance-options.html"}},[e._v("Instance Options")])],1),e._v(" "),s("h3",{attrs:{id:"_3-2-metrics-api-resource-definition"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-metrics-api-resource-definition"}},[e._v("#")]),e._v(" 3.2. "),s("code",[e._v("metrics")]),e._v(" API resource definition")]),e._v(" "),s("p",[e._v("Prometheus metrics format is text-based and line-oriented. Lines are separated by a line feed character (n).")]),e._v(" "),s("p",[e._v("A metric is composed of several fields:")]),e._v(" "),s("ul",[s("li",[s("code",[e._v("# HELP")]),e._v(" metadata")]),e._v(" "),s("li",[s("code",[e._v("# TYPE")]),e._v(" metadata")]),e._v(" "),s("li",[e._v("Metric name")]),e._v(" "),s("li",[e._v("Current metric value")])]),e._v(" "),s("p",[e._v("Meilisearch returns the metrics specified in the table below.")]),e._v(" "),s("table",[s("thead",[s("tr",[s("th",[e._v("Name")]),e._v(" "),s("th",[e._v("Type")])])]),e._v(" "),s("tbody",[s("tr",[s("td",[s("a",{attrs:{href:"#321-meilisearch_http_requests_total"}},[s("code",[e._v("meilisearch_http_requests_total")])])]),e._v(" "),s("td",[e._v("counter")])]),e._v(" "),s("tr",[s("td",[s("a",{attrs:{href:"#322-meilisearch_http_response_time_seconds"}},[s("code",[e._v("meilisearch_http_response_time_seconds")])])]),e._v(" "),s("td",[e._v("histogram")])]),e._v(" "),s("tr",[s("td",[s("a",{attrs:{href:"#323-meilisearch_db_size_bytes"}},[s("code",[e._v("meilisearch_db_size_bytes")])])]),e._v(" "),s("td",[e._v("gauge")])]),e._v(" "),s("tr",[s("td",[s("a",{attrs:{href:"#324-meilisearch_used_db_size_bytes"}},[s("code",[e._v("meilisearch_used_db_size_bytes")])])]),e._v(" "),s("td",[e._v("gauge")])]),e._v(" "),s("tr",[s("td",[s("a",{attrs:{href:"#325-meilisearch_index_docs_count"}},[s("code",[e._v("meilisearch_index_docs_count")])])]),e._v(" "),s("td",[e._v("gauge")])]),e._v(" "),s("tr",[s("td",[s("a",{attrs:{href:"#326-meilisearch_index_count"}},[s("code",[e._v("meilisearch_index_count")])])]),e._v(" "),s("td",[e._v("gauge")])]),e._v(" "),s("tr",[s("td",[s("a",{attrs:{href:"#327-meilisearch_nb_tasks"}},[s("code",[e._v("meilisearch_nb_tasks")])])]),e._v(" "),s("td",[e._v("counter")])]),e._v(" "),s("tr",[s("td",[s("a",{attrs:{href:"#328-meilisearch_last_update"}},[s("code",[e._v("meilisearch_last_update")])])]),e._v(" "),s("td",[e._v("gauge")])]),e._v(" "),s("tr",[s("td",[s("a",{attrs:{href:"#329-meilisearch_is_indexing"}},[s("code",[e._v("meilisearch_is_indexing")])])]),e._v(" "),s("td",[e._v("gauge")])])])]),e._v(" "),s("h4",{attrs:{id:"_3-2-1-meilisearch-http-requests-total"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-meilisearch-http-requests-total"}},[e._v("#")]),e._v(" 3.2.1 "),s("code",[e._v("meilisearch_http_requests_total")])]),e._v(" "),s("p",[e._v("Returns the number of times an API resource is accessed.")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v('# HELP http_requests_total HTTP requests total\n# TYPE http_requests_total counter\nmeilisearch_http_requests_total{method=":httpMethod",path=":resourcePath"} :numberOfRequest\n')])])]),s("h4",{attrs:{id:"_3-2-2-meilisearch-http-response-time-seconds"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-2-meilisearch-http-response-time-seconds"}},[e._v("#")]),e._v(" 3.2.2. "),s("code",[e._v("meilisearch_http_response_time_seconds")])]),e._v(" "),s("p",[e._v("Returns a time histogram showing the number of times an API resource call goes into a time bucket (expressed in second).")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v('# HELP http_response_time_seconds HTTP response times\n# TYPE http_response_time_seconds histogram\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.0005"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.0008"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.00085"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.0009"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.00095"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.001"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.00105"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.0011"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.00115"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.0012"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.0015"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.002"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="0.003"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="1"} :numberOfRequest\nhttp_response_time_seconds_bucket{method=":httpMethod",path=":resourcePath",le="+Inf"} :numberOfRequest\nhttp_response_time_seconds_sum{method=":httpMethod",path=":resourcePath"} :numberOfRequest\nmeilisearch_http_response_time_seconds_count{method=":httpMethod",path=":resourcePath"} :numberOfRequest\n')])])]),s("h4",{attrs:{id:"_3-2-3-meilisearch-db-size-bytes"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-3-meilisearch-db-size-bytes"}},[e._v("#")]),e._v(" 3.2.3. "),s("code",[e._v("meilisearch_db_size_bytes")])]),e._v(" "),s("p",[e._v("Returns the “real” size of the database on disk in bytes.\nIt includes all the lmdb memory mapped files plus all the files contained in the "),s("code",[e._v("data.ms")]),e._v(" directory (mainly the updates files that were not processed yet).")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("# HELP meilisearch_db_size_bytes Meilisearch Db Size In Bytes\n# TYPE meilisearch_db_size_bytes gauge\nmeilisearch_db_size_bytes :databaseSizeInBytes\n")])])]),s("h4",{attrs:{id:"_3-2-4-meilisearch-used-db-size-bytes"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-4-meilisearch-used-db-size-bytes"}},[e._v("#")]),e._v(" 3.2.4. "),s("code",[e._v("meilisearch_used_db_size_bytes")])]),e._v(" "),s("p",[e._v("Returns the size of the database actually used by meilisearch in bytes.\nInclude all the same files as "),s("code",[e._v("meilisearch_db_size_bytes")]),e._v(" except that when it comes to an LMDB database, we only count the pages used by meilisearch.\nThis means if you see a large gap between both metrics, adding documents will probably re-use freed pages instead of growing "),s("code",[e._v("meilisearch_db_size_bytes")]),e._v(".")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("# HELP meilisearch_used_db_size_bytes Meilisearch Used DB Size In Bytes\n# TYPE meilisearch_used_db_size_bytes gauge\nmeilisearch_used_db_size_bytes :databaseSizeInBytes\n")])])]),s("h4",{attrs:{id:"_3-2-5-meilisearch-index-docs-count"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-5-meilisearch-index-docs-count"}},[e._v("#")]),e._v(" 3.2.5. "),s("code",[e._v("meilisearch_index_docs_count")])]),e._v(" "),s("p",[e._v("Returns the number of documents for an index.")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v('# HELP meilisearch_index_docs_count Meilisearch Index Docs Count\n# TYPE meilisearch_index_docs_count gauge\nmeilisearch_index_docs_count{index=":indexUid"} :numberOfDocuments\n')])])]),s("h4",{attrs:{id:"_3-2-6-meilisearch-index-count"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-6-meilisearch-index-count"}},[e._v("#")]),e._v(" 3.2.6. "),s("code",[e._v("meilisearch_index_count")])]),e._v(" "),s("p",[e._v("Returns the total number of indexes for the Meilisearch instance.")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("# HELP meilisearch_index_count Meilisearch Index Count\n# TYPE meilisearch_index_count gauge\nmeilisearch_index_count :numberOfIndex\n")])])]),s("h4",{attrs:{id:"_3-2-7-meilisearch-nb-tasks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-7-meilisearch-nb-tasks"}},[e._v("#")]),e._v(" 3.2.7. "),s("code",[e._v("meilisearch_nb_tasks")])]),e._v(" "),s("p",[e._v("Returns the total number of tasks for the Meilisearch instance parametrized by the kind of task and its value (see the table below).")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v('# HELP meilisearch_nb_tasks Meilisearch Number of tasks\n# TYPE meilisearch_nb_tasks gauge\nmeilisearch_nb_tasks{kind=":kind",value=":value"} :number\n')])])]),s("p",[e._v("Here is a list of available kind and associated values:")]),e._v(" "),s("table",[s("thead",[s("tr",[s("th",[e._v("Kind")]),e._v(" "),s("th",[e._v("values")])])]),e._v(" "),s("tbody",[s("tr",[s("td",[e._v("indexes")]),e._v(" "),s("td",[e._v("Any created indexes")])]),e._v(" "),s("tr",[s("td",[e._v("statuses")]),e._v(" "),s("td",[e._v("Any task statuses (i.e.: succeeded, failed, enqueued, etc...)")])]),e._v(" "),s("tr",[s("td",[e._v("types")]),e._v(" "),s("td",[e._v("Any task types (i.e.: documentAdditionOrUpdate, settingsUpdate, etc...)")])])])]),e._v(" "),s("h4",{attrs:{id:"_3-2-8-meilisearch-last-update"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-8-meilisearch-last-update"}},[e._v("#")]),e._v(" 3.2.8. "),s("code",[e._v("meilisearch_last_update")])]),e._v(" "),s("p",[e._v("Returns the timestamp of the last update.")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("# HELP meilisearch_last_update Meilisearch Last Update\n# TYPE meilisearch_last_update gauge\nmeilisearch_last_update :unixTimestamp\n")])])]),s("h4",{attrs:{id:"_3-2-8-meilisearch-is-indexing"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-8-meilisearch-is-indexing"}},[e._v("#")]),e._v(" 3.2.8. "),s("code",[e._v("meilisearch_is_indexing")])]),e._v(" "),s("p",[e._v("Returns "),s("code",[e._v("1")]),e._v(" if Meilisearch is indexing or "),s("code",[e._v("0")]),e._v(" if not.")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("# HELP meilisearch_is_indexing Meilisearch Is Indexing\n# TYPE meilisearch_is_indexing gauge\nmeilisearch_is_indexing :isIndexing\n")])])]),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("h4",{attrs:{id:"_3-3-1-get-metrics"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-get-metrics"}},[e._v("#")]),e._v(" 3.3.1. "),s("code",[e._v("GET")]),e._v(" - "),s("code",[e._v("/metrics")])]),e._v(" "),s("p",[e._v("Fetch the metrics of the Meilisearch instance.")]),e._v(" "),s("p",[s("code",[e._v("200")]),e._v(" - Response body example")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v('# HELP meilisearch_database_size MeiliSearch Stats DbSize\n# TYPE meilisearch_database_size gauge\nmeilisearch_database_size 1097728\n# HELP meilisearch_docs_count MeiliSearch Stats Docs Count\n# TYPE meilisearch_docs_count gauge\nmeilisearch_docs_count{index="movies"} 807\nmeilisearch_docs_count{index="movies_2"} 0\n# HELP meilisearch_total_index MeiliSearch Stats Index Count\n# TYPE meilisearch_total_index gauge\nmeilisearch_total_index 2\n')])])]),s("h4",{attrs:{id:"_3-3-2-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-errors"}},[e._v("#")]),e._v(" 3.3.2. Errors")]),e._v(" "),s("ul",[s("li",[e._v("🔴 If "),s("code",[e._v("--experimental-enable-metrics")]),e._v(" CLI option / "),s("code",[e._v("MEILI_EXPERIMENTAL_ENABLE_METRICS")]),e._v(" env var is not specified at launch, the API returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#feature-not-enabled"}},[e._v("feature_not_enabled")]),e._v(" error.")],1)]),e._v(" "),s("h5",{attrs:{id:"_3-3-2-1-auth-errors"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-1-auth-errors"}},[e._v("#")]),e._v(" 3.3.2.1 Auth Errors")]),e._v(" "),s("p",[e._v("If a master key is used to secure a Meilisearch instance, the auth layer returns the following errors:")]),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 the permission "),s("code",[e._v("metrics.get")]),e._v(" (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("li",[e._v("🔴 Accessing this route with a key that has a restriction on the indexes 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("p",[e._v("N/A")]),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("Merge "),s("code",[e._v("/stats")]),e._v(" with "),s("code",[e._v("/metrics")]),e._v(". A header could specify the preferred format. e.g "),s("code",[e._v("application/json")]),e._v(" (similar to actual "),s("code",[e._v("stats")]),e._v(" resource) or "),s("code",[e._v("text/plain")]),e._v(" (Prometheus)")])])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/57.8d52478a.js b/docs/assets/js/57.ab2e1909.js similarity index 98% rename from docs/assets/js/57.8d52478a.js rename to docs/assets/js/57.ab2e1909.js index 9cd4aae1f..f0f7275d3 100644 --- a/docs/assets/js/57.8d52478a.js +++ b/docs/assets/js/57.ab2e1909.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[57],{481:function(e,t,s){"use strict";s.r(t);var a=s(62),r=Object(a.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:"compression-headers"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#compression-headers"}},[e._v("#")]),e._v(" Compression Headers")]),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("Send and receive compressed payload, using the "),s("code",[e._v("Accept-Encoding")]),e._v(" and "),s("code",[e._v("Content-Encoding")]),e._v(" HTTP headers.")]),e._v(" "),s("p",[e._v("Meilisearch supports "),s("code",[e._v("gzip")]),e._v(", "),s("code",[e._v("deflate")]),e._v(" and "),s("code",[e._v("brotli")]),e._v(" compression methods.")]),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("Compression HTTP headers can be used to improve transfer speed and to reduce bandwidth consumption by sending/receiving compressed, smaller payload.")]),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-supported-compression-algorithms"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-supported-compression-algorithms"}},[e._v("#")]),e._v(" 3.1. Supported Compression Algorithms")]),e._v(" "),s("table",[s("thead",[s("tr",[s("th",[e._v("name")])])]),e._v(" "),s("tbody",[s("tr",[s("td",[s("code",[e._v("gzip")])])]),e._v(" "),s("tr",[s("td",[s("code",[e._v("br")]),e._v(" (refers to brotli)")])]),e._v(" "),s("tr",[s("td",[s("code",[e._v("deflate")])])])])]),e._v(" "),s("h3",{attrs:{id:"_3-2-sending-a-compressed-payload"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-sending-a-compressed-payload"}},[e._v("#")]),e._v(" 3.2. Sending a compressed payload")]),e._v(" "),s("p",[e._v("Specify the algorithm used to compress the payload being sent to Meilisearch within the "),s("code",[e._v("Content-Encoding")]),e._v(" header.")]),e._v(" "),s("p",[e._v("See "),s("a",{attrs:{href:"https://httpwg.org/specs/rfc9110.html#field.content-encoding",target:"_blank",rel:"noopener noreferrer"}},[e._v("RFC9110"),s("OutboundLink")],1),e._v(".")]),e._v(" "),s("h4",{attrs:{id:"_3-2-1-example-with-gzip"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-example-with-gzip"}},[e._v("#")]),e._v(" 3.2.1 Example with "),s("code",[e._v("gzip")])]),e._v(" "),s("p",[s("code",[e._v("cat ~/movies.json | gzip | curl -X POST 'http://localhost:7700/indexes/movies/documents' --data-binary @- -H 'Content-Type: application/json' -H 'Content-Encoding: gzip'")])]),e._v(" "),s("h3",{attrs:{id:"_3-3-receiving-a-compressed-response"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-receiving-a-compressed-response"}},[e._v("#")]),e._v(" 3.3. Receiving a compressed response")]),e._v(" "),s("p",[e._v("Specify to Meilisearch the compression methods to use by order of preference when sending a response to a client within the "),s("code",[e._v("Accept-Encoding")]),e._v(" header.")]),e._v(" "),s("p",[e._v("See "),s("a",{attrs:{href:"https://httpwg.org/specs/rfc9110.html#field.accept-encoding",target:"_blank",rel:"noopener noreferrer"}},[e._v("RFC9110"),s("OutboundLink")],1),e._v(".")]),e._v(" "),s("h4",{attrs:{id:"_3-3-1-example-with-gzip"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-example-with-gzip"}},[e._v("#")]),e._v(" 3.3.1. Example with "),s("code",[e._v("gzip")])]),e._v(" "),s("p",[s("code",[e._v("curl -sH 'Accept-encoding: gzip' 'http://localhost:7700/indexes/movies/search' | gunzip -")])]),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("p",[e._v("N/A")]),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("Support "),s("code",[e._v("zstd")]),e._v(" compression method.")])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[57],{482:function(e,t,s){"use strict";s.r(t);var a=s(62),r=Object(a.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:"compression-headers"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#compression-headers"}},[e._v("#")]),e._v(" Compression Headers")]),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("Send and receive compressed payload, using the "),s("code",[e._v("Accept-Encoding")]),e._v(" and "),s("code",[e._v("Content-Encoding")]),e._v(" HTTP headers.")]),e._v(" "),s("p",[e._v("Meilisearch supports "),s("code",[e._v("gzip")]),e._v(", "),s("code",[e._v("deflate")]),e._v(" and "),s("code",[e._v("brotli")]),e._v(" compression methods.")]),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("Compression HTTP headers can be used to improve transfer speed and to reduce bandwidth consumption by sending/receiving compressed, smaller payload.")]),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-supported-compression-algorithms"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-supported-compression-algorithms"}},[e._v("#")]),e._v(" 3.1. Supported Compression Algorithms")]),e._v(" "),s("table",[s("thead",[s("tr",[s("th",[e._v("name")])])]),e._v(" "),s("tbody",[s("tr",[s("td",[s("code",[e._v("gzip")])])]),e._v(" "),s("tr",[s("td",[s("code",[e._v("br")]),e._v(" (refers to brotli)")])]),e._v(" "),s("tr",[s("td",[s("code",[e._v("deflate")])])])])]),e._v(" "),s("h3",{attrs:{id:"_3-2-sending-a-compressed-payload"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-sending-a-compressed-payload"}},[e._v("#")]),e._v(" 3.2. Sending a compressed payload")]),e._v(" "),s("p",[e._v("Specify the algorithm used to compress the payload being sent to Meilisearch within the "),s("code",[e._v("Content-Encoding")]),e._v(" header.")]),e._v(" "),s("p",[e._v("See "),s("a",{attrs:{href:"https://httpwg.org/specs/rfc9110.html#field.content-encoding",target:"_blank",rel:"noopener noreferrer"}},[e._v("RFC9110"),s("OutboundLink")],1),e._v(".")]),e._v(" "),s("h4",{attrs:{id:"_3-2-1-example-with-gzip"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-example-with-gzip"}},[e._v("#")]),e._v(" 3.2.1 Example with "),s("code",[e._v("gzip")])]),e._v(" "),s("p",[s("code",[e._v("cat ~/movies.json | gzip | curl -X POST 'http://localhost:7700/indexes/movies/documents' --data-binary @- -H 'Content-Type: application/json' -H 'Content-Encoding: gzip'")])]),e._v(" "),s("h3",{attrs:{id:"_3-3-receiving-a-compressed-response"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-receiving-a-compressed-response"}},[e._v("#")]),e._v(" 3.3. Receiving a compressed response")]),e._v(" "),s("p",[e._v("Specify to Meilisearch the compression methods to use by order of preference when sending a response to a client within the "),s("code",[e._v("Accept-Encoding")]),e._v(" header.")]),e._v(" "),s("p",[e._v("See "),s("a",{attrs:{href:"https://httpwg.org/specs/rfc9110.html#field.accept-encoding",target:"_blank",rel:"noopener noreferrer"}},[e._v("RFC9110"),s("OutboundLink")],1),e._v(".")]),e._v(" "),s("h4",{attrs:{id:"_3-3-1-example-with-gzip"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-example-with-gzip"}},[e._v("#")]),e._v(" 3.3.1. Example with "),s("code",[e._v("gzip")])]),e._v(" "),s("p",[s("code",[e._v("curl -sH 'Accept-encoding: gzip' 'http://localhost:7700/indexes/movies/search' | gunzip -")])]),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("p",[e._v("N/A")]),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("Support "),s("code",[e._v("zstd")]),e._v(" compression method.")])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/58.ad106d10.js b/docs/assets/js/58.b103820c.js similarity index 99% rename from docs/assets/js/58.ad106d10.js rename to docs/assets/js/58.b103820c.js index af3336b35..8abfa28bb 100644 --- a/docs/assets/js/58.ad106d10.js +++ b/docs/assets/js/58.b103820c.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[58],{480:function(t,e,a){"use strict";a.r(e);var n=a(62),s=Object(n.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:"configuration-file"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#configuration-file"}},[t._v("#")]),t._v(" Configuration File")]),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("Meilisearch options can be defined in a "),a("code",[t._v(".toml")]),t._v(" configuration file being loaded at launch.")]),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("Teams can easily version, track, and share configuration files. It makes it easier to learn about the different options available and to define at a glance how Meilisearch is configured.")]),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-supported-formats"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-supported-formats"}},[t._v("#")]),t._v(" 3.1. Supported Formats")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Format")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[a("code",[t._v(".toml")])])])])]),t._v(" "),a("h3",{attrs:{id:"_3-2-priority-order"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-priority-order"}},[t._v("#")]),t._v(" 3.2. Priority Order")]),t._v(" "),a("p",[a("code",[t._v("Configuration file < Env variables < Command-line options")])]),t._v(" "),a("p",[t._v("It means the options in the configuration file are overwritten by the environment variables set (if they exist) and that can be themself overwritten by the command-line options (if they exist).")]),t._v(" "),a("h3",{attrs:{id:"_3-3-default-configuration-file"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-default-configuration-file"}},[t._v("#")]),t._v(" 3.3. Default Configuration File")]),t._v(" "),a("p",[t._v("By default, Meilisearch will try to read the "),a("code",[t._v("./config.toml")]),t._v(" in the current working directory.")]),t._v(" "),a("p",[t._v("We provide a default configuration file as an example "),a("a",{attrs:{href:"https://github.com/meilisearch/meilisearch/blob/main/config.toml",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h3",{attrs:{id:"_3-4-config-file-path-meili-config-file-path"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-config-file-path-meili-config-file-path"}},[t._v("#")]),t._v(" 3.4. "),a("code",[t._v("--config-file-path")]),t._v("/"),a("code",[t._v("MEILI_CONFIG_FILE_PATH")])]),t._v(" "),a("p",[t._v("It is possible to override the default configuration file by setting the "),a("code",[t._v("MEILI_CONFIG_FILE_PATH")]),t._v(" environment variable or by specifying the "),a("code",[t._v("--config-file-path")]),t._v(" option.")]),t._v(" "),a("h3",{attrs:{id:"_3-5-configuration-file-content-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-5-configuration-file-content-definition"}},[t._v("#")]),t._v(" 3.5. Configuration File Content Definition")]),t._v(" "),a("p",[t._v("The current consistency rule is that all environment variables and launch options are configurable by a dedicated key in the configuration file.")]),t._v(" "),a("p",[t._v("Configuration keys are named following the "),a("code",[t._v("snake_case")]),t._v(" convention from the name of a CLI option. That is, "),a("code",[t._v("--import-dump")]),t._v(" must be named "),a("code",[t._v("import_dump")]),t._v(" within the configuration file.")]),t._v(" "),a("p",[t._v("There is an exception rule. The "),a("code",[t._v("config_file_path")]),t._v(" key is not accepted in the configuration file and stops Meilisearch from being launched if specified.")]),t._v(" "),a("p",[t._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0119-instance-options.html"}},[t._v("Instance Options")]),t._v(" for more details.")],1),t._v(" "),a("h3",{attrs:{id:"_3-6-indication-of-the-loaded-configuration-file"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-6-indication-of-the-loaded-configuration-file"}},[t._v("#")]),t._v(" 3.6. Indication of the loaded configuration file")]),t._v(" "),a("p",[t._v("When Meilisearch is launched, the loaded configuration file is indicated by the "),a("code",[t._v("Config file path")]),t._v(" key on stdout.")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("888b d888 d8b "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" d8b "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v("\n8888b d8888 Y8P "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" Y8P "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v("\n88888b.d88888 "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v("\n888Y88888P888 .d88b. "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" .d8888b .d88b. 8888b. 888d888 .d8888b 88888b.\n"),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" Y888P "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" d8P Y8b "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" 88K d8P Y8b "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"88b 888P"')]),t._v(" d88P"),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('" 888 "')]),t._v("88b\n"),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" Y8P "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("88888888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Y8888b. 88888888 .d888888 888 888 888 888\n888 "')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" Y8b. "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" X88 Y8b. "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" Y88b. "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Y8888 888 888 888 88888P\' "')]),t._v("Y8888 "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Y888888 888 "')]),t._v("Y8888P "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v("\n\nConfig "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("file")]),t._v(" path: "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./config.toml"')]),t._v("\n")])])]),a("p",[t._v("If Meilisearch can't find the default "),a("code",[t._v("config.toml")]),t._v(" or if no other config file is specified with "),a("code",[t._v("MEILI_CONFIG_FILE_PATH")]),t._v(" env var or "),a("code",[t._v("--config-file-path")]),t._v(" options, "),a("code",[t._v("none")]),t._v(" is indicated.")]),t._v(" "),a("h3",{attrs:{id:"_3-7-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-7-errors"}},[t._v("#")]),t._v(" 3.7. Errors")]),t._v(" "),a("h4",{attrs:{id:"_3-7-1-defining-config-file-path-in-the-configuration-file"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-7-1-defining-config-file-path-in-the-configuration-file"}},[t._v("#")]),t._v(" 3.7.1. Defining "),a("code",[t._v("config_file_path")]),t._v(" in the configuration file")]),t._v(" "),a("p",[t._v("Defining "),a("code",[t._v("config_file_path")]),t._v(" in the configuration file is not valid and Meilisearch returns an error.")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("Error: "),a("span",{pre:!0,attrs:{class:"token variable"}},[a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("`")]),t._v("config_file_path"),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("`")])]),t._v(" is not supported "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" configuration file.\n")])])]),a("h4",{attrs:{id:"_3-7-2-defining-a-non-existent-config-file"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-7-2-defining-a-non-existent-config-file"}},[t._v("#")]),t._v(" 3.7.2. Defining a non-existent config file.")]),t._v(" "),a("p",[t._v("Defining a configuration file other than the default file that does not exist returns an error when launching Meilisearch.")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("Error: unable to "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("open")]),t._v(" or "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("read")]),t._v(" the "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"XXX"')]),t._v(" configuration file: No such "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("file")]),t._v(" or directory "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("os error "),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("h4",{attrs:{id:"_3-7-3-defining-a-config-file-with-a-syntax-error"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-7-3-defining-a-config-file-with-a-syntax-error"}},[t._v("#")]),t._v(" 3.7.3. Defining a config file with a syntax error.")]),t._v(" "),a("p",[t._v("Defining a configuration file wrongly formatted or containing an invalid configuration key returns an error when launching Meilisearch.")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("Error: unknown field "),a("span",{pre:!0,attrs:{class:"token variable"}},[a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("`")]),t._v("XXX"),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("`")])]),t._v(" at line Y "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("column")]),t._v(" Z\n")])])]),a("h2",{attrs:{id:"_4-technical-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[t._v("#")]),t._v(" 4. Technical Details")]),t._v(" "),a("p",[t._v("N/A")]),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("Better indicate a syntax error")]),t._v(" "),a("li",[t._v("List all loaded configuration at launch on the stdout")]),t._v(" "),a("li",[t._v("Introduce toml sections to group options under a common name. e.g. A dump section could contain a "),a("code",[t._v("schedule")]),t._v(", "),a("code",[t._v("dir")]),t._v(", "),a("code",[t._v("interval-sec")]),t._v(" and "),a("code",[t._v("enable")]),t._v(". That could help navigate the toml.")]),t._v(" "),a("li",[t._v("Introduce other formats")])])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[58],{481:function(t,e,a){"use strict";a.r(e);var n=a(62),s=Object(n.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:"configuration-file"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#configuration-file"}},[t._v("#")]),t._v(" Configuration File")]),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("Meilisearch options can be defined in a "),a("code",[t._v(".toml")]),t._v(" configuration file being loaded at launch.")]),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("Teams can easily version, track, and share configuration files. It makes it easier to learn about the different options available and to define at a glance how Meilisearch is configured.")]),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-supported-formats"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-supported-formats"}},[t._v("#")]),t._v(" 3.1. Supported Formats")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Format")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[a("code",[t._v(".toml")])])])])]),t._v(" "),a("h3",{attrs:{id:"_3-2-priority-order"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-priority-order"}},[t._v("#")]),t._v(" 3.2. Priority Order")]),t._v(" "),a("p",[a("code",[t._v("Configuration file < Env variables < Command-line options")])]),t._v(" "),a("p",[t._v("It means the options in the configuration file are overwritten by the environment variables set (if they exist) and that can be themself overwritten by the command-line options (if they exist).")]),t._v(" "),a("h3",{attrs:{id:"_3-3-default-configuration-file"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-default-configuration-file"}},[t._v("#")]),t._v(" 3.3. Default Configuration File")]),t._v(" "),a("p",[t._v("By default, Meilisearch will try to read the "),a("code",[t._v("./config.toml")]),t._v(" in the current working directory.")]),t._v(" "),a("p",[t._v("We provide a default configuration file as an example "),a("a",{attrs:{href:"https://github.com/meilisearch/meilisearch/blob/main/config.toml",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h3",{attrs:{id:"_3-4-config-file-path-meili-config-file-path"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-config-file-path-meili-config-file-path"}},[t._v("#")]),t._v(" 3.4. "),a("code",[t._v("--config-file-path")]),t._v("/"),a("code",[t._v("MEILI_CONFIG_FILE_PATH")])]),t._v(" "),a("p",[t._v("It is possible to override the default configuration file by setting the "),a("code",[t._v("MEILI_CONFIG_FILE_PATH")]),t._v(" environment variable or by specifying the "),a("code",[t._v("--config-file-path")]),t._v(" option.")]),t._v(" "),a("h3",{attrs:{id:"_3-5-configuration-file-content-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-5-configuration-file-content-definition"}},[t._v("#")]),t._v(" 3.5. Configuration File Content Definition")]),t._v(" "),a("p",[t._v("The current consistency rule is that all environment variables and launch options are configurable by a dedicated key in the configuration file.")]),t._v(" "),a("p",[t._v("Configuration keys are named following the "),a("code",[t._v("snake_case")]),t._v(" convention from the name of a CLI option. That is, "),a("code",[t._v("--import-dump")]),t._v(" must be named "),a("code",[t._v("import_dump")]),t._v(" within the configuration file.")]),t._v(" "),a("p",[t._v("There is an exception rule. The "),a("code",[t._v("config_file_path")]),t._v(" key is not accepted in the configuration file and stops Meilisearch from being launched if specified.")]),t._v(" "),a("p",[t._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0119-instance-options.html"}},[t._v("Instance Options")]),t._v(" for more details.")],1),t._v(" "),a("h3",{attrs:{id:"_3-6-indication-of-the-loaded-configuration-file"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-6-indication-of-the-loaded-configuration-file"}},[t._v("#")]),t._v(" 3.6. Indication of the loaded configuration file")]),t._v(" "),a("p",[t._v("When Meilisearch is launched, the loaded configuration file is indicated by the "),a("code",[t._v("Config file path")]),t._v(" key on stdout.")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("888b d888 d8b "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" d8b "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v("\n8888b d8888 Y8P "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" Y8P "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v("\n88888b.d88888 "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v("\n888Y88888P888 .d88b. "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" .d8888b .d88b. 8888b. 888d888 .d8888b 88888b.\n"),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" Y888P "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" d8P Y8b "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" 88K d8P Y8b "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"88b 888P"')]),t._v(" d88P"),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('" 888 "')]),t._v("88b\n"),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" Y8P "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("88888888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Y8888b. 88888888 .d888888 888 888 888 888\n888 "')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" Y8b. "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" X88 Y8b. "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" Y88b. "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Y8888 888 888 888 88888P\' "')]),t._v("Y8888 "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Y888888 888 "')]),t._v("Y8888P "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("888")]),t._v("\n\nConfig "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("file")]),t._v(" path: "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./config.toml"')]),t._v("\n")])])]),a("p",[t._v("If Meilisearch can't find the default "),a("code",[t._v("config.toml")]),t._v(" or if no other config file is specified with "),a("code",[t._v("MEILI_CONFIG_FILE_PATH")]),t._v(" env var or "),a("code",[t._v("--config-file-path")]),t._v(" options, "),a("code",[t._v("none")]),t._v(" is indicated.")]),t._v(" "),a("h3",{attrs:{id:"_3-7-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-7-errors"}},[t._v("#")]),t._v(" 3.7. Errors")]),t._v(" "),a("h4",{attrs:{id:"_3-7-1-defining-config-file-path-in-the-configuration-file"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-7-1-defining-config-file-path-in-the-configuration-file"}},[t._v("#")]),t._v(" 3.7.1. Defining "),a("code",[t._v("config_file_path")]),t._v(" in the configuration file")]),t._v(" "),a("p",[t._v("Defining "),a("code",[t._v("config_file_path")]),t._v(" in the configuration file is not valid and Meilisearch returns an error.")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("Error: "),a("span",{pre:!0,attrs:{class:"token variable"}},[a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("`")]),t._v("config_file_path"),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("`")])]),t._v(" is not supported "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" configuration file.\n")])])]),a("h4",{attrs:{id:"_3-7-2-defining-a-non-existent-config-file"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-7-2-defining-a-non-existent-config-file"}},[t._v("#")]),t._v(" 3.7.2. Defining a non-existent config file.")]),t._v(" "),a("p",[t._v("Defining a configuration file other than the default file that does not exist returns an error when launching Meilisearch.")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("Error: unable to "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("open")]),t._v(" or "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("read")]),t._v(" the "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"XXX"')]),t._v(" configuration file: No such "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("file")]),t._v(" or directory "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("os error "),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("h4",{attrs:{id:"_3-7-3-defining-a-config-file-with-a-syntax-error"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-7-3-defining-a-config-file-with-a-syntax-error"}},[t._v("#")]),t._v(" 3.7.3. Defining a config file with a syntax error.")]),t._v(" "),a("p",[t._v("Defining a configuration file wrongly formatted or containing an invalid configuration key returns an error when launching Meilisearch.")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("Error: unknown field "),a("span",{pre:!0,attrs:{class:"token variable"}},[a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("`")]),t._v("XXX"),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("`")])]),t._v(" at line Y "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("column")]),t._v(" Z\n")])])]),a("h2",{attrs:{id:"_4-technical-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[t._v("#")]),t._v(" 4. Technical Details")]),t._v(" "),a("p",[t._v("N/A")]),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("Better indicate a syntax error")]),t._v(" "),a("li",[t._v("List all loaded configuration at launch on the stdout")]),t._v(" "),a("li",[t._v("Introduce toml sections to group options under a common name. e.g. A dump section could contain a "),a("code",[t._v("schedule")]),t._v(", "),a("code",[t._v("dir")]),t._v(", "),a("code",[t._v("interval-sec")]),t._v(" and "),a("code",[t._v("enable")]),t._v(". That could help navigate the toml.")]),t._v(" "),a("li",[t._v("Introduce other formats")])])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/59.4fac32dd.js b/docs/assets/js/59.a3757b9e.js similarity index 99% rename from docs/assets/js/59.4fac32dd.js rename to docs/assets/js/59.a3757b9e.js index 38bfbae9e..2d79f3b8d 100644 --- a/docs/assets/js/59.4fac32dd.js +++ b/docs/assets/js/59.a3757b9e.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[59],{485:function(e,t,a){"use strict";a.r(t);var n=a(62),s=Object(n.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"swap-indexes-api"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#swap-indexes-api"}},[e._v("#")]),e._v(" Swap Indexes API")]),e._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("The swap indexes API allows to atomically deploy several new versions of indexes without any downtime for the search clients.")]),e._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[e._v("It's critical to deploy a new version of an index without any downtimes to the search clients. This capability improves the development experience by allowing Meilisearch to better fit into their workflow.")]),e._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("h3",{attrs:{id:"_3-1-0-downtime-deployment-workflow"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-0-downtime-deployment-workflow"}},[e._v("#")]),e._v(" 3.1. 0 downtime deployment workflow")]),e._v(" "),a("p",[e._v("A 0 downtime deployment looks like this:")]),e._v(" "),a("ol",[a("li",[e._v("Search clients search on "),a("code",[e._v("indexA")]),e._v(".")]),e._v(" "),a("li",[e._v("The developer builds a new index "),a("code",[e._v("indexB")]),e._v(" representing the new index version to deploy to the search clients.")]),e._v(" "),a("li",[e._v("When "),a("code",[e._v("indexB")]),e._v(" is built and ready to be deployed, the developer sends an indexes swap request to Meilisearch for "),a("code",[e._v("indexA")]),e._v(" and "),a("code",[e._v("indexB")]),e._v(".")]),e._v(" "),a("li",[a("code",[e._v("indexB")]),e._v(" documents, settings and tasks are swapped with "),a("code",[e._v("indexA")]),e._v(".")]),e._v(" "),a("li",[e._v("Search clients search on the updated "),a("code",[e._v("indexA")]),e._v(" without experiencing any downtime.")])]),e._v(" "),a("h3",{attrs:{id:"_3-2-deploying-multiple-new-indexes-versions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-deploying-multiple-new-indexes-versions"}},[e._v("#")]),e._v(" 3.2. Deploying Multiple New Indexes Versions")]),e._v(" "),a("p",[e._v("The swap API supports multiple swap operations in an atomic fashion.")]),e._v(" "),a("p",[e._v("This means that for a search experience built using multiple indexes, Meilisearch is able to deploy all changes at once and thus clients will access the new version of all indexes at once without any downtime.")]),e._v(" "),a("p",[e._v("There is no need to deploy each new version of indexes one by one.")]),e._v(" "),a("h3",{attrs:{id:"_3-3-enqueued-tasks-after-a-swap-operation-creation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-enqueued-tasks-after-a-swap-operation-creation"}},[e._v("#")]),e._v(" 3.3. Enqueued Tasks After A Swap Operation Creation")]),e._v(" "),a("p",[e._v("Tasks enqueued after an "),a("code",[e._v("indexSwap")]),e._v(" task creation date do not have their "),a("code",[e._v("indexUid")]),e._v(" modified when the "),a("code",[e._v("indexSwap")]),e._v(" will succeed. That is, if they are enqueued on "),a("code",[e._v("indexA")]),e._v(", they will run on the new version of "),a("code",[e._v("indexA")]),e._v(".")]),e._v(" "),a("h3",{attrs:{id:"_3-4-api-endpoints-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.4. API Endpoints Definition")]),e._v(" "),a("h4",{attrs:{id:"_3-4-1-post-swap-indexes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-post-swap-indexes"}},[e._v("#")]),e._v(" 3.4.1. "),a("code",[e._v("POST")]),e._v(" - "),a("code",[e._v("/swap-indexes")])]),e._v(" "),a("p",[e._v("Send one or many indexes swap operation at once.")]),e._v(" "),a("h5",{attrs:{id:"_3-4-1-1-payload-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-1-payload-definition"}},[e._v("#")]),e._v(" 3.4.1.1. Payload definition")]),e._v(" "),a("p",[e._v("The payload body expects an array of JSON objects representing swap operations.")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"indexes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"indexA"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"indexA_new"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"indexes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"indexB"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"indexB_new"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),a("p",[e._v("💡 In the given example, two swap operations will occur at the same time and atomically.")]),e._v(" "),a("p",[a("code",[e._v("indexA")]),e._v(" data will be swapped with "),a("code",[e._v("indexA_new")]),e._v(" data while "),a("code",[e._v("indexB")]),e._v(" data will be swapped with "),a("code",[e._v("indexB_new")]),e._v(" data.")]),e._v(" "),a("blockquote",[a("p",[e._v("Sending "),a("code",[e._v("[]")]),e._v(" is considered valid. No swap transactions will be performed.")])]),e._v(" "),a("h6",{attrs:{id:"swap-object-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#swap-object-definition"}},[e._v("#")]),e._v(" Swap Object Definition")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Field")]),e._v(" "),a("th",[e._v("Type")]),e._v(" "),a("th",[e._v("Required")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("a",{attrs:{href:"#33111-indexes"}},[e._v("indexes")])]),e._v(" "),a("td",[e._v("Array of string representing indexUids")]),e._v(" "),a("td",[e._v("True")])])])]),e._v(" "),a("h6",{attrs:{id:"_3-4-1-1-1-indexes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-1-1-indexes"}},[e._v("#")]),e._v(" 3.4.1.1.1. "),a("code",[e._v("indexes")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Array of string")]),e._v(" "),a("li",[e._v("Required: True")])]),e._v(" "),a("p",[e._v("Determines which two indexes should exchange their data for their given swap object.")]),e._v(" "),a("h5",{attrs:{id:"_3-4-1-2-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-2-response-definition"}},[e._v("#")]),e._v(" 3.4.1.2. Response Definition")]),e._v(" "),a("p",[e._v("When the request is in a successful state, Meilisearch returns the HTTP code "),a("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"taskUid"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"indexUid"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[e._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"status"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"enqueued"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"indexSwap"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"enqueuedAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2021-08-12T10:00:00.000000Z"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("blockquote",[a("p",[e._v("An "),a("code",[e._v("indexSwap")]),e._v(" task is considered a global task; thus "),a("code",[e._v("indexUid")]),e._v(" is null.")])]),e._v(" "),a("p",[e._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),a("code",[e._v("task")]),e._v(" Object for "),a("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),a("h5",{attrs:{id:"_3-4-1-3-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-3-errors"}},[e._v("#")]),e._v(" 3.4.1.3. Errors")]),e._v(" "),a("h6",{attrs:{id:"_3-4-1-3-1-synchronous-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-3-1-synchronous-errors"}},[e._v("#")]),e._v(" 3.4.1.3.1. Synchronous Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 If the instance is secured by a master key, accessing this route without the "),a("code",[e._v("Authorization")]),e._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 If the instance is secured by a master key, accessing this route with a key that does not have permissions (missing "),a("code",[e._v("indexes.swap")]),e._v(" action or having a value for the "),a("code",[e._v("indexes")]),e._v(" field of a swap operation not being defined in the API Key "),a("code",[e._v("indexes")]),e._v(" array) (i.e. other than the master key) returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Omitting Content-Type header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an empty Content-Type returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a different Content-Type than "),a("code",[e._v("application/json")]),e._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an empty payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid JSON payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Omitting the "),a("code",[e._v("indexes")]),e._v(" array in a swap payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_swap_indexes"}},[e._v("missing_swap_indexes")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an "),a("code",[e._v("indexes")]),e._v(" array containing an invalid index uid format returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_swap_indexes"}},[e._v("invalid_swap_indexes")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an "),a("code",[e._v("indexes")]),e._v(" array not containing "),a("strong",[e._v("exactly")]),e._v(" 2 indexUids for a swap operation object returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_swap_indexes"}},[e._v("invalid_swap_indexes")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an indexUid more than once in the request payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_swap_duplicate_index_found"}},[e._v("invalid_swap_duplicate_index_found")]),e._v(" error.")],1)]),e._v(" "),a("h6",{attrs:{id:"_3-4-1-3-2-asynchronous-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-3-2-asynchronous-errors"}},[e._v("#")]),e._v(" 3.4.1.3.2. Asynchronous Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Sending indexUids that do not exist within the "),a("code",[e._v("indexes")]),e._v(" field of a swap operation returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),a("h2",{attrs:{id:"_4-technical-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[e._v("#")]),e._v(" 4. Technical Details")]),e._v(" "),a("h3",{attrs:{id:"_4-1-swapping-data"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-swapping-data"}},[e._v("#")]),e._v(" 4.1. Swapping Data")]),e._v(" "),a("p",[e._v("When indexes are swapped their data is exchanged. It concerns:")]),e._v(" "),a("ul",[a("li",[e._v("The documents")]),e._v(" "),a("li",[e._v("The settings")]),e._v(" "),a("li",[e._v("The tasks history\n"),a("ul",[a("li",[e._v("An index swap between index_a and index_b will also replace every mention of index_a by index_b (and vice-versa) in the task history. Enqueued tasks are left unmodified.")])])])]),e._v(" "),a("h2",{attrs:{id:"_5-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),a("ul",[a("li",[e._v("Introduce a way to delete one of the swapped indexes when the swap operation occurs.")])])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[59],{483:function(e,t,a){"use strict";a.r(t);var n=a(62),s=Object(n.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"swap-indexes-api"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#swap-indexes-api"}},[e._v("#")]),e._v(" Swap Indexes API")]),e._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[e._v("#")]),e._v(" 1. Summary")]),e._v(" "),a("p",[e._v("The swap indexes API allows to atomically deploy several new versions of indexes without any downtime for the search clients.")]),e._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[e._v("#")]),e._v(" 2. Motivation")]),e._v(" "),a("p",[e._v("It's critical to deploy a new version of an index without any downtimes to the search clients. This capability improves the development experience by allowing Meilisearch to better fit into their workflow.")]),e._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[e._v("#")]),e._v(" 3. Functional Specification")]),e._v(" "),a("h3",{attrs:{id:"_3-1-0-downtime-deployment-workflow"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-0-downtime-deployment-workflow"}},[e._v("#")]),e._v(" 3.1. 0 downtime deployment workflow")]),e._v(" "),a("p",[e._v("A 0 downtime deployment looks like this:")]),e._v(" "),a("ol",[a("li",[e._v("Search clients search on "),a("code",[e._v("indexA")]),e._v(".")]),e._v(" "),a("li",[e._v("The developer builds a new index "),a("code",[e._v("indexB")]),e._v(" representing the new index version to deploy to the search clients.")]),e._v(" "),a("li",[e._v("When "),a("code",[e._v("indexB")]),e._v(" is built and ready to be deployed, the developer sends an indexes swap request to Meilisearch for "),a("code",[e._v("indexA")]),e._v(" and "),a("code",[e._v("indexB")]),e._v(".")]),e._v(" "),a("li",[a("code",[e._v("indexB")]),e._v(" documents, settings and tasks are swapped with "),a("code",[e._v("indexA")]),e._v(".")]),e._v(" "),a("li",[e._v("Search clients search on the updated "),a("code",[e._v("indexA")]),e._v(" without experiencing any downtime.")])]),e._v(" "),a("h3",{attrs:{id:"_3-2-deploying-multiple-new-indexes-versions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-deploying-multiple-new-indexes-versions"}},[e._v("#")]),e._v(" 3.2. Deploying Multiple New Indexes Versions")]),e._v(" "),a("p",[e._v("The swap API supports multiple swap operations in an atomic fashion.")]),e._v(" "),a("p",[e._v("This means that for a search experience built using multiple indexes, Meilisearch is able to deploy all changes at once and thus clients will access the new version of all indexes at once without any downtime.")]),e._v(" "),a("p",[e._v("There is no need to deploy each new version of indexes one by one.")]),e._v(" "),a("h3",{attrs:{id:"_3-3-enqueued-tasks-after-a-swap-operation-creation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-enqueued-tasks-after-a-swap-operation-creation"}},[e._v("#")]),e._v(" 3.3. Enqueued Tasks After A Swap Operation Creation")]),e._v(" "),a("p",[e._v("Tasks enqueued after an "),a("code",[e._v("indexSwap")]),e._v(" task creation date do not have their "),a("code",[e._v("indexUid")]),e._v(" modified when the "),a("code",[e._v("indexSwap")]),e._v(" will succeed. That is, if they are enqueued on "),a("code",[e._v("indexA")]),e._v(", they will run on the new version of "),a("code",[e._v("indexA")]),e._v(".")]),e._v(" "),a("h3",{attrs:{id:"_3-4-api-endpoints-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-api-endpoints-definition"}},[e._v("#")]),e._v(" 3.4. API Endpoints Definition")]),e._v(" "),a("h4",{attrs:{id:"_3-4-1-post-swap-indexes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-post-swap-indexes"}},[e._v("#")]),e._v(" 3.4.1. "),a("code",[e._v("POST")]),e._v(" - "),a("code",[e._v("/swap-indexes")])]),e._v(" "),a("p",[e._v("Send one or many indexes swap operation at once.")]),e._v(" "),a("h5",{attrs:{id:"_3-4-1-1-payload-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-1-payload-definition"}},[e._v("#")]),e._v(" 3.4.1.1. Payload definition")]),e._v(" "),a("p",[e._v("The payload body expects an array of JSON objects representing swap operations.")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"indexes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"indexA"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"indexA_new"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"indexes"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"indexB"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"indexB_new"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),a("p",[e._v("💡 In the given example, two swap operations will occur at the same time and atomically.")]),e._v(" "),a("p",[a("code",[e._v("indexA")]),e._v(" data will be swapped with "),a("code",[e._v("indexA_new")]),e._v(" data while "),a("code",[e._v("indexB")]),e._v(" data will be swapped with "),a("code",[e._v("indexB_new")]),e._v(" data.")]),e._v(" "),a("blockquote",[a("p",[e._v("Sending "),a("code",[e._v("[]")]),e._v(" is considered valid. No swap transactions will be performed.")])]),e._v(" "),a("h6",{attrs:{id:"swap-object-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#swap-object-definition"}},[e._v("#")]),e._v(" Swap Object Definition")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Field")]),e._v(" "),a("th",[e._v("Type")]),e._v(" "),a("th",[e._v("Required")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("a",{attrs:{href:"#33111-indexes"}},[e._v("indexes")])]),e._v(" "),a("td",[e._v("Array of string representing indexUids")]),e._v(" "),a("td",[e._v("True")])])])]),e._v(" "),a("h6",{attrs:{id:"_3-4-1-1-1-indexes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-1-1-indexes"}},[e._v("#")]),e._v(" 3.4.1.1.1. "),a("code",[e._v("indexes")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Array of string")]),e._v(" "),a("li",[e._v("Required: True")])]),e._v(" "),a("p",[e._v("Determines which two indexes should exchange their data for their given swap object.")]),e._v(" "),a("h5",{attrs:{id:"_3-4-1-2-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-2-response-definition"}},[e._v("#")]),e._v(" 3.4.1.2. Response Definition")]),e._v(" "),a("p",[e._v("When the request is in a successful state, Meilisearch returns the HTTP code "),a("code",[e._v("202 Accepted")]),e._v(". The response's content is the summarized representation of the received asynchronous task.")]),e._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"taskUid"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"indexUid"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token null keyword"}},[e._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"status"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"enqueued"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"indexSwap"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[e._v('"enqueuedAt"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"2021-08-12T10:00:00.000000Z"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),a("blockquote",[a("p",[e._v("An "),a("code",[e._v("indexSwap")]),e._v(" task is considered a global task; thus "),a("code",[e._v("indexUid")]),e._v(" is null.")])]),e._v(" "),a("p",[e._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[e._v("Summarized "),a("code",[e._v("task")]),e._v(" Object for "),a("code",[e._v("202 Accepted")])]),e._v(".")],1),e._v(" "),a("h5",{attrs:{id:"_3-4-1-3-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-3-errors"}},[e._v("#")]),e._v(" 3.4.1.3. Errors")]),e._v(" "),a("h6",{attrs:{id:"_3-4-1-3-1-synchronous-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-3-1-synchronous-errors"}},[e._v("#")]),e._v(" 3.4.1.3.1. Synchronous Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 If the instance is secured by a master key, accessing this route without the "),a("code",[e._v("Authorization")]),e._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[e._v("missing_authorization_header")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 If the instance is secured by a master key, accessing this route with a key that does not have permissions (missing "),a("code",[e._v("indexes.swap")]),e._v(" action or having a value for the "),a("code",[e._v("indexes")]),e._v(" field of a swap operation not being defined in the API Key "),a("code",[e._v("indexes")]),e._v(" array) (i.e. other than the master key) returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Omitting Content-Type header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[e._v("missing_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an empty Content-Type returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a different Content-Type than "),a("code",[e._v("application/json")]),e._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[e._v("invalid_content_type")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an empty payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[e._v("missing_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an invalid JSON payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[e._v("malformed_payload")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Omitting the "),a("code",[e._v("indexes")]),e._v(" array in a swap payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_swap_indexes"}},[e._v("missing_swap_indexes")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an "),a("code",[e._v("indexes")]),e._v(" array containing an invalid index uid format returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_swap_indexes"}},[e._v("invalid_swap_indexes")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an "),a("code",[e._v("indexes")]),e._v(" array not containing "),a("strong",[e._v("exactly")]),e._v(" 2 indexUids for a swap operation object returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_swap_indexes"}},[e._v("invalid_swap_indexes")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending an indexUid more than once in the request payload returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_swap_duplicate_index_found"}},[e._v("invalid_swap_duplicate_index_found")]),e._v(" error.")],1)]),e._v(" "),a("h6",{attrs:{id:"_3-4-1-3-2-asynchronous-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-4-1-3-2-asynchronous-errors"}},[e._v("#")]),e._v(" 3.4.1.3.2. Asynchronous Errors")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Sending indexUids that do not exist within the "),a("code",[e._v("indexes")]),e._v(" field of a swap operation returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[e._v("index_not_found")]),e._v(" error.")],1)]),e._v(" "),a("h2",{attrs:{id:"_4-technical-details"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-details"}},[e._v("#")]),e._v(" 4. Technical Details")]),e._v(" "),a("h3",{attrs:{id:"_4-1-swapping-data"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-swapping-data"}},[e._v("#")]),e._v(" 4.1. Swapping Data")]),e._v(" "),a("p",[e._v("When indexes are swapped their data is exchanged. It concerns:")]),e._v(" "),a("ul",[a("li",[e._v("The documents")]),e._v(" "),a("li",[e._v("The settings")]),e._v(" "),a("li",[e._v("The tasks history\n"),a("ul",[a("li",[e._v("An index swap between index_a and index_b will also replace every mention of index_a by index_b (and vice-versa) in the task history. Enqueued tasks are left unmodified.")])])])]),e._v(" "),a("h2",{attrs:{id:"_5-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[e._v("#")]),e._v(" 5. Future Possibilities")]),e._v(" "),a("ul",[a("li",[e._v("Introduce a way to delete one of the swapped indexes when the swap operation occurs.")])])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/60.5e7d293f.js b/docs/assets/js/60.df174b2b.js similarity index 99% rename from docs/assets/js/60.5e7d293f.js rename to docs/assets/js/60.df174b2b.js index 155bea465..dd48fad79 100644 --- a/docs/assets/js/60.5e7d293f.js +++ b/docs/assets/js/60.df174b2b.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[60],{483:function(t,e,s){"use strict";s.r(e);var a=s(62),r=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"multi-search-api"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#multi-search-api"}},[t._v("#")]),t._v(" Multi-search API")]),t._v(" "),s("h2",{attrs:{id:"_1-summary"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),s("p",[t._v("The multi-search endpoint performs multiple search queries on one or more indexes by bundling them into a single request.\nEach search query has its own results set.")]),t._v(" "),s("h2",{attrs:{id:"_2-motivation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),s("ul",[s("li",[t._v("Perform multiple queries in a single HTTP request")])]),t._v(" "),s("h2",{attrs:{id:"_3-functional-specification"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),s("p",[t._v("Meilisearch exposes 1 route to perform multi-search requests:")]),t._v(" "),s("ul",[s("li",[t._v("POST "),s("code",[t._v("/multi-search")])])]),t._v(" "),s("p",[t._v("If a master key is used to secure a Meilisearch instance, the auth layer returns the following errors:")]),t._v(" "),s("ul",[s("li",[t._v("🔴 Accessing these routes without the "),s("code",[t._v("Authorization")]),t._v(" header returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Accessing these routes with a key that does not have permissions (i.e. other than the master key) returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),s("p",[t._v("If any of the search queries fail to execute, the response returns the corresponding error instead of the array of results. If multiple queries fail, only the first encountered failure is returned.")]),t._v(" "),s("p",[s("code",[t._v("POST")]),t._v(" HTTP verb errors:")]),t._v(" "),s("ul",[s("li",[t._v("🔴 Omitting the Content-Type header returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[t._v("missing_content_type")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an empty Content-Type returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[t._v("invalid_content_type")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending a different Content-Type than "),s("code",[t._v("application/json")]),t._v(" returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[t._v("invalid_content_type")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an empty payload returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[t._v("missing_payload")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an invalid JSON payload returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[t._v("malformed_payload")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an inexistent "),s("code",[t._v("indexUid")]),t._v(" in a query object returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[t._v("index_not_found")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an invalid format for the "),s("code",[t._v("indexUid")]),t._v(" property in a query object returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[t._v("invalid_index_uid")]),t._v(" error.")],1)]),t._v(" "),s("h3",{attrs:{id:"_3-1-search-payload-parameters"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-search-payload-parameters"}},[t._v("#")]),t._v(" 3.1. Search Payload Parameters")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Field")]),t._v(" "),s("th",[t._v("Type")]),t._v(" "),s("th",[t._v("Required")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("a",{attrs:{href:"#311-queries"}},[s("code",[t._v("queries")])])]),t._v(" "),s("td",[t._v("Array of Objects")]),t._v(" "),s("td",[t._v("True")])])])]),t._v(" "),s("h4",{attrs:{id:"_3-1-1-queries"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-queries"}},[t._v("#")]),t._v(" 3.1.1. "),s("code",[t._v("queries")])]),t._v(" "),s("ul",[s("li",[t._v("Type: Object")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("The "),s("code",[t._v("queries")]),t._v(" object contains the list of search queries to perform.")]),t._v(" "),s("p",[t._v("Each element of this array is a JSON object with the required field "),s("code",[t._v("indexUid")]),t._v(", the uid of the index to be searched. Other fields of this object are optional, and identical to the ones in the "),s("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#31-search-payload-parameters"}},[t._v("existing search routes")]),t._v(" ("),s("code",[t._v("q")]),t._v(", "),s("code",[t._v("limit")]),t._v(", etc.).")],1),t._v(" "),s("h3",{attrs:{id:"_3-2-search-response-properties"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-search-response-properties"}},[t._v("#")]),t._v(" 3.2. Search Response Properties")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Field")]),t._v(" "),s("th",[t._v("Type")]),t._v(" "),s("th",[t._v("Required")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("a",{attrs:{href:"#321-results"}},[s("code",[t._v("results")])])]),t._v(" "),s("td",[t._v("Array[Object]")]),t._v(" "),s("td",[t._v("True")])])])]),t._v(" "),s("h4",{attrs:{id:"_3-2-1-results"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-results"}},[t._v("#")]),t._v(" 3.2.1. "),s("code",[t._v("results")])]),t._v(" "),s("ul",[s("li",[t._v("Type: Array[Objets]")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("Results of the search queries as an array of search results.")]),t._v(" "),s("p",[t._v("Each element in this array contains the results of the search queries in the same order they have been requested. Additionally to the "),s("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#31-formatting-search-results"}},[t._v("usual fields returned by a search result")]),t._v(", an "),s("code",[t._v("indexUid")]),t._v(" field is present with the index UID on which the search has been performed.")],1),t._v(" "),s("p",[t._v("example:")]),t._v(" "),s("p",[t._v("Search queries:")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"queries"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movie"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wonder"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"books"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"king"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Search results:")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"results"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movie"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wonderwoman"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// other search results fields: processingTimeMs, limit, ...")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"books"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"king kong theory"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// other search results fields: processingTimeMs, limit, ...")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("The other fields of an element from the "),s("code",[t._v("results")]),t._v(" array are identical to the fields of the "),s("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#31-formatting-search-results"}},[t._v("response from the other search routes")]),t._v(".")],1),t._v(" "),s("h2",{attrs:{id:"_2-technical-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-details"}},[t._v("#")]),t._v(" 2. Technical Details")]),t._v(" "),s("p",[t._v("n/a")]),t._v(" "),s("h2",{attrs:{id:"_3-future-possibilities"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[t._v("#")]),t._v(" 3. Future Possibilities")]),t._v(" "),s("ul",[s("li",[t._v("Allow specifying an index uid pattern instead of an index uid to produce searches on all indexes matching the pattern.")]),t._v(" "),s("li",[t._v("Allow additional arguments to the request specifying a strategy to aggregate results from the multiple searches.")])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[60],{484:function(t,e,s){"use strict";s.r(e);var a=s(62),r=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"multi-search-api"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#multi-search-api"}},[t._v("#")]),t._v(" Multi-search API")]),t._v(" "),s("h2",{attrs:{id:"_1-summary"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),s("p",[t._v("The multi-search endpoint performs multiple search queries on one or more indexes by bundling them into a single request.\nEach search query has its own results set.")]),t._v(" "),s("h2",{attrs:{id:"_2-motivation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),s("ul",[s("li",[t._v("Perform multiple queries in a single HTTP request")])]),t._v(" "),s("h2",{attrs:{id:"_3-functional-specification"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),s("p",[t._v("Meilisearch exposes 1 route to perform multi-search requests:")]),t._v(" "),s("ul",[s("li",[t._v("POST "),s("code",[t._v("/multi-search")])])]),t._v(" "),s("p",[t._v("If a master key is used to secure a Meilisearch instance, the auth layer returns the following errors:")]),t._v(" "),s("ul",[s("li",[t._v("🔴 Accessing these routes without the "),s("code",[t._v("Authorization")]),t._v(" header returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Accessing these routes with a key that does not have permissions (i.e. other than the master key) returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),s("p",[t._v("If any of the search queries fail to execute, the response returns the corresponding error instead of the array of results. If multiple queries fail, only the first encountered failure is returned.")]),t._v(" "),s("p",[s("code",[t._v("POST")]),t._v(" HTTP verb errors:")]),t._v(" "),s("ul",[s("li",[t._v("🔴 Omitting the Content-Type header returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_content_type"}},[t._v("missing_content_type")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an empty Content-Type returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[t._v("invalid_content_type")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending a different Content-Type than "),s("code",[t._v("application/json")]),t._v(" returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_content_type"}},[t._v("invalid_content_type")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an empty payload returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_payload"}},[t._v("missing_payload")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an invalid JSON payload returns a "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#malformed_payload"}},[t._v("malformed_payload")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an inexistent "),s("code",[t._v("indexUid")]),t._v(" in a query object returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#index_not_found"}},[t._v("index_not_found")]),t._v(" error.")],1),t._v(" "),s("li",[t._v("🔴 Sending an invalid format for the "),s("code",[t._v("indexUid")]),t._v(" property in a query object returns an "),s("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_index_uid"}},[t._v("invalid_index_uid")]),t._v(" error.")],1)]),t._v(" "),s("h3",{attrs:{id:"_3-1-search-payload-parameters"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-search-payload-parameters"}},[t._v("#")]),t._v(" 3.1. Search Payload Parameters")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Field")]),t._v(" "),s("th",[t._v("Type")]),t._v(" "),s("th",[t._v("Required")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("a",{attrs:{href:"#311-queries"}},[s("code",[t._v("queries")])])]),t._v(" "),s("td",[t._v("Array of Objects")]),t._v(" "),s("td",[t._v("True")])])])]),t._v(" "),s("h4",{attrs:{id:"_3-1-1-queries"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-queries"}},[t._v("#")]),t._v(" 3.1.1. "),s("code",[t._v("queries")])]),t._v(" "),s("ul",[s("li",[t._v("Type: Object")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("The "),s("code",[t._v("queries")]),t._v(" object contains the list of search queries to perform.")]),t._v(" "),s("p",[t._v("Each element of this array is a JSON object with the required field "),s("code",[t._v("indexUid")]),t._v(", the uid of the index to be searched. Other fields of this object are optional, and identical to the ones in the "),s("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#31-search-payload-parameters"}},[t._v("existing search routes")]),t._v(" ("),s("code",[t._v("q")]),t._v(", "),s("code",[t._v("limit")]),t._v(", etc.).")],1),t._v(" "),s("h3",{attrs:{id:"_3-2-search-response-properties"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-search-response-properties"}},[t._v("#")]),t._v(" 3.2. Search Response Properties")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Field")]),t._v(" "),s("th",[t._v("Type")]),t._v(" "),s("th",[t._v("Required")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("a",{attrs:{href:"#321-results"}},[s("code",[t._v("results")])])]),t._v(" "),s("td",[t._v("Array[Object]")]),t._v(" "),s("td",[t._v("True")])])])]),t._v(" "),s("h4",{attrs:{id:"_3-2-1-results"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-results"}},[t._v("#")]),t._v(" 3.2.1. "),s("code",[t._v("results")])]),t._v(" "),s("ul",[s("li",[t._v("Type: Array[Objets]")]),t._v(" "),s("li",[t._v("Required: True")])]),t._v(" "),s("p",[t._v("Results of the search queries as an array of search results.")]),t._v(" "),s("p",[t._v("Each element in this array contains the results of the search queries in the same order they have been requested. Additionally to the "),s("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#31-formatting-search-results"}},[t._v("usual fields returned by a search result")]),t._v(", an "),s("code",[t._v("indexUid")]),t._v(" field is present with the index UID on which the search has been performed.")],1),t._v(" "),s("p",[t._v("example:")]),t._v(" "),s("p",[t._v("Search queries:")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"queries"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movie"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wonder"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"books"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"q"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"king"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Search results:")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"results"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"movie"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wonderwoman"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// other search results fields: processingTimeMs, limit, ...")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"indexUid"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"books"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hits"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"king kong theory"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// other search results fields: processingTimeMs, limit, ...")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("The other fields of an element from the "),s("code",[t._v("results")]),t._v(" array are identical to the fields of the "),s("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#31-formatting-search-results"}},[t._v("response from the other search routes")]),t._v(".")],1),t._v(" "),s("h2",{attrs:{id:"_2-technical-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_2-technical-details"}},[t._v("#")]),t._v(" 2. Technical Details")]),t._v(" "),s("p",[t._v("n/a")]),t._v(" "),s("h2",{attrs:{id:"_3-future-possibilities"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-future-possibilities"}},[t._v("#")]),t._v(" 3. Future Possibilities")]),t._v(" "),s("ul",[s("li",[t._v("Allow specifying an index uid pattern instead of an index uid to produce searches on all indexes matching the pattern.")]),t._v(" "),s("li",[t._v("Allow additional arguments to the request specifying a strategy to aggregate results from the multiple searches.")])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/61.556679de.js b/docs/assets/js/61.6a669f3a.js similarity index 99% rename from docs/assets/js/61.556679de.js rename to docs/assets/js/61.6a669f3a.js index 7f4036a1f..1565f47df 100644 --- a/docs/assets/js/61.556679de.js +++ b/docs/assets/js/61.6a669f3a.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[61],{484: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:"experimental-features"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#experimental-features"}},[e._v("#")]),e._v(" Experimental features")]),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("Experimental features are features that are 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(". They require explicit opt-in to be usable and may break back compatibility or be removed between minor and patch versions of Meilisearch.")]),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("See "),a("a",{attrs:{href:"https://github.com/meilisearch/engine-team/blob/main/resources/experimental-features.md#motivation",target:"_blank",rel:"noopener noreferrer"}},[e._v("Motivation"),a("OutboundLink")],1),e._v(" in the experimental feature process.")]),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("Some experimental features can be enabled when starting the Meilisearch binary via a command line option, a configuration option or an environment variable. These experimental features are the "),a("a",{attrs:{href:"#31-instance-experimental-features"}},[e._v("instance experimental features")]),e._v(".")]),e._v(" "),a("p",[e._v("Other experimental features can be enabled at runtime by using the "),a("RouterLink",{attrs:{to:"/specifications/text/0194-experimental-feature-api.html"}},[a("code",[e._v("/experimental-features")]),e._v(" route")]),e._v(". They are the "),a("a",{attrs:{href:"#32-runtime-experimental-features"}},[e._v("runtime experimental features")]),e._v(".")],1),e._v(" "),a("h2",{attrs:{id:"_3-1-instance-experimental-features"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-instance-experimental-features"}},[e._v("#")]),e._v(" 3.1. Instance experimental features")]),e._v(" "),a("p",[e._v("To enable instance experimental features, pass their associated command line flag as an option to Meilisearch. For each such command line flag, there also exists a configuration option and an environment variable.")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Feature name")]),e._v(" "),a("th",[e._v("Command line flag")]),e._v(" "),a("th",[e._v("Description")]),e._v(" "),a("th",[e._v("Missing for stabilization")]),e._v(" "),a("th",[e._v("Expected stabilization date/version")]),e._v(" "),a("th",[e._v("Product discussion")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[e._v("Prometheus Metrics")]),e._v(" "),a("td",[a("code",[e._v("--experimental-enable-metrics")])]),e._v(" "),a("td",[e._v("The "),a("code",[e._v("/metrics")]),e._v(" endpoint exposes metrics to be scraped by a Prometheus collector at regular intervals and stored for analysis.")]),e._v(" "),a("td",[e._v("We have yet to determine which metrics we want to expose and how")]),e._v(" "),a("td",[e._v("TBC")]),e._v(" "),a("td",[a("a",{attrs:{href:"https://github.com/meilisearch/product/discussions/625",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://github.com/meilisearch/product/discussions/625"),a("OutboundLink")],1)])]),e._v(" "),a("tr",[a("td",[e._v("Reduce Indexing Memory Usage")]),e._v(" "),a("td",[a("code",[e._v("--experimental-reduce-indexing-memory-usage")])]),e._v(" "),a("td",[e._v("Trades-off indexing speed with a lower RAM footprint.")]),e._v(" "),a("td",[e._v("We have yet to determine if a lot impacts performance and whether the RAM usage reduction is significant enough.")]),e._v(" "),a("td",[e._v("TBC")]),e._v(" "),a("td",[a("a",{attrs:{href:"https://github.com/meilisearch/product/discussions/652",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://github.com/meilisearch/product/discussions/652"),a("OutboundLink")],1)])]),e._v(" "),a("tr",[a("td",[e._v("Enable logs route")]),e._v(" "),a("td",[a("code",[e._v("--experimental-enable-logs-route")])]),e._v(" "),a("td",[e._v("The "),a("code",[e._v("/logs/*")]),e._v(" endpoints exposes ways to retrieves and customizes logs.")]),e._v(" "),a("td",[e._v("TBC")]),e._v(" "),a("td",[a("a",{attrs:{href:"https://github.com/orgs/meilisearch/discussions/721",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://github.com/orgs/meilisearch/discussions/721"),a("OutboundLink")],1)]),e._v(" "),a("td")]),e._v(" "),a("tr",[a("td",[e._v("Change logs mode")]),e._v(" "),a("td",[a("code",[e._v("--experimental-logs-mode json")])]),e._v(" "),a("td",[e._v("The CLI flags takes a parameter, either "),a("code",[e._v("json")]),e._v(" or "),a("code",[e._v("human")]),e._v(" that will change the way we output the logs to the console. "),a("code",[e._v("human")]),e._v(" is used by default.")]),e._v(" "),a("td",[e._v("TBC")]),e._v(" "),a("td",[a("a",{attrs:{href:"https://github.com/orgs/meilisearch/discussions/723",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://github.com/orgs/meilisearch/discussions/723"),a("OutboundLink")],1)]),e._v(" "),a("td")])])]),e._v(" "),a("h2",{attrs:{id:"_3-2-runtime-experimental-features"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-runtime-experimental-features"}},[e._v("#")]),e._v(" 3.2. Runtime experimental features")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Feature name")]),e._v(" "),a("th",[e._v("How to enable")]),e._v(" "),a("th",[e._v("Description")]),e._v(" "),a("th",[e._v("Missing for stabilization")]),e._v(" "),a("th",[e._v("Expected stabilization date/version")]),e._v(" "),a("th",[e._v("Product discussion")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("a",{staticClass:"anchor",attrs:{id:"user-content-vector-store","aria-hidden":"true",href:"#vector-store"}},[e._v("vector store")])]),e._v(" "),a("td",[a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("curl \\\n -X PATCH 'http://localhost:7700/experimental-features/' \\\n -H 'Content-Type: application/json' \\\n--data-binary '{\n \"vectorStore\": true\n }'\n")])])])]),e._v(" "),a("td",[e._v("Enables storing and searching by using semantic vectors")]),e._v(" "),a("td",[e._v("Confidence in the speed of the indexation, search of the vectors, and API surface")]),e._v(" "),a("td",[e._v("v1.4")]),e._v(" "),a("td",[a("p",[a("a",{attrs:{href:"https://github.com/meilisearch/product/discussions/677",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://github.com/meilisearch/product/discussions/677"),a("OutboundLink")],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=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[61],{485: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:"experimental-features"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#experimental-features"}},[e._v("#")]),e._v(" Experimental features")]),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("Experimental features are features that are 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(". They require explicit opt-in to be usable and may break back compatibility or be removed between minor and patch versions of Meilisearch.")]),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("See "),a("a",{attrs:{href:"https://github.com/meilisearch/engine-team/blob/main/resources/experimental-features.md#motivation",target:"_blank",rel:"noopener noreferrer"}},[e._v("Motivation"),a("OutboundLink")],1),e._v(" in the experimental feature process.")]),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("Some experimental features can be enabled when starting the Meilisearch binary via a command line option, a configuration option or an environment variable. These experimental features are the "),a("a",{attrs:{href:"#31-instance-experimental-features"}},[e._v("instance experimental features")]),e._v(".")]),e._v(" "),a("p",[e._v("Other experimental features can be enabled at runtime by using the "),a("RouterLink",{attrs:{to:"/specifications/text/0194-experimental-feature-api.html"}},[a("code",[e._v("/experimental-features")]),e._v(" route")]),e._v(". They are the "),a("a",{attrs:{href:"#32-runtime-experimental-features"}},[e._v("runtime experimental features")]),e._v(".")],1),e._v(" "),a("h2",{attrs:{id:"_3-1-instance-experimental-features"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-instance-experimental-features"}},[e._v("#")]),e._v(" 3.1. Instance experimental features")]),e._v(" "),a("p",[e._v("To enable instance experimental features, pass their associated command line flag as an option to Meilisearch. For each such command line flag, there also exists a configuration option and an environment variable.")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Feature name")]),e._v(" "),a("th",[e._v("Command line flag")]),e._v(" "),a("th",[e._v("Description")]),e._v(" "),a("th",[e._v("Missing for stabilization")]),e._v(" "),a("th",[e._v("Expected stabilization date/version")]),e._v(" "),a("th",[e._v("Product discussion")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[e._v("Prometheus Metrics")]),e._v(" "),a("td",[a("code",[e._v("--experimental-enable-metrics")])]),e._v(" "),a("td",[e._v("The "),a("code",[e._v("/metrics")]),e._v(" endpoint exposes metrics to be scraped by a Prometheus collector at regular intervals and stored for analysis.")]),e._v(" "),a("td",[e._v("We have yet to determine which metrics we want to expose and how")]),e._v(" "),a("td",[e._v("TBC")]),e._v(" "),a("td",[a("a",{attrs:{href:"https://github.com/meilisearch/product/discussions/625",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://github.com/meilisearch/product/discussions/625"),a("OutboundLink")],1)])]),e._v(" "),a("tr",[a("td",[e._v("Reduce Indexing Memory Usage")]),e._v(" "),a("td",[a("code",[e._v("--experimental-reduce-indexing-memory-usage")])]),e._v(" "),a("td",[e._v("Trades-off indexing speed with a lower RAM footprint.")]),e._v(" "),a("td",[e._v("We have yet to determine if a lot impacts performance and whether the RAM usage reduction is significant enough.")]),e._v(" "),a("td",[e._v("TBC")]),e._v(" "),a("td",[a("a",{attrs:{href:"https://github.com/meilisearch/product/discussions/652",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://github.com/meilisearch/product/discussions/652"),a("OutboundLink")],1)])]),e._v(" "),a("tr",[a("td",[e._v("Enable logs route")]),e._v(" "),a("td",[a("code",[e._v("--experimental-enable-logs-route")])]),e._v(" "),a("td",[e._v("The "),a("code",[e._v("/logs/*")]),e._v(" endpoints exposes ways to retrieves and customizes logs.")]),e._v(" "),a("td",[e._v("TBC")]),e._v(" "),a("td",[a("a",{attrs:{href:"https://github.com/orgs/meilisearch/discussions/721",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://github.com/orgs/meilisearch/discussions/721"),a("OutboundLink")],1)]),e._v(" "),a("td")]),e._v(" "),a("tr",[a("td",[e._v("Change logs mode")]),e._v(" "),a("td",[a("code",[e._v("--experimental-logs-mode json")])]),e._v(" "),a("td",[e._v("The CLI flags takes a parameter, either "),a("code",[e._v("json")]),e._v(" or "),a("code",[e._v("human")]),e._v(" that will change the way we output the logs to the console. "),a("code",[e._v("human")]),e._v(" is used by default.")]),e._v(" "),a("td",[e._v("TBC")]),e._v(" "),a("td",[a("a",{attrs:{href:"https://github.com/orgs/meilisearch/discussions/723",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://github.com/orgs/meilisearch/discussions/723"),a("OutboundLink")],1)]),e._v(" "),a("td")])])]),e._v(" "),a("h2",{attrs:{id:"_3-2-runtime-experimental-features"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-runtime-experimental-features"}},[e._v("#")]),e._v(" 3.2. Runtime experimental features")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Feature name")]),e._v(" "),a("th",[e._v("How to enable")]),e._v(" "),a("th",[e._v("Description")]),e._v(" "),a("th",[e._v("Missing for stabilization")]),e._v(" "),a("th",[e._v("Expected stabilization date/version")]),e._v(" "),a("th",[e._v("Product discussion")])])]),e._v(" "),a("tbody",[a("tr",[a("td",[a("a",{staticClass:"anchor",attrs:{id:"user-content-vector-store","aria-hidden":"true",href:"#vector-store"}},[e._v("vector store")])]),e._v(" "),a("td",[a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("curl \\\n -X PATCH 'http://localhost:7700/experimental-features/' \\\n -H 'Content-Type: application/json' \\\n--data-binary '{\n \"vectorStore\": true\n }'\n")])])])]),e._v(" "),a("td",[e._v("Enables storing and searching by using semantic vectors")]),e._v(" "),a("td",[e._v("Confidence in the speed of the indexation, search of the vectors, and API surface")]),e._v(" "),a("td",[e._v("v1.4")]),e._v(" "),a("td",[a("p",[a("a",{attrs:{href:"https://github.com/meilisearch/product/discussions/677",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://github.com/meilisearch/product/discussions/677"),a("OutboundLink")],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=s.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/64.53965336.js b/docs/assets/js/64.e6f9b837.js similarity index 99% rename from docs/assets/js/64.53965336.js rename to docs/assets/js/64.e6f9b837.js index 08ede7ca4..d41431a99 100644 --- a/docs/assets/js/64.53965336.js +++ b/docs/assets/js/64.e6f9b837.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[64],{489:function(e,t,a){"use strict";a.r(t);var r=a(62),i=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:"facet-search-api"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#facet-search-api"}},[e._v("#")]),e._v(" Facet Search 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 facet search endpoint retrieves facet values from a query.")]),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 many values exist for a facet, end-users need to be able to discover non-show values they can select in order to refine their faceted search. Being able to search for values for a facet solves this need.")]),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("Meilisearch exposes 1 route to perform facet search requests:")]),e._v(" "),a("ul",[a("li",[a("p",[e._v("POST "),a("code",[e._v("indexes/:index_uid/facet-search")])])]),e._v(" "),a("li",[a("p",[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",[a("p",[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("p",[e._v("If a master key is used to secure a Meilisearch instance, the auth layer returns the following errors:")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Accessing these routes 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 these routes with a key that does not have permissions (i.e. other than the master key) returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),a("p",[a("code",[e._v("POST")]),e._v(" HTTP verb errors:")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Omitting the 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("h3",{attrs:{id:"_3-1-facet-search-payload-parameters"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-facet-search-payload-parameters"}},[e._v("#")]),e._v(" 3.1. Facet Search Payload Parameters")]),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-facetName"}},[a("code",[e._v("facetName")])])]),e._v(" "),a("td",[e._v("String")]),e._v(" "),a("td",[e._v("True")])]),e._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#312-facetQuery"}},[a("code",[e._v("facetQuery")])])]),e._v(" "),a("td",[e._v("String")]),e._v(" "),a("td",[e._v("False")])])])]),e._v(" "),a("h4",{attrs:{id:"_3-1-1-facetname"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-facetname"}},[e._v("#")]),e._v(" 3.1.1. "),a("code",[e._v("facetName")])]),e._v(" "),a("ul",[a("li",[e._v("Type: String")]),e._v(" "),a("li",[e._v("Required: True")]),e._v(" "),a("li",[e._v("Default: "),a("code",[e._v("null")])])]),e._v(" "),a("p",[a("code",[e._v("facetName")]),e._v(" contains the facet name to search values on.")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Omitting "),a("code",[e._v("facetName")]),e._v(" returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_facet_search_facet_name"}},[e._v("missing_facet_search_facet_name")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a value with a different type than "),a("code",[e._v("String")]),e._v(" for "),a("code",[e._v("facetName")]),e._v(" returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_facet_search_facet_name"}},[e._v("invalid_facet_search_facet_name")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a field not defined as a "),a("code",[e._v("filterableAttributes")]),e._v(" for "),a("code",[e._v("facetname")]),e._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_facet_search_facet_name"}},[e._v("invalid_facet_search_facet_name")]),e._v(" error.")],1)]),e._v(" "),a("h4",{attrs:{id:"_3-1-2-facetquery"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-facetquery"}},[e._v("#")]),e._v(" 3.1.2. "),a("code",[e._v("facetQuery")])]),e._v(" "),a("ul",[a("li",[e._v("Type: String")]),e._v(" "),a("li",[e._v("Required: False")]),e._v(" "),a("li",[e._v("Default: "),a("code",[e._v("null")])])]),e._v(" "),a("p",[a("code",[e._v("facetQuery")]),e._v(" contains the terms to search within the facet values of the "),a("code",[e._v("facetName")]),e._v(".")]),e._v(" "),a("blockquote",[a("p",[e._v("When "),a("code",[e._v("facetQuery")]),e._v(" isn't specified, Meilisearch performs a "),a("strong",[e._v("placeholder search")]),e._v(". A placeholder search returns all facet values for the searched facet, limited by the "),a("RouterLink",{attrs:{to:"/specifications/text/157-faceting-setting-api.html#311-maxvaluesperfacet"}},[e._v("maxValuesPerFacet index setting")]),e._v(".\nIt supports "),a("strong",[e._v("prefix search")]),e._v("\nIt supports "),a("strong",[e._v("typo tolerance")]),e._v(". Modifying the "),a("RouterLink",{attrs:{to:"/specifications/text/0117-typo-tolerance-setting-api.html"}},[e._v("typo tolerance index setting")]),e._v(" impacts the behavior of the facet search.")],1)]),e._v(" "),a("blockquote",[a("p",[e._v("Meilisearch only considers one term for "),a("code",[e._v("facetQuery")]),e._v('. e.g if "harry potter" is typed the facet search consider "harry potter" as one single term.')])]),e._v(" "),a("ul",[a("li",[e._v("🔴 Sending a value with a different type than "),a("code",[e._v("String")]),e._v(" or "),a("code",[e._v("null")]),e._v(" for "),a("code",[e._v("facetQuery")]),e._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_facet_search_facet_query"}},[e._v("invalid_facet_search_facet_query")]),e._v(" error.")],1)]),e._v(" "),a("h3",{attrs:{id:"_3-2-additional-search-parameters"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-additional-search-parameters"}},[e._v("#")]),e._v(" 3.2. Additional Search Parameters")]),e._v(" "),a("p",[e._v("Additional search parameters can be injected to the facet search query. If additional search parameters are set, the method will return facet values that both:")]),e._v(" "),a("ul",[a("li",[e._v("Match the facet query")]),e._v(" "),a("li",[e._v("Are contained in the records matching the additional search parameters ("),a("code",[e._v("q")]),e._v(", "),a("code",[e._v("filter")]),e._v(", "),a("code",[e._v("matchingStrategy")]),e._v(")")])]),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("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#311-q"}},[a("code",[e._v("q")])])],1),e._v(" "),a("td",[e._v("String")]),e._v(" "),a("td",[e._v("False")])]),e._v(" "),a("tr",[a("td",[a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#312-filter"}},[a("code",[e._v("filter")])])],1),e._v(" "),a("td",[e._v("String")]),e._v(" "),a("td",[e._v("False")])]),e._v(" "),a("tr",[a("td",[a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#3117-matchingstrategy"}},[a("code",[e._v("matchingStrategy")])])],1),e._v(" "),a("td",[e._v("String")]),e._v(" "),a("td",[e._v("False")])])])]),e._v(" "),a("ul",[a("li",[e._v("🔴 These properties are validated as stipulated in their original specification and return the associated errors.")])]),e._v(" "),a("blockquote",[a("p",[e._v("Non-listed search parameters are ignored if specified for the API call; no error is raised.")])]),e._v(" "),a("h3",{attrs:{id:"_3-3-search-response-properties"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-search-response-properties"}},[e._v("#")]),e._v(" 3.3. Search Response Properties")]),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:"#331-facetHits"}},[a("code",[e._v("facetHits")])])]),e._v(" "),a("td",[e._v("Array[FacetHit]")]),e._v(" "),a("td",[e._v("True")])]),e._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#332-facetQuery"}},[a("code",[e._v("facetQuery")])])]),e._v(" "),a("td",[e._v("String")]),e._v(" "),a("td",[e._v("True")])]),e._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#333-processingtimems"}},[a("code",[e._v("processingTimeMs")])])]),e._v(" "),a("td",[e._v("Integer")]),e._v(" "),a("td",[e._v("True")])])])]),e._v(" "),a("h4",{attrs:{id:"_3-3-1-facethits"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-facethits"}},[e._v("#")]),e._v(" 3.3.1. "),a("code",[e._v("facetHits")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Array[FacetHit]")]),e._v(" "),a("li",[e._v("Required: True")])]),e._v(" "),a("p",[e._v("Results of the facet search query as an array of facet hit.")]),e._v(" "),a("blockquote",[a("p",[e._v("FacetHit object represents a matched facet value for a facet search.")])]),e._v(" "),a("h5",{attrs:{id:"_3-3-1-1-facethit-object-properties"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-facethit-object-properties"}},[e._v("#")]),e._v(" 3.3.1.1. "),a("code",[e._v("facetHit")]),e._v(" Object Properties")]),e._v(" "),a("p",[a("code",[e._v("facetHit")]),e._v(" sorting is controlled by the "),a("RouterLink",{attrs:{to:"/specifications/text/157-faceting-setting-api.html#312-sortfacetvaluesby"}},[e._v("sortFacetValuesBy index setting")]),e._v(".")],1),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:"#32112-formatted"}},[a("code",[e._v("value")])])]),e._v(" "),a("td",[e._v("String")]),e._v(" "),a("td",[e._v("True")])]),e._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#32111-geodistance"}},[a("code",[e._v("count")])])]),e._v(" "),a("td",[e._v("Integer")]),e._v(" "),a("td",[e._v("True")])])])]),e._v(" "),a("h6",{attrs:{id:"_3-3-1-1-1-value"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-1-value"}},[e._v("#")]),e._v(" 3.3.1.1.1. "),a("code",[e._v("value")])]),e._v(" "),a("ul",[a("li",[e._v("Type: String")]),e._v(" "),a("li",[e._v("Required: True")])]),e._v(" "),a("p",[e._v("The facet value being matched.")]),e._v(" "),a("h6",{attrs:{id:"_3-3-1-1-2-count"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-2-count"}},[e._v("#")]),e._v(" 3.3.1.1.2. "),a("code",[e._v("count")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Integer")]),e._v(" "),a("li",[e._v("Required: True")])]),e._v(" "),a("p",[e._v("The number of document containing the matched facet value.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-2-facetquery"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-facetquery"}},[e._v("#")]),e._v(" 3.3.2. "),a("code",[e._v("facetQuery")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Integer")]),e._v(" "),a("li",[e._v("Required: True")])]),e._v(" "),a("p",[e._v("Facet query originating the response.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-3-processingtimems"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-processingtimems"}},[e._v("#")]),e._v(" 3.3.3. "),a("code",[e._v("processingTimeMs")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Integer")]),e._v(" "),a("li",[e._v("Required: True")])]),e._v(" "),a("p",[e._v("Processing time of the facet search query in "),a("strong",[e._v("milliseconds")]),e._v(".")]),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-facet-containing-numbers-limitation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-facet-containing-numbers-limitation"}},[e._v("#")]),e._v(" 2.1 Facet Containing Numbers Limitation")]),e._v(" "),a("ul",[a("li",[e._v("Numbers on the Meilisearch side are represented as "),a("a",{attrs:{href:"https://en.wikipedia.org/wiki/Double-precision_floating-point_format",target:"_blank",rel:"noopener noreferrer"}},[e._v("float64"),a("OutboundLink")],1),e._v(" internally. When a user sends a number in a JSON document, it can be written in different ways but end up being the same number i.e. 12e4, 120000, 120000.0. There is an issue as to how to let the user find it if it is not written in the same way.")]),e._v(" "),a("li",[e._v("Another issue is that float64 numbers sometimes lack precision. You can write a number in your document i.e. 12.6758493, search for this exact same number and don’t find it. The reason is that numbers are stored in a different way and an exact search will not find them.")])]),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 a property to customize the sort of returned facet values")]),e._v(" "),a("li",[e._v("Highlight parts matching the facet value from the facet query")]),e._v(" "),a("li",[e._v("Support for number search")])])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[64],{488:function(e,t,a){"use strict";a.r(t);var r=a(62),i=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:"facet-search-api"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#facet-search-api"}},[e._v("#")]),e._v(" Facet Search 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 facet search endpoint retrieves facet values from a query.")]),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 many values exist for a facet, end-users need to be able to discover non-show values they can select in order to refine their faceted search. Being able to search for values for a facet solves this need.")]),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("Meilisearch exposes 1 route to perform facet search requests:")]),e._v(" "),a("ul",[a("li",[a("p",[e._v("POST "),a("code",[e._v("indexes/:index_uid/facet-search")])])]),e._v(" "),a("li",[a("p",[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",[a("p",[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("p",[e._v("If a master key is used to secure a Meilisearch instance, the auth layer returns the following errors:")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Accessing these routes 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 these routes with a key that does not have permissions (i.e. other than the master key) returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[e._v("invalid_api_key")]),e._v(" error.")],1)]),e._v(" "),a("p",[a("code",[e._v("POST")]),e._v(" HTTP verb errors:")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Omitting the 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("h3",{attrs:{id:"_3-1-facet-search-payload-parameters"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-facet-search-payload-parameters"}},[e._v("#")]),e._v(" 3.1. Facet Search Payload Parameters")]),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-facetName"}},[a("code",[e._v("facetName")])])]),e._v(" "),a("td",[e._v("String")]),e._v(" "),a("td",[e._v("True")])]),e._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#312-facetQuery"}},[a("code",[e._v("facetQuery")])])]),e._v(" "),a("td",[e._v("String")]),e._v(" "),a("td",[e._v("False")])])])]),e._v(" "),a("h4",{attrs:{id:"_3-1-1-facetname"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-1-facetname"}},[e._v("#")]),e._v(" 3.1.1. "),a("code",[e._v("facetName")])]),e._v(" "),a("ul",[a("li",[e._v("Type: String")]),e._v(" "),a("li",[e._v("Required: True")]),e._v(" "),a("li",[e._v("Default: "),a("code",[e._v("null")])])]),e._v(" "),a("p",[a("code",[e._v("facetName")]),e._v(" contains the facet name to search values on.")]),e._v(" "),a("ul",[a("li",[e._v("🔴 Omitting "),a("code",[e._v("facetName")]),e._v(" returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_facet_search_facet_name"}},[e._v("missing_facet_search_facet_name")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a value with a different type than "),a("code",[e._v("String")]),e._v(" for "),a("code",[e._v("facetName")]),e._v(" returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_facet_search_facet_name"}},[e._v("invalid_facet_search_facet_name")]),e._v(" error.")],1),e._v(" "),a("li",[e._v("🔴 Sending a field not defined as a "),a("code",[e._v("filterableAttributes")]),e._v(" for "),a("code",[e._v("facetname")]),e._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_facet_search_facet_name"}},[e._v("invalid_facet_search_facet_name")]),e._v(" error.")],1)]),e._v(" "),a("h4",{attrs:{id:"_3-1-2-facetquery"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-2-facetquery"}},[e._v("#")]),e._v(" 3.1.2. "),a("code",[e._v("facetQuery")])]),e._v(" "),a("ul",[a("li",[e._v("Type: String")]),e._v(" "),a("li",[e._v("Required: False")]),e._v(" "),a("li",[e._v("Default: "),a("code",[e._v("null")])])]),e._v(" "),a("p",[a("code",[e._v("facetQuery")]),e._v(" contains the terms to search within the facet values of the "),a("code",[e._v("facetName")]),e._v(".")]),e._v(" "),a("blockquote",[a("p",[e._v("When "),a("code",[e._v("facetQuery")]),e._v(" isn't specified, Meilisearch performs a "),a("strong",[e._v("placeholder search")]),e._v(". A placeholder search returns all facet values for the searched facet, limited by the "),a("RouterLink",{attrs:{to:"/specifications/text/157-faceting-setting-api.html#311-maxvaluesperfacet"}},[e._v("maxValuesPerFacet index setting")]),e._v(".\nIt supports "),a("strong",[e._v("prefix search")]),e._v("\nIt supports "),a("strong",[e._v("typo tolerance")]),e._v(". Modifying the "),a("RouterLink",{attrs:{to:"/specifications/text/0117-typo-tolerance-setting-api.html"}},[e._v("typo tolerance index setting")]),e._v(" impacts the behavior of the facet search.")],1)]),e._v(" "),a("blockquote",[a("p",[e._v("Meilisearch only considers one term for "),a("code",[e._v("facetQuery")]),e._v('. e.g if "harry potter" is typed the facet search consider "harry potter" as one single term.')])]),e._v(" "),a("ul",[a("li",[e._v("🔴 Sending a value with a different type than "),a("code",[e._v("String")]),e._v(" or "),a("code",[e._v("null")]),e._v(" for "),a("code",[e._v("facetQuery")]),e._v(" returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_facet_search_facet_query"}},[e._v("invalid_facet_search_facet_query")]),e._v(" error.")],1)]),e._v(" "),a("h3",{attrs:{id:"_3-2-additional-search-parameters"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-additional-search-parameters"}},[e._v("#")]),e._v(" 3.2. Additional Search Parameters")]),e._v(" "),a("p",[e._v("Additional search parameters can be injected to the facet search query. If additional search parameters are set, the method will return facet values that both:")]),e._v(" "),a("ul",[a("li",[e._v("Match the facet query")]),e._v(" "),a("li",[e._v("Are contained in the records matching the additional search parameters ("),a("code",[e._v("q")]),e._v(", "),a("code",[e._v("filter")]),e._v(", "),a("code",[e._v("matchingStrategy")]),e._v(")")])]),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("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#311-q"}},[a("code",[e._v("q")])])],1),e._v(" "),a("td",[e._v("String")]),e._v(" "),a("td",[e._v("False")])]),e._v(" "),a("tr",[a("td",[a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#312-filter"}},[a("code",[e._v("filter")])])],1),e._v(" "),a("td",[e._v("String")]),e._v(" "),a("td",[e._v("False")])]),e._v(" "),a("tr",[a("td",[a("RouterLink",{attrs:{to:"/specifications/text/0118-search-api.html#3117-matchingstrategy"}},[a("code",[e._v("matchingStrategy")])])],1),e._v(" "),a("td",[e._v("String")]),e._v(" "),a("td",[e._v("False")])])])]),e._v(" "),a("ul",[a("li",[e._v("🔴 These properties are validated as stipulated in their original specification and return the associated errors.")])]),e._v(" "),a("blockquote",[a("p",[e._v("Non-listed search parameters are ignored if specified for the API call; no error is raised.")])]),e._v(" "),a("h3",{attrs:{id:"_3-3-search-response-properties"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-search-response-properties"}},[e._v("#")]),e._v(" 3.3. Search Response Properties")]),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:"#331-facetHits"}},[a("code",[e._v("facetHits")])])]),e._v(" "),a("td",[e._v("Array[FacetHit]")]),e._v(" "),a("td",[e._v("True")])]),e._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#332-facetQuery"}},[a("code",[e._v("facetQuery")])])]),e._v(" "),a("td",[e._v("String")]),e._v(" "),a("td",[e._v("True")])]),e._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#333-processingtimems"}},[a("code",[e._v("processingTimeMs")])])]),e._v(" "),a("td",[e._v("Integer")]),e._v(" "),a("td",[e._v("True")])])])]),e._v(" "),a("h4",{attrs:{id:"_3-3-1-facethits"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-facethits"}},[e._v("#")]),e._v(" 3.3.1. "),a("code",[e._v("facetHits")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Array[FacetHit]")]),e._v(" "),a("li",[e._v("Required: True")])]),e._v(" "),a("p",[e._v("Results of the facet search query as an array of facet hit.")]),e._v(" "),a("blockquote",[a("p",[e._v("FacetHit object represents a matched facet value for a facet search.")])]),e._v(" "),a("h5",{attrs:{id:"_3-3-1-1-facethit-object-properties"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-facethit-object-properties"}},[e._v("#")]),e._v(" 3.3.1.1. "),a("code",[e._v("facetHit")]),e._v(" Object Properties")]),e._v(" "),a("p",[a("code",[e._v("facetHit")]),e._v(" sorting is controlled by the "),a("RouterLink",{attrs:{to:"/specifications/text/157-faceting-setting-api.html#312-sortfacetvaluesby"}},[e._v("sortFacetValuesBy index setting")]),e._v(".")],1),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:"#32112-formatted"}},[a("code",[e._v("value")])])]),e._v(" "),a("td",[e._v("String")]),e._v(" "),a("td",[e._v("True")])]),e._v(" "),a("tr",[a("td",[a("a",{attrs:{href:"#32111-geodistance"}},[a("code",[e._v("count")])])]),e._v(" "),a("td",[e._v("Integer")]),e._v(" "),a("td",[e._v("True")])])])]),e._v(" "),a("h6",{attrs:{id:"_3-3-1-1-1-value"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-1-value"}},[e._v("#")]),e._v(" 3.3.1.1.1. "),a("code",[e._v("value")])]),e._v(" "),a("ul",[a("li",[e._v("Type: String")]),e._v(" "),a("li",[e._v("Required: True")])]),e._v(" "),a("p",[e._v("The facet value being matched.")]),e._v(" "),a("h6",{attrs:{id:"_3-3-1-1-2-count"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-1-1-2-count"}},[e._v("#")]),e._v(" 3.3.1.1.2. "),a("code",[e._v("count")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Integer")]),e._v(" "),a("li",[e._v("Required: True")])]),e._v(" "),a("p",[e._v("The number of document containing the matched facet value.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-2-facetquery"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-2-facetquery"}},[e._v("#")]),e._v(" 3.3.2. "),a("code",[e._v("facetQuery")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Integer")]),e._v(" "),a("li",[e._v("Required: True")])]),e._v(" "),a("p",[e._v("Facet query originating the response.")]),e._v(" "),a("h4",{attrs:{id:"_3-3-3-processingtimems"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-3-processingtimems"}},[e._v("#")]),e._v(" 3.3.3. "),a("code",[e._v("processingTimeMs")])]),e._v(" "),a("ul",[a("li",[e._v("Type: Integer")]),e._v(" "),a("li",[e._v("Required: True")])]),e._v(" "),a("p",[e._v("Processing time of the facet search query in "),a("strong",[e._v("milliseconds")]),e._v(".")]),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-facet-containing-numbers-limitation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-1-facet-containing-numbers-limitation"}},[e._v("#")]),e._v(" 2.1 Facet Containing Numbers Limitation")]),e._v(" "),a("ul",[a("li",[e._v("Numbers on the Meilisearch side are represented as "),a("a",{attrs:{href:"https://en.wikipedia.org/wiki/Double-precision_floating-point_format",target:"_blank",rel:"noopener noreferrer"}},[e._v("float64"),a("OutboundLink")],1),e._v(" internally. When a user sends a number in a JSON document, it can be written in different ways but end up being the same number i.e. 12e4, 120000, 120000.0. There is an issue as to how to let the user find it if it is not written in the same way.")]),e._v(" "),a("li",[e._v("Another issue is that float64 numbers sometimes lack precision. You can write a number in your document i.e. 12.6758493, search for this exact same number and don’t find it. The reason is that numbers are stored in a different way and an exact search will not find them.")])]),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 a property to customize the sort of returned facet values")]),e._v(" "),a("li",[e._v("Highlight parts matching the facet value from the facet query")]),e._v(" "),a("li",[e._v("Support for number search")])])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/65.509d9e2e.js b/docs/assets/js/65.3c3fb2ee.js similarity index 99% rename from docs/assets/js/65.509d9e2e.js rename to docs/assets/js/65.3c3fb2ee.js index 9f7d9bf94..50965e124 100644 --- a/docs/assets/js/65.509d9e2e.js +++ b/docs/assets/js/65.3c3fb2ee.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[65],{488:function(t,e,a){"use strict";a.r(e);var s=a(62),i=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"snapshots-api-and-cli"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#snapshots-api-and-cli"}},[t._v("#")]),t._v(" Snapshots API and CLI")]),t._v(" "),a("h2",{attrs:{id:"_1-summary"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-summary"}},[t._v("#")]),t._v(" 1. Summary")]),t._v(" "),a("p",[t._v("A snapshot is a compressed file containing an export of a MeiliSearch instance. It contains all indexes, documents, settings, tasks, and API keys.")]),t._v(" "),a("h2",{attrs:{id:"_2-motivation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-motivation"}},[t._v("#")]),t._v(" 2. Motivation")]),t._v(" "),a("p",[t._v("The snapshots exist to start a MeiliSearch instance from a database as fast as possible. It can be a helpful tool for loading a production state on a staging server to make changes and test them before propagating them to production.")]),t._v(" "),a("h2",{attrs:{id:"_3-functional-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-functional-specification"}},[t._v("#")]),t._v(" 3. Functional Specification")]),t._v(" "),a("h3",{attrs:{id:"_3-1-summary-key-points"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-1-summary-key-points"}},[t._v("#")]),t._v(" 3.1. Summary Key Points")]),t._v(" "),a("ul",[a("li",[t._v("A snapshot creation can be scheduled from the MeiliSearch API using the "),a("code",[t._v("POST - /snapshots")]),t._v(" endpoint.")]),t._v(" "),a("li",[t._v("A snapshot creation status can be tracked using the "),a("code",[t._v("GET - /tasks/:task_uid")]),t._v(" endpoint.")]),t._v(" "),a("li",[t._v("MeiliSearch will autobatch all your snapshots requests into one.")]),t._v(" "),a("li",[t._v("By default, snapshots are created in a folder named "),a("code",[t._v("snapshots")]),t._v(", and can be found in the same directory as the MeiliSearch binary.")]),t._v(" "),a("li",[t._v("The "),a("code",[t._v("snapshots")]),t._v(" directory can be customized using the "),a("code",[t._v("--snapshot-dir")]),t._v(" configuration option. If the snapshot directory does not already exist when the snapshot creation process is called, MeiliSearch will create it.")]),t._v(" "),a("li",[t._v("A "),a("code",[t._v(".snapshot")]),t._v(" file can be imported using the "),a("code",[t._v("--import-snapshot")]),t._v(" command-line flag.")]),t._v(" "),a("li",[t._v("The MeiliSearch server starts when the snapshot is fully imported.")]),t._v(" "),a("li",[t._v("By default, importing a snapshot when a database already exists (a non-empty "),a("code",[t._v("data.ms")]),t._v(" folder in the same directory as the MeiliSearch binary) will stop the process and throw an error.")]),t._v(" "),a("li",[t._v("When using the command-line flag "),a("code",[t._v("--ignore-snapshot-if-db-exists=true")]),t._v(", MeiliSearch will use the existing database to start an instance instead of throwing an error. The snapshot will be ignored.")]),t._v(" "),a("li",[t._v("By default, trying to import a snapshot that does not exist, will stop the process and throw an error.")]),t._v(" "),a("li",[t._v("When using the command-line flag "),a("code",[t._v("--ignore-missing-snapshot")]),t._v(", MeiliSearch will continue its process and not throw an error.")]),t._v(" "),a("li",[t._v("When a snapshot is being imported, the http API is not available. Meilisearch can't receive read or write requests.")]),t._v(" "),a("li",[a("code",[t._v("snapshotCreation")]),t._v(" task takes priority over enqueued "),a("code",[t._v("tasks")]),t._v(". This means that if a "),a("code",[t._v("snapshotCreation")]),t._v(" task is created, it will be directly processed when the current processing task finishes even if other tasks have been enqueued before.")])]),t._v(" "),a("hr"),t._v(" "),a("h3",{attrs:{id:"_3-2-snapshots-api-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-snapshots-api-definition"}},[t._v("#")]),t._v(" 3.2. Snapshots API Definition")]),t._v(" "),a("h4",{attrs:{id:"_3-2-1-post-snapshot"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-post-snapshot"}},[t._v("#")]),t._v(" 3.2.1. POST "),a("code",[t._v("/snapshot")])]),t._v(" "),a("p",[t._v("Create a snapshot")]),t._v(" "),a("h5",{attrs:{id:"_3-2-1-1-body-payload"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-1-body-payload"}},[t._v("#")]),t._v(" 3.2.1.1. Body Payload")]),t._v(" "),a("p",[t._v("N/A")]),t._v(" "),a("h5",{attrs:{id:"_3-2-1-2-response-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-2-response-definition"}},[t._v("#")]),t._v(" 3.2.1.2. Response Definition")]),t._v(" "),a("p",[t._v("When the request is successful, Meilisearch returns the HTTP code "),a("code",[t._v("202 Accepted")]),t._v(". The response's content is the summarized representation of the received asynchronous task.")]),t._v(" "),a("p",[t._v("See "),a("RouterLink",{attrs:{to:"/specifications/text/0060-tasks-api.html#summarized-task-object-for-202-accepted"}},[t._v("Summarized "),a("code",[t._v("task")]),t._v(" Object for "),a("code",[t._v("202 Accepted")])]),t._v(".")],1),t._v(" "),a("p",[t._v("The name of the generated snapshot is the database path ("),a("code",[t._v("data.ms")]),t._v(" by default), joined by the "),a("code",[t._v(".snapshot")]),t._v(" extension. By default, it's "),a("code",[t._v("data.ms.snapshot")]),t._v(".")]),t._v(" "),a("h5",{attrs:{id:"_3-2-1-3-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-2-1-3-errors"}},[t._v("#")]),t._v(" 3.2.1.3. Errors")]),t._v(" "),a("ul",[a("li",[t._v("🔴 If Meilisearch is secured, accessing this route without the "),a("code",[t._v("Authorization")]),t._v(" header returns a "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#missing_authorization_header"}},[t._v("missing_authorization_header")]),t._v(" error.")],1),t._v(" "),a("li",[t._v("🔴 If Meilisearch is secured, accessing this route with a key that does not have permissions (i.e. other than the master-key) returns an "),a("RouterLink",{attrs:{to:"/specifications/text/0061-error-format-and-definitions.html#invalid_api_key"}},[t._v("invalid_api_key")]),t._v(" error.")],1)]),t._v(" "),a("hr"),t._v(" "),a("h3",{attrs:{id:"_3-3-cli-definition"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-3-cli-definition"}},[t._v("#")]),t._v(" 3.3. CLI Definition")]),t._v(" "),a("p",[t._v("You can find the CLI informations about the snapshots "),a("RouterLink",{attrs:{to:"/specifications/text/text/0119-instance-options.html"}},[t._v("here")])],1),t._v(" "),a("h2",{attrs:{id:"_4-technical-aspects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-technical-aspects"}},[t._v("#")]),t._v(" 4. Technical Aspects")]),t._v(" "),a("h3",{attrs:{id:"_4-1-snapshot-creation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-snapshot-creation"}},[t._v("#")]),t._v(" 4.1. Snapshot Creation")]),t._v(" "),a("p",[t._v("When a snapshot is being created, the task queue can receive other future operations to perform.")]),t._v(" "),a("h3",{attrs:{id:"_4-2-importing-a-snapshot"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-importing-a-snapshot"}},[t._v("#")]),t._v(" 4.2. Importing a snapshot")]),t._v(" "),a("p",[t._v("When a snapshot is being imported, the http API is not available. Meilisearch can't receive read or write requests.")]),t._v(" "),a("h3",{attrs:{id:"_4-3-snapshot-creation-task-priority"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-3-snapshot-creation-task-priority"}},[t._v("#")]),t._v(" 4.3. Snapshot Creation Task Priority")]),t._v(" "),a("p",[t._v("Snapshot creation tasks have priority over other task types. If a "),a("code",[t._v("snapshotCreation")]),t._v(" task is enqueued, it will be directly processed when the current processing task finishes even if other tasks have been enqueued before.")]),t._v(" "),a("h2",{attrs:{id:"_5-future-possibilities"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-future-possibilities"}},[t._v("#")]),t._v(" 5. Future Possibilities")]),t._v(" "),a("ul",[a("li",[t._v("Give information about who created the task (is it scheduled or created on a user demand) in the details.")])])])}),[],!1,null,null,null);e.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[65],{490: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/9.65656e78.js b/docs/assets/js/9.0c014273.js similarity index 95% rename from docs/assets/js/9.65656e78.js rename to docs/assets/js/9.0c014273.js index 32b39333b..8747e61ff 100644 --- a/docs/assets/js/9.65656e78.js +++ b/docs/assets/js/9.0c014273.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{435: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.abbf05fd.js b/docs/assets/js/app.06ecc07e.js similarity index 76% rename from docs/assets/js/app.abbf05fd.js rename to docs/assets/js/app.06ecc07e.js index 32993f48a..60aef5c37 100644 --- a/docs/assets/js/app.abbf05fd.js +++ b/docs/assets/js/app.06ecc07e.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 5264c5135..b16f6820a 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 8e03a3981..2e3c44272 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

  • from release-vX.X.X if the related changes are already planned for the release vX.X.X
  • from main if you don't know in which release the changes will be integrated

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:

  • One person from the Engine team.
  • One person from the Integration team.
  • One person from the Documentation team.

# Merge State

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

  • It must be approved as described in the Review State section.
  • The PR must point to the right release-vX.X.X branch.
  • It must be tagged with:
    • A vX.X.X tag indicating in which release the described changes will be introduced.
    • A QX:YYYY tag indicating in which quarter and year the described changes will be introduced.
    • The ⚠ Breaking tag, if breaking changes are introduced.
    • The Telemetry tag, if telemetry changes are introduced.
    • The OpenAPI tag, if the open-api specification will see changes introduced.

# Release Worfklow

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

  • Pull-requests describing changes for a release are squashed and merged into the corresponding release-vX.X.X branch.
  • release-vX.X.X is squashed and merged into main.
  • open-api.yml version is deployed on bump.sh.

# 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).

  • Describe the API resource and endpoints. (Methods, URL, query parameters, body definition, status code).
  • Explain the feature through examples.
  • List error cases.

# 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 82efd861e..4e1366d8d 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

  • [] Update OpenAPI specification file (if needed; Apply the OpenApi label)
  • [] Update telemetry datapoints (if needed; Apply the Telemetry label)
- + diff --git a/docs/specifications/text/0000-specification-template.html b/docs/specifications/text/0000-specification-template.html index 88ba7d81a..31b308f5e 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 b18004a55..e630cf84f 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 d3ef1aa09..f2843c1f6 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 35ca356c7..8a849cafa 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 4117c0223..fe6773409 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 03268d9fc..c0c82293d 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 61c4befe8..68c894012 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 11febccca..ae474974e 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 c21f30a9b..984ef2522 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 ad673fc4d..56018b446 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 06b2105db..ec4023d58 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 09de602e1..12951a658 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 d79546753..22e1254ba 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 05fa89d2c..4af309905 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 8a4bae55a..a5982ae01 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 9a9659bdc..2a3fb2204 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 a981c2df2..5b066755d 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 ae202d492..edb3e80da 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 57225bcdb..d5a30075a 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 e38f3cfee..9ac461b86 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 30052b46a..b0e179f69 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 50f022e73..31f039587 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 222a8f4bf..84951068e 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 d26fefcdd..5ce1698b6 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 13147c673..7e64b59b7 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 428e9dd92..9dc971d90 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 7cadbf938..e4105cbb9 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 6d2b56bea..3d652c1ba 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 1e5d0a694..f26b68b78 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 80fd6790d..6396f7b76 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 4cdb1676d..0ae5e2e87 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 2a75c4e83..d40290e2b 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 8ab0d9a7a..1096f96e0 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 891fb6c1c..f3db62411 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 a08b6697b..cf9423c2d 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 697f95818..bb01e5f30 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 960bfd7b7..d2dd512a5 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 d48bc04d4..8be6cd4de 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 0e31f4f9d..2aee91a0c 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 599913bd1..e71077b5f 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 d79c33754..13a8f033d 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 e4b53318c..2793d19fd 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 d3ea6c99d..82394a395 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 729de5c5d..c15d8ca85 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 2ba3923ed..1a25f1a55 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 3b55e95c6..59d0be7a9 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 51f350ac1..1651f84bd 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 85bf50862..0033b1203 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 258090b3e..a9b838744 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 9b952923d..7da90f624 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 f9cddf332..06a588177 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 8b06043c2..599302ce3 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 30fd43c45..df72eefbb 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 94564e1ff..ec0ea9aea 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 1e9c04d24..76ab4c58c 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 0171b9c26..6d5a7a61e 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 61a5fca9c..cc2c8ce64 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 @@

- +