├── .code-samples.meilisearch.yaml ├── .github ├── CODEOWNERS ├── dependabot.yml └── workflows │ ├── code-sample-automation.yml │ ├── pull-code-samples.yml │ └── scraper.yml ├── .gitignore ├── .markdownlint.jsonc ├── .markdownlintignore ├── .nvmrc ├── .vale.ini ├── .vale └── styles │ ├── Meilisearch │ ├── British.yml │ ├── FirstPerson.yml │ ├── Headings.yml │ ├── Indexing.yml │ ├── LatinTerms.yml │ ├── MergeConflictMarkers.yml │ ├── OxfordComma.yml │ ├── Periods.yml │ ├── Repetition.yml │ ├── Semicolons.yml │ ├── SentenceLength.yml │ ├── Spacing.yml │ ├── Spelling.yml │ ├── Typos.yml │ └── URLFormat.yml │ └── Vocab │ └── word_list │ ├── accept.txt │ └── reject.txt ├── LICENSE ├── README.md ├── assets ├── datasets │ ├── books.json │ ├── crm-chats.json │ ├── crm-profiles.json │ ├── crm-tickets.json │ ├── kitchenware.json │ ├── meteorites.json │ ├── movies.json │ ├── restaurants.json │ ├── stories.json │ └── videogames.json ├── images │ ├── aws │ │ ├── 01.launch-instances.png │ │ ├── 02.select-ami.png │ │ ├── 03.size-and-specs.png │ │ ├── 04.instance-details.png │ │ ├── 05.storage.png │ │ ├── 06.tags.png │ │ ├── 07.security.png │ │ ├── 08.key-pair.png │ │ ├── 09.launch.png │ │ ├── 10.enjoy.png │ │ └── 11.domain.png │ ├── azure │ │ ├── 01.azure-deploy-button.png │ │ └── 02.azure-output.png │ ├── cloud-analytics │ │ ├── 01-analytics-enable.png │ │ └── 02-analytics-disable.png │ ├── cloud-dumps │ │ ├── 01-export-dump.png │ │ └── 02-import-dump.png │ ├── cloud-getting-started │ │ ├── 1-new-project.png │ │ ├── 10-index-list-filled.png │ │ ├── 11-index-list-breadcrumb.png │ │ ├── 12-project-page-url.png │ │ ├── 13-search-preview.png │ │ ├── 2-create-project.png │ │ ├── 3-project-billing.png │ │ ├── 4-project-list.png │ │ ├── 5-project-page-menu-indexes.png │ │ ├── 6-index-list-empty.png │ │ ├── 7-create-index.png │ │ ├── 8-file-upload.png │ │ └── 9-data-import.png │ ├── cloud-index-settings │ │ ├── 01-indexes-tab.png │ │ ├── 02-index-settings.png │ │ ├── 03-general-settings.png │ │ ├── 04-searchable-attributes-default.png │ │ ├── 05-searchable-attributes-delete.png │ │ ├── 06-searchable-attributes-confirm-deletion.png │ │ ├── 07-searchable-attributes-attribute-deleted.png │ │ └── 08-searchable-attributes-reset.png │ ├── cloud-migration │ │ ├── 1-new-project.png │ │ └── 2-import-dump.png │ ├── cloud-tasks-tutorial │ │ ├── 01-tasks-menu.png │ │ └── 02-tasks-table.png │ ├── demos │ │ └── saas-demo-screenshot.png │ ├── digitalocean │ │ ├── add-domain.png │ │ ├── add-ssh-key.png │ │ ├── add-tags.png │ │ ├── copy-ip.png │ │ ├── create-droplet.png │ │ ├── create.png │ │ ├── domain.png │ │ ├── droplet-name.png │ │ ├── marketplace.png │ │ ├── select-plan.png │ │ ├── select-region.png │ │ └── test-meili.png │ ├── document_structure.svg │ ├── faceted-search │ │ ├── conjunctive-and-disjunctive-facets.gif │ │ ├── conjunctive-factes.gif │ │ ├── disjunctive_facets.gif │ │ └── facets-ecommerce.png │ ├── gcp │ │ ├── 01.compute-engine.png │ │ ├── 02.image-info.png │ │ ├── 03.import-image.png │ │ ├── 04.create-instance.png │ │ ├── 05.machine-configuration.png │ │ ├── 06.boot-disk.png │ │ ├── 07.instance-running.png │ │ └── 08.domain.png │ ├── movies-demo-dark.gif │ ├── postman │ │ ├── create_index.png │ │ ├── edit.png │ │ ├── import.png │ │ ├── set_token.png │ │ ├── set_variables.png │ │ └── url.png │ ├── rails_quick_start │ │ └── rails-qs-search-preview.gif │ ├── railway │ │ └── public-url.png │ ├── ranking-rules │ │ ├── belgium.png │ │ ├── knight.png │ │ ├── new_road.png │ │ └── vogli3.png │ ├── react_quick_start │ │ └── react-qs-search-ui.png │ ├── search_preview │ │ ├── 01-search-preview-menu.png │ │ ├── 02-select-index.png │ │ ├── 03-basic-search.png │ │ ├── 04-score.png │ │ ├── 05-sidebar-options.png │ │ ├── 06-sidebar-options-advanced.png │ │ └── 07-sidebar-options-export.png │ ├── security │ │ └── 01-master-api-keys.png │ ├── similar-guide │ │ └── 01-add-embedder-ui.gif │ ├── strapi-v4 │ │ ├── strapi-add-category.png │ │ ├── strapi-add-collection-to-meilisearch.gif │ │ ├── strapi-dashboard.png │ │ ├── strapi-meilisearch-credentials.png │ │ ├── strapi-meilisearch-plugin.png │ │ ├── strapi-restaurant-content-type.png │ │ ├── strapi-search-preview.gif │ │ └── strapi-signup.png │ ├── tuto-searchbar-for-docs │ │ ├── docxtemplater-searchbar-demo.gif │ │ ├── vuepress-plugin-example.png │ │ └── vuepress-searchbar-demo.gif │ ├── updating │ │ ├── update-button.png │ │ └── update-in-progress.png │ └── vercel │ │ ├── 01.create-new-project-on-vercel-dashboard.png │ │ ├── 02.project-settings-integrations-tab.png │ │ ├── 03.meilisearch-cloud-integration-page-in-marketplace.png │ │ ├── 04.add-meilisearch-cloud-form.png │ │ ├── 05.create-a-meilisearch-cloud-project-form.png │ │ ├── 06.meilisearch-cloud-integration-page-in-vercel-dashboard.png │ │ ├── 07.project-settings-environment-variables-tab.png │ │ └── 08.meilisearch-cloud-dashboard.png ├── misc │ └── meilisearch-collection-postman.json └── repo │ ├── favicon.svg │ ├── meilisearch-logo-dark.svg │ └── meilisearch-logo-light.svg ├── cookieyes-banner.js ├── docs-scraper.config.json ├── docs.json ├── guides ├── ai │ └── mcp.mdx ├── computing_hugging_face_embeddings_gpu.mdx ├── deployment │ ├── aws.mdx │ ├── digitalocean.mdx │ ├── koyeb.mdx │ ├── qovery.mdx │ └── railway.mdx ├── docker.mdx ├── embedders │ ├── cloudflare.mdx │ ├── cohere.mdx │ ├── huggingface.mdx │ ├── mistral.mdx │ ├── openai.mdx │ └── voyage.mdx ├── front_end │ ├── front_end_integration.mdx │ ├── pagination.mdx │ ├── react_quick_start.mdx │ ├── search_bar_for_docs.mdx │ └── vue_quick_start.mdx ├── http2_ssl.mdx ├── improve_relevancy_large_documents.mdx ├── langchain.mdx ├── laravel_multitenancy.mdx ├── laravel_scout.mdx ├── multitenancy_nodejs.mdx ├── postman_collection.mdx ├── ruby_on_rails_quick_start.mdx ├── running_production.mdx ├── strapi_v4.mdx └── vercel.mdx ├── home.mdx ├── learn ├── ai_powered_search │ ├── choose_an_embedder.mdx │ ├── configure_rest_embedder.mdx │ ├── difference_full_text_ai_search.mdx │ ├── document_template_best_practices.mdx │ ├── getting_started_with_ai_search.mdx │ ├── image_search_with_user_provided_embeddings.mdx │ ├── retrieve_related_search_results.mdx │ └── search_with_user_provided_embeddings.mdx ├── analytics │ ├── bind_events_user.mdx │ ├── configure_analytics.mdx │ ├── configure_monitoring.mdx │ ├── deactivate_analytics_monitoring.mdx │ └── events_endpoint.mdx ├── async │ ├── asynchronous_operations.mdx │ ├── filtering_tasks.mdx │ ├── paginating_tasks.mdx │ ├── task_webhook.mdx │ └── working_with_tasks.mdx ├── configuration │ ├── configuring_index_settings.mdx │ └── configuring_index_settings_api.mdx ├── data_backup │ ├── dumps.mdx │ ├── snapshots.mdx │ └── snapshots_vs_dumps.mdx ├── engine │ ├── concat.mdx │ ├── datatypes.mdx │ ├── prefix.mdx │ └── storage.mdx ├── filtering_and_sorting │ ├── facet_types.mdx │ ├── facets_vs_filters.mdx │ ├── filter_expression_reference.mdx │ ├── filter_search_results.mdx │ ├── geosearch.mdx │ ├── search_with_facet_filters.mdx │ ├── sort_search_results.mdx │ └── working_with_dates.mdx ├── getting_started │ ├── cloud_quick_start.mdx │ ├── documents.mdx │ ├── indexes.mdx │ ├── primary_key.mdx │ ├── search_preview.mdx │ └── what_is_meilisearch.mdx ├── indexing │ ├── indexing_best_practices.mdx │ ├── ram_multithreading_performance.mdx │ └── tokenization.mdx ├── multi_search │ ├── implement_sharding.mdx │ ├── multi_search_vs_federated_search.mdx │ └── performing_federated_search.mdx ├── relevancy │ ├── attribute_ranking_order.mdx │ ├── custom_ranking_rules.mdx │ ├── displayed_searchable_attributes.mdx │ ├── distinct_attribute.mdx │ ├── ranking_rules.mdx │ ├── ranking_score.mdx │ ├── relevancy.mdx │ ├── synonyms.mdx │ ├── typo_tolerance_calculations.mdx │ └── typo_tolerance_settings.mdx ├── resources │ ├── comparison_to_alternatives.mdx │ ├── contributing_docs.mdx │ ├── experimental_features_overview.mdx │ ├── faq.mdx │ ├── known_limitations.mdx │ ├── language.mdx │ ├── sdks.mdx │ ├── telemetry.mdx │ └── versioning.mdx ├── security │ ├── basic_security.mdx │ ├── differences_master_api_keys.mdx │ ├── generate_tenant_token_scratch.mdx │ ├── generate_tenant_token_sdk.mdx │ ├── generate_tenant_token_third_party.mdx │ ├── multitenancy_tenant_tokens.mdx │ ├── protected_unprotected.mdx │ ├── resetting_master_key.mdx │ ├── tenant_token_reference.mdx │ └── tenant_tokens.mdx ├── self_hosted │ ├── configure_meilisearch_at_launch.mdx │ ├── getting_started_with_self_hosted_meilisearch.mdx │ ├── install_meilisearch_locally.mdx │ └── supported_os.mdx ├── teams │ └── teams.mdx └── update_and_migration │ ├── algolia_migration.mdx │ ├── migrating_cloud.mdx │ ├── previous_docs_version.mdx │ └── updating.mdx ├── meilisearch-search-bar.css ├── package-lock.json ├── package.json ├── reference ├── api │ ├── batches.mdx │ ├── documents.mdx │ ├── dump.mdx │ ├── experimental_features.mdx │ ├── facet_search.mdx │ ├── health.mdx │ ├── indexes.mdx │ ├── keys.mdx │ ├── logs.mdx │ ├── metrics.mdx │ ├── multi_search.mdx │ ├── network.mdx │ ├── overview.mdx │ ├── search.mdx │ ├── settings.mdx │ ├── similar.mdx │ ├── snapshots.mdx │ ├── stats.mdx │ ├── tasks.mdx │ └── version.mdx └── errors │ ├── error_codes.mdx │ └── overview.mdx ├── scripts └── pull-code-samples.mjs ├── search.js ├── snippets ├── notice_tag.mdx ├── route_highlighter.mdx └── samples │ ├── code_samples_add_movies_json_1.mdx │ ├── code_samples_add_or_replace_documents_1.mdx │ ├── code_samples_add_or_update_documents_1.mdx │ ├── code_samples_analytics_event_bind_event_1.mdx │ ├── code_samples_analytics_event_bind_search_1.mdx │ ├── code_samples_analytics_event_click_1.mdx │ ├── code_samples_analytics_event_conversion_1.mdx │ ├── code_samples_async_guide_canceled_by.mdx │ ├── code_samples_async_guide_canceled_by_1.mdx │ ├── code_samples_async_guide_filter_by_date_1.mdx │ ├── code_samples_async_guide_filter_by_ids_1.mdx │ ├── code_samples_async_guide_filter_by_index_uids_1.mdx │ ├── code_samples_async_guide_filter_by_statuses_1.mdx │ ├── code_samples_async_guide_filter_by_statuses_2.mdx │ ├── code_samples_async_guide_filter_by_types_1.mdx │ ├── code_samples_async_guide_multiple_filters_1.mdx │ ├── code_samples_authorization_header_1.mdx │ ├── code_samples_basic_security_tutorial_admin_1.mdx │ ├── code_samples_basic_security_tutorial_listing_1.mdx │ ├── code_samples_basic_security_tutorial_search_1.mdx │ ├── code_samples_cancel_tasks_1.mdx │ ├── code_samples_create_a_key_1.mdx │ ├── code_samples_create_an_index_1.mdx │ ├── code_samples_create_snapshot_1.mdx │ ├── code_samples_date_guide_filter_1.mdx │ ├── code_samples_date_guide_filterable_attributes_1.mdx │ ├── code_samples_date_guide_index_1.mdx │ ├── code_samples_date_guide_sort_1.mdx │ ├── code_samples_date_guide_sortable_attributes_1.mdx │ ├── code_samples_delete_a_key_1.mdx │ ├── code_samples_delete_all_documents_1.mdx │ ├── code_samples_delete_an_index_1.mdx │ ├── code_samples_delete_documents_1.mdx │ ├── code_samples_delete_documents_by_batch_1.mdx │ ├── code_samples_delete_documents_by_filter_1.mdx │ ├── code_samples_delete_one_document_1.mdx │ ├── code_samples_delete_tasks_1.mdx │ ├── code_samples_distinct_attribute_guide_1.mdx │ ├── code_samples_distinct_attribute_guide_distinct_parameter_1.mdx │ ├── code_samples_distinct_attribute_guide_filterable_1.mdx │ ├── code_samples_documents_guide_add_movie_1.mdx │ ├── code_samples_experimental_delete_logs_stream_1.mdx │ ├── code_samples_experimental_get_metrics_1.mdx │ ├── code_samples_experimental_post_logs_stderr_1.mdx │ ├── code_samples_experimental_post_logs_stream_1.mdx │ ├── code_samples_facet_search_1.mdx │ ├── code_samples_facet_search_2.mdx │ ├── code_samples_facet_search_3.mdx │ ├── code_samples_faceted_search_1.mdx │ ├── code_samples_faceted_search_facets_1.mdx │ ├── code_samples_faceted_search_update_settings_1.mdx │ ├── code_samples_faceted_search_walkthrough_filter_1.mdx │ ├── code_samples_field_properties_guide_displayed_1.mdx │ ├── code_samples_field_properties_guide_searchable_1.mdx │ ├── code_samples_filtering_guide_1.mdx │ ├── code_samples_filtering_guide_2.mdx │ ├── code_samples_filtering_guide_3.mdx │ ├── code_samples_filtering_guide_nested_1.mdx │ ├── code_samples_filtering_update_settings_1.mdx │ ├── code_samples_geosearch_guide_filter_settings_1.mdx │ ├── code_samples_geosearch_guide_filter_usage_1.mdx │ ├── code_samples_geosearch_guide_filter_usage_2.mdx │ ├── code_samples_geosearch_guide_filter_usage_3.mdx │ ├── code_samples_geosearch_guide_sort_settings_1.mdx │ ├── code_samples_geosearch_guide_sort_usage_1.mdx │ ├── code_samples_geosearch_guide_sort_usage_2.mdx │ ├── code_samples_get_all_batches_1.mdx │ ├── code_samples_get_all_keys_1.mdx │ ├── code_samples_get_all_tasks_1.mdx │ ├── code_samples_get_all_tasks_paginating_1.mdx │ ├── code_samples_get_all_tasks_paginating_2.mdx │ ├── code_samples_get_batch_1.mdx │ ├── code_samples_get_dictionary_1.mdx │ ├── code_samples_get_displayed_attributes_1.mdx │ ├── code_samples_get_distinct_attribute_1.mdx │ ├── code_samples_get_documents_1.mdx │ ├── code_samples_get_documents_post_1.mdx │ ├── code_samples_get_embedders_1.mdx │ ├── code_samples_get_experimental_features_1.mdx │ ├── code_samples_get_facet_search_settings_1.mdx │ ├── code_samples_get_faceting_settings_1.mdx │ ├── code_samples_get_filterable_attributes_1.mdx │ ├── code_samples_get_health_1.mdx │ ├── code_samples_get_index_stats_1.mdx │ ├── code_samples_get_indexes_stats_1.mdx │ ├── code_samples_get_localized_attribute_settings_1.mdx │ ├── code_samples_get_network_1.mdx │ ├── code_samples_get_non_separator_tokens_1.mdx │ ├── code_samples_get_one_document_1.mdx │ ├── code_samples_get_one_index_1.mdx │ ├── code_samples_get_one_key_1.mdx │ ├── code_samples_get_pagination_settings_1.mdx │ ├── code_samples_get_prefix_search_settings_1.mdx │ ├── code_samples_get_proximity_precision_settings_1.mdx │ ├── code_samples_get_ranking_rules_1.mdx │ ├── code_samples_get_search_cutoff_1.mdx │ ├── code_samples_get_searchable_attributes_1.mdx │ ├── code_samples_get_separator_tokens_1.mdx │ ├── code_samples_get_settings_1.mdx │ ├── code_samples_get_similar_get_1.mdx │ ├── code_samples_get_similar_post_1.mdx │ ├── code_samples_get_sortable_attributes_1.mdx │ ├── code_samples_get_stop_words_1.mdx │ ├── code_samples_get_synonyms_1.mdx │ ├── code_samples_get_task_1.mdx │ ├── code_samples_get_typo_tolerance_1.mdx │ ├── code_samples_get_version_1.mdx │ ├── code_samples_getting_started_add_documents.mdx │ ├── code_samples_getting_started_add_documents_md.mdx │ ├── code_samples_getting_started_add_meteorites.mdx │ ├── code_samples_getting_started_check_task_status.mdx │ ├── code_samples_getting_started_communicating_with_a_protected_instance.mdx │ ├── code_samples_getting_started_configure_settings.mdx │ ├── code_samples_getting_started_faceting.mdx │ ├── code_samples_getting_started_filtering.mdx │ ├── code_samples_getting_started_front_end_integration_md.mdx │ ├── code_samples_getting_started_geo_point.mdx │ ├── code_samples_getting_started_geo_radius.mdx │ ├── code_samples_getting_started_pagination.mdx │ ├── code_samples_getting_started_search.mdx │ ├── code_samples_getting_started_search_md.mdx │ ├── code_samples_getting_started_sorting.mdx │ ├── code_samples_getting_started_synonyms.mdx │ ├── code_samples_getting_started_typo_tolerance.mdx │ ├── code_samples_getting_started_update_displayed_attributes.mdx │ ├── code_samples_getting_started_update_ranking_rules.mdx │ ├── code_samples_getting_started_update_searchable_attributes.mdx │ ├── code_samples_getting_started_update_stop_words.mdx │ ├── code_samples_index_settings_tutorial_api_get_setting_1.mdx │ ├── code_samples_index_settings_tutorial_api_put_setting_1.mdx │ ├── code_samples_index_settings_tutorial_api_task_1.mdx │ ├── code_samples_landing_getting_started.mdx │ ├── code_samples_landing_getting_started_1.mdx │ ├── code_samples_list_all_indexes_1.mdx │ ├── code_samples_multi_search_1.mdx │ ├── code_samples_multi_search_federated_1.mdx │ ├── code_samples_multi_search_remote_federated_1.mdx │ ├── code_samples_negative_search_1.mdx │ ├── code_samples_negative_search_2.mdx │ ├── code_samples_phrase_search_1.mdx │ ├── code_samples_post_dump_1.mdx │ ├── code_samples_primary_field_guide_add_document_primary_key.mdx │ ├── code_samples_primary_field_guide_create_index_primary_key.mdx │ ├── code_samples_primary_field_guide_update_document_primary_key.mdx │ ├── code_samples_related_results_embedder_1.mdx │ ├── code_samples_related_results_search_1.mdx │ ├── code_samples_related_results_similar_1.mdx │ ├── code_samples_reset_dictionary_1.mdx │ ├── code_samples_reset_displayed_attributes_1.mdx │ ├── code_samples_reset_distinct_attribute_1.mdx │ ├── code_samples_reset_embedders_1.mdx │ ├── code_samples_reset_facet_search_settings_1.mdx │ ├── code_samples_reset_faceting_settings_1.mdx │ ├── code_samples_reset_filterable_attributes_1.mdx │ ├── code_samples_reset_localized_attribute_settings_1.mdx │ ├── code_samples_reset_non_separator_tokens_1.mdx │ ├── code_samples_reset_pagination_settings_1.mdx │ ├── code_samples_reset_prefix_search_settings_1.mdx │ ├── code_samples_reset_proximity_precision_settings_1.mdx │ ├── code_samples_reset_ranking_rules_1.mdx │ ├── code_samples_reset_search_cutoff_1.mdx │ ├── code_samples_reset_searchable_attributes_1.mdx │ ├── code_samples_reset_separator_tokens_1.mdx │ ├── code_samples_reset_settings_1.mdx │ ├── code_samples_reset_sortable_attributes_1.mdx │ ├── code_samples_reset_stop_words_1.mdx │ ├── code_samples_reset_synonyms_1.mdx │ ├── code_samples_reset_typo_tolerance_1.mdx │ ├── code_samples_search_get_1.mdx │ ├── code_samples_search_parameter_guide_attributes_to_search_on_1.mdx │ ├── code_samples_search_parameter_guide_crop_1.mdx │ ├── code_samples_search_parameter_guide_crop_marker_1.mdx │ ├── code_samples_search_parameter_guide_facet_stats_1.mdx │ ├── code_samples_search_parameter_guide_highlight_1.mdx │ ├── code_samples_search_parameter_guide_highlight_tag_1.mdx │ ├── code_samples_search_parameter_guide_hitsperpage_1.mdx │ ├── code_samples_search_parameter_guide_hybrid_1.mdx │ ├── code_samples_search_parameter_guide_limit_1.mdx │ ├── code_samples_search_parameter_guide_matching_strategy_1.mdx │ ├── code_samples_search_parameter_guide_matching_strategy_2.mdx │ ├── code_samples_search_parameter_guide_matching_strategy_3.mdx │ ├── code_samples_search_parameter_guide_offset_1.mdx │ ├── code_samples_search_parameter_guide_page_1.mdx │ ├── code_samples_search_parameter_guide_query_1.mdx │ ├── code_samples_search_parameter_guide_retrieve_1.mdx │ ├── code_samples_search_parameter_guide_show_matches_position_1.mdx │ ├── code_samples_search_parameter_guide_show_ranking_score_1.mdx │ ├── code_samples_search_parameter_guide_show_ranking_score_details_1.mdx │ ├── code_samples_search_parameter_guide_sort_1.mdx │ ├── code_samples_search_parameter_guide_vector_1.mdx │ ├── code_samples_search_parameter_reference_distinct_1.mdx │ ├── code_samples_search_parameter_reference_locales_1.mdx │ ├── code_samples_search_parameter_reference_ranking_score_threshold_1.mdx │ ├── code_samples_search_parameter_reference_retrieve_vectors_1.mdx │ ├── code_samples_search_post_1.mdx │ ├── code_samples_security_guide_create_key_1.mdx │ ├── code_samples_security_guide_delete_key_1.mdx │ ├── code_samples_security_guide_list_keys_1.mdx │ ├── code_samples_security_guide_search_key_1.mdx │ ├── code_samples_security_guide_update_key_1.mdx │ ├── code_samples_sorting_guide_sort_nested_1.mdx │ ├── code_samples_sorting_guide_sort_parameter_1.mdx │ ├── code_samples_sorting_guide_sort_parameter_2.mdx │ ├── code_samples_sorting_guide_update_ranking_rules_1.mdx │ ├── code_samples_sorting_guide_update_sortable_attributes_1.mdx │ ├── code_samples_swap_indexes_1.mdx │ ├── code_samples_synonyms_guide_1.mdx │ ├── code_samples_tenant_token_guide_generate_sdk_1.mdx │ ├── code_samples_tenant_token_guide_search_no_sdk_1.mdx │ ├── code_samples_tenant_token_guide_search_sdk_1.mdx │ ├── code_samples_typo_tolerance_guide_1.mdx │ ├── code_samples_typo_tolerance_guide_2.mdx │ ├── code_samples_typo_tolerance_guide_3.mdx │ ├── code_samples_typo_tolerance_guide_4.mdx │ ├── code_samples_update_a_key_1.mdx │ ├── code_samples_update_an_index_1.mdx │ ├── code_samples_update_dictionary_1.mdx │ ├── code_samples_update_displayed_attributes_1.mdx │ ├── code_samples_update_distinct_attribute_1.mdx │ ├── code_samples_update_embedders_1.mdx │ ├── code_samples_update_experimental_features_1.mdx │ ├── code_samples_update_facet_search_settings_1.mdx │ ├── code_samples_update_faceting_settings_1.mdx │ ├── code_samples_update_filterable_attributes_1.mdx │ ├── code_samples_update_localized_attribute_settings_1.mdx │ ├── code_samples_update_network_1.mdx │ ├── code_samples_update_non_separator_tokens_1.mdx │ ├── code_samples_update_pagination_settings_1.mdx │ ├── code_samples_update_prefix_search_settings_1.mdx │ ├── code_samples_update_proximity_precision_settings_1.mdx │ ├── code_samples_update_ranking_rules_1.mdx │ ├── code_samples_update_search_cutoff_1.mdx │ ├── code_samples_update_searchable_attributes_1.mdx │ ├── code_samples_update_separator_tokens_1.mdx │ ├── code_samples_update_settings_1.mdx │ ├── code_samples_update_sortable_attributes_1.mdx │ ├── code_samples_update_stop_words_1.mdx │ ├── code_samples_update_synonyms_1.mdx │ ├── code_samples_update_typo_tolerance_1.mdx │ ├── code_samples_updating_guide_check_version_new_authorization_header.mdx │ ├── code_samples_updating_guide_check_version_old_authorization_header.mdx │ ├── code_samples_updating_guide_create_dump.mdx │ ├── code_samples_updating_guide_get_displayed_attributes_old_authorization_header.mdx │ └── code_samples_updating_guide_reset_displayed_attributes_old_authorization_header.mdx └── style.css /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Notify integrations team about updates to code samples 2 | .code-samples.meilisearch.yaml @meilisearch/integration-team 3 | 4 | # Content maintained by DevRel 5 | /learn/front_end/react_instantsearch.mdx @meilisearch/devrel-team 6 | /learn/cookbooks/vercel.mdx @CaroFG 7 | 8 | # Content maintained by Product 9 | /learn/resources/comparison_to_alternatives.mdx @meilisearch/product-team 10 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Set update schedule for GitHub Actions only 2 | 3 | version: 2 4 | updates: 5 | - package-ecosystem: "github-actions" 6 | directory: "/" 7 | schedule: 8 | interval: "monthly" 9 | labels: 10 | - 'dependencies' 11 | rebase-strategy: disabled 12 | -------------------------------------------------------------------------------- /.github/workflows/code-sample-automation.yml: -------------------------------------------------------------------------------- 1 | name: Add PR to Code Samples Changes project 2 | 3 | on: 4 | pull_request_target: 5 | types: [opened, edited, synchronize] 6 | paths: 7 | - '.code-samples.meilisearch.yaml' 8 | 9 | jobs: 10 | add-pr-to-project: 11 | runs-on: ubuntu-22.04 12 | steps: 13 | - uses: actions/add-to-project@5b1a254a3546aef88e0a7724a77a623fa2e47c36 14 | with: 15 | project-url: https://github.com/orgs/meilisearch/projects/44 16 | github-token: ${{ secrets.GH_TOKEN }} 17 | -------------------------------------------------------------------------------- /.github/workflows/pull-code-samples.yml: -------------------------------------------------------------------------------- 1 | name: Pull Code Samples 2 | 3 | on: 4 | push: 5 | branches: 6 | - '**' # Runs on all branches 7 | 8 | jobs: 9 | update-samples: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Checkout repository 14 | uses: actions/checkout@v4 15 | 16 | - name: Setup Node.js 17 | uses: actions/setup-node@v4 18 | with: 19 | node-version: '18' 20 | cache: 'npm' 21 | 22 | - name: Install dependencies 23 | run: npm install 24 | 25 | - name: Run pull-code-samples script 26 | run: node scripts/pull-code-samples.mjs 27 | 28 | - name: Commit changes 29 | run: | 30 | git config --local user.email "github-actions[bot]@users.noreply.github.com" 31 | git config --local user.name "github-actions[bot]" 32 | git add snippets/ 33 | git diff --quiet && git diff --staged --quiet || git commit -m "Update code samples [skip ci]" 34 | git push -------------------------------------------------------------------------------- /.github/workflows/scraper.yml: -------------------------------------------------------------------------------- 1 | name: Run scraper and update docs search 2 | on: 3 | push: 4 | branches: 5 | - main 6 | 7 | jobs: 8 | await-mintlify-deploy: 9 | runs-on: ubuntu-22.04 10 | steps: 11 | - name: Wait for Mintlify deployment 12 | run: | 13 | sleep 30 14 | 15 | scrape-docs: 16 | needs: await-mintlify-deploy 17 | runs-on: ubuntu-22.04 18 | name: scrape and push content on Meilisearch instance 19 | steps: 20 | - uses: actions/checkout@v4 21 | 22 | - name: Prepare config file 23 | run: | 24 | jq '.custom_settings.embedders.default.apiKey = "${{ secrets.OPENAI_API_KEY }}"' "${{ github.workspace }}/docs-scraper.config.json" > "${{ github.workspace }}/temp-config.json" && mv "${{ github.workspace }}/temp-config.json" "${{ github.workspace }}/docs-scraper.config.json" 25 | 26 | - name: Run docs-scraper 27 | env: 28 | HOST_URL: ${{ secrets.MEILISEARCH_HOST_URL }} 29 | API_KEY: ${{ secrets.MEILISEARCH_API_KEY }} 30 | CONFIG_FILE_PATH: ${{ github.workspace }}/docs-scraper.config.json 31 | run: | 32 | docker run -t --rm \ 33 | -e MEILISEARCH_HOST_URL=$HOST_URL \ 34 | -e MEILISEARCH_API_KEY=$API_KEY \ 35 | -v $CONFIG_FILE_PATH:/docs-scraper/config.json \ 36 | getmeili/docs-scraper:v0.12.8 pipenv run ./docs_scraper config.json 37 | -------------------------------------------------------------------------------- /.markdownlint.jsonc: -------------------------------------------------------------------------------- 1 | { 2 | "MD001": true, // heading-increment/header-increment Heading levels should only increment by one level at a time 3 | "MD013": false, // line-length Line length [Expected: 80; Actual: 119] 4 | "MD014": false, // commands-show-output Dollar signs used before commands without showing output 5 | "MD024": false, // no-duplicate-heading/no-duplicate-header 6 | "MD025": {"front_matter_title": "(?!.*)"}, // single-title/single-h1 Accept both h1 and front matter titles 7 | "MD033": false, // no-inline-html Inline HTML 8 | "MD034": false, // allow bare URLs 9 | "MD040": false, // fenced-code-language Fenced code blocks should have a language specified 10 | "MD049": { "style": "underscore" }, // enforce use of underscore for em/italics 11 | "MD050": { "style": "asterisk" }, // enforce use of asterisk for strong/bold 12 | "MD051": false 13 | } 14 | -------------------------------------------------------------------------------- /.markdownlintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | scripts 3 | snippets 4 | assets 5 | README.md 6 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 23 2 | -------------------------------------------------------------------------------- /.vale.ini: -------------------------------------------------------------------------------- 1 | StylesPath = .vale/styles 2 | MinAlertLevel = suggestion 3 | 4 | Vocab = word_list 5 | 6 | [formats] 7 | mdx = md 8 | 9 | [*.md] 10 | BasedOnStyles = Meilisearch 11 | SkippedScopes = script, style, pre, figure, CodeSamples, ImageComp, RouteHighlighter 12 | BlockIgnores = (?s)(^---$.*^---$) 13 | TokenIgnores = (<\/?[A-Z].+>) 14 | -------------------------------------------------------------------------------- /.vale/styles/Meilisearch/British.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Suggestion: Meilisearch.British.yml 3 | # Checks for American spelling 4 | # 5 | extends: substitution 6 | message: 'Use the American spelling "%s" instead of the British "%s".' 7 | link: https://about.gitlab.com/handbook/communication/#top-misused-terms 8 | level: suggestion 9 | ignorecase: true 10 | swap: 11 | analyse: analyze 12 | behaviour: behavior 13 | centre: center 14 | colour: color 15 | dependant: dependent 16 | favourite: favorite 17 | initialled: initialed 18 | initialling: initialing 19 | labelling: labeling 20 | labelled: labeled 21 | programme: program 22 | licence: license 23 | cancelled: canceled 24 | cancellation: cancelation 25 | -------------------------------------------------------------------------------- /.vale/styles/Meilisearch/FirstPerson.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Suggestion: Meilisearch.FirstPerson 3 | 4 | # We want to avoid using singular first person pronouns 5 | extends: existence 6 | message: "Avoid first-person pronouns such as '%s' unless writing FAQs" 7 | link: 'https://developers.google.com/style/pronouns#personal-pronouns' 8 | ignorecase: true 9 | level: suggestion 10 | nonword: true 11 | tokens: 12 | - (?:^|\s)I\s 13 | - (?:^|\s)I,\s 14 | - \bI'm\b 15 | - \bme\b 16 | - \bmy\b 17 | - \bmine\b 18 | -------------------------------------------------------------------------------- /.vale/styles/Meilisearch/Headings.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Suggestion: Meilisearch.Headings.yml 3 | 4 | # Our headings should use sentence-style capitalization. The exceptions include any headings that maybe a list, start with "Step 1: Do this", and the list of words below 5 | extends: capitalization 6 | message: "'%s' should use sentence-style capitalization." 7 | link: 'https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings' 8 | level: suggestion 9 | scope: heading 10 | match: $sentence 11 | indicators: 12 | - ':' 13 | - '.' 14 | exceptions: 15 | - Azure 16 | - CLI 17 | - Code 18 | - Docker 19 | - SDK 20 | - SDKs 21 | - Kubernetes 22 | - Linux 23 | - macOS 24 | - Marketplace 25 | - MongoDB 26 | - TypeScript 27 | - URLs 28 | - Visual 29 | - VS 30 | - Windows 31 | - Meilisearch 32 | - AWS 33 | - Amazon Web Services 34 | - DigitalOcean 35 | - GCP 36 | - Qovery 37 | - GCP 38 | - Google Cloud Platform 39 | - Compute Engine 40 | - GitHub 41 | - JSON 42 | - API 43 | - VuePress 44 | - OpenAPI 45 | - Elasticsearch 46 | - Algolia 47 | - DevOps 48 | - Lucene-Solr 49 | - App Service Auto-Scale 50 | - Certbot 51 | - Bleve & Tantivy 52 | - Google Cloud Console 53 | - AMIs 54 | - '\b\s[0-9]:\s[A-Z]' # Step 1: Do this 55 | - '[0-9]\.\s[A-Z]' # 1. Do this 56 | - 'v[0-9][.][0-9]{1,2}' # e.g. v0.17 57 | #- '"(.*?)"' #Ignore text in "" 58 | -------------------------------------------------------------------------------- /.vale/styles/Meilisearch/Indexing.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Error: Meilisearch.indexing.yml 3 | 4 | # Most dictionaries still list "indexation" as a term with a very specific meaning in economy so we should use “indexing” 5 | extends: substitution 6 | message: "Use '%s' instead of '%s'." 7 | level: warning 8 | swap: 9 | indexation: indexing 10 | -------------------------------------------------------------------------------- /.vale/styles/Meilisearch/LatinTerms.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Error: Meilisearch.LatinTerms.yml 3 | 4 | # Avoid Latin terms like `i.e.` and `e.g.` as everyone does not understand them 5 | extends: substitution 6 | message: "Use '%s' instead of '%s', but consider rewriting the sentence." 7 | link: https://developers.google.com/style/abbreviations#dont-use 8 | level: warning 9 | nonword: true 10 | ignorecase: true 11 | swap: 12 | e\.g\.: for example 13 | e\. g\.: for example 14 | e\.g: for example 15 | i\.e\.: that is 16 | i\. e\.: that is 17 | i\.e: that is 18 | -------------------------------------------------------------------------------- /.vale/styles/Meilisearch/MergeConflictMarkers.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Error: Meilisearch.MergeConflictMarkers.yml 3 | 4 | # Checks for the presence of merge conflict markers. 5 | extends: existence 6 | message: 'Merge conflict marker "%s" found.' 7 | link: https://docs.gitlab.com/ee/development/code_review.html#merging-a-merge-request 8 | level: error 9 | scope: raw 10 | raw: 11 | - '\n<<<<<<< .+\n|\n=======\n|\n>>>>>>> .+\n' 12 | -------------------------------------------------------------------------------- /.vale/styles/Meilisearch/OxfordComma.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Suggestion: Meilisearch.OxfordComma.yml 3 | 4 | # Use the Oxford comma, this may not work as intended for complex sentences with many commas 5 | extends: existence 6 | message: "Use the Oxford comma in '%s'." 7 | link: 'https://developers.google.com/style/commas' 8 | scope: sentence 9 | level: suggestion 10 | tokens: 11 | - '(?:[^,]+,){1,}\s\w+\s(?:and|or)' 12 | -------------------------------------------------------------------------------- /.vale/styles/Meilisearch/Periods.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Suggestion: Meilisearch.Period.yml 3 | 4 | # Don't use periods with acronyms. "H.T.M.L" is incorrect, HTML isn't 5 | 6 | extends: existence 7 | message: "Don't use periods with acronyms or initialisms such as '%s'." 8 | link: 'https://developers.google.com/style/abbreviations' 9 | level: suggestion 10 | nonword: true 11 | tokens: 12 | - '\b(?:[A-Z]\.){3,}' 13 | -------------------------------------------------------------------------------- /.vale/styles/Meilisearch/Repetition.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Error: Meilisearch.Repetition.yml 3 | 4 | # catch any instances of repeated words. E.g., "This is is a sentence" 5 | extends: repetition 6 | message: "'%s' is repeated." 7 | level: error 8 | alpha: true 9 | tokens: 10 | - '[^\s]+' 11 | -------------------------------------------------------------------------------- /.vale/styles/Meilisearch/Semicolons.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Suggestion: Meilisearch.Semicolons.yml 3 | 4 | # If your sentence uses a semicolon, you should break it into two sentences or rewrite it to avoid super long sentences. 5 | extends: existence 6 | message: "Use semicolons judiciously." 7 | link: 'https://developers.google.com/style/semicolons' 8 | nonword: true 9 | scope: sentence 10 | level: suggestion 11 | tokens: 12 | - ';' 13 | -------------------------------------------------------------------------------- /.vale/styles/Meilisearch/SentenceLength.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Warning: Meilisearch.SentenceLength 3 | 4 | # Counts words in a sentence and alerts if a sentence exceeds 40 words. 5 | extends: occurrence 6 | message: 'Shorter sentences improve readability (max 40 words).' 7 | scope: sentence 8 | link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#language 9 | level: warning 10 | max: 40 11 | token: \b(\w+)\b 12 | 13 | -------------------------------------------------------------------------------- /.vale/styles/Meilisearch/Spacing.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Error: Meilisearch.Spacing.yml 3 | 4 | # Use a space between words, sentences, and punctuation marks 5 | extends: existence 6 | message: "'%s' should have one space." 7 | link: https://docs.microsoft.com/en-us/style-guide/punctuation/periods 8 | level: error 9 | nonword: true 10 | tokens: 11 | - '[a-z]\s{2,}[a-z]' # ensure only one space between words 12 | - '[a-z][.?!:;",] {2,}[A-Z]' # one space between sentences (end. new) 13 | - '[a-z][.?!:;",][A-Z]' #(end.new) 14 | - '[\w.?!,\(\)\-":] {2,}[\w.?!,\(\)\-":]' #only one space after ,.? 15 | -------------------------------------------------------------------------------- /.vale/styles/Meilisearch/Spelling.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Warning: Meilisearch.Spelling.yml 3 | 4 | # Checks if your words exist in the dictionary. Any exceptions (including Meilisearch) should be defined in `styles/Vocab/word_list/accept.txt` 5 | extends: spelling 6 | message: "Did you really mean '%s'?" 7 | level: warning 8 | filters: 9 | - 'Vale.*\b' 10 | -------------------------------------------------------------------------------- /.vale/styles/Meilisearch/Typos.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Error: Meilisearch.Typos.yml 3 | 4 | # Lists any possible typos and the correct spelling 5 | extends: substitution 6 | message: "Use '%s' instead of '%s'." 7 | level: error 8 | swap: 9 | MeiliSearch: Meilisearch 10 | MieliSearch: Meilisearch 11 | meiliSearch: Meilisearch 12 | od: of 13 | -------------------------------------------------------------------------------- /.vale/styles/Meilisearch/URLFormat.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Warning: Meilisearch.URLFormat.yml 3 | 4 | # Use "a URL"/"an HTML" instead of "an URL"/"a HTML" 5 | extends: substitution 6 | message: "Use '%s' instead of '%s'." 7 | ignorecase: true 8 | level: warning 9 | action: 10 | name: replace 11 | swap: 12 | URL for: URL of 13 | an URL: a URL 14 | a HTML: an HTML 15 | -------------------------------------------------------------------------------- /.vale/styles/Vocab/word_list/reject.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/.vale/styles/Vocab/word_list/reject.txt -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019-2025 Meili SAS 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | 4 |

5 | 6 |

Meilisearch Documentation

7 | 8 |

9 | Website | 10 | Roadmap | 11 | Blog | 12 | Documentation | 13 | FAQ | 14 | Discord 15 |

16 | 17 | This repository is the documentation for the **open-source search engine API [Meilisearch](https://github.com/meilisearch/meilisearch)**. 18 | 19 | ## Contributing 20 | 21 | Hey, thank you so much for wanting to contribute! If you'd like to help improve this documentation, we'd love to have you! 22 | 23 | For more information, see the [contributing overview](/learn/resources/contributing_docs.mdx). 24 | 25 | ## Contact 26 | 27 | Feel free to contact us about any questions you may have: 28 | 29 | - Join our [Discord community](https://discord.meilisearch.com). 30 | - Open an [issue](https://github.com/meilisearch/documentation/issues)! 31 | 32 | Any suggestion or feedback is highly appreciated. Thank you for your support! 33 | -------------------------------------------------------------------------------- /assets/datasets/crm-chats.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": 0, 4 | "client_name": "Natasha Nguyen", 5 | "message": "My email is natasha.nguyen@example.com", 6 | "time": 1727349362 7 | }, 8 | { 9 | "id": 1, 10 | "client_name": "Riccardo Rotondo", 11 | "message": "No, I changed my email, it's no longer rotondino@example.com, the one you see on my profile is the right one", 12 | "time": 1726344418 13 | } 14 | ] 15 | -------------------------------------------------------------------------------- /assets/datasets/crm-profiles.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": 0, 4 | "name": "Natasha Nguyen", 5 | "email": "natasha.nguyen@example.com" 6 | }, 7 | { 8 | "id": 1, 9 | "name": "Riccardo Rotondo", 10 | "email": "riccardo.rotondo@example.com" 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /assets/datasets/crm-tickets.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": 0, 4 | "time": 1727349362, 5 | "client_name": "Natasha Nguyen", 6 | "type": "complaint", 7 | "title": "I'm not receiving any emails" 8 | }, 9 | { 10 | "id": 1, 11 | "time": 1701448312, 12 | "client_name": "Riccardo Rotondo", 13 | "type": "support", 14 | "title": "Please remove my email from your mailing list" 15 | } 16 | ] 17 | -------------------------------------------------------------------------------- /assets/datasets/kitchenware.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": 0, 4 | "name": "Wooden spoon", 5 | "price": 1.50 6 | }, 7 | { 8 | "id": 1, 9 | "name": "Microwave lid", 10 | "price": 1.00 11 | }, 12 | { 13 | "id": 2, 14 | "name": "Wooden chopping board", 15 | "price": 9.50 16 | }, 17 | { 18 | "id": 3, 19 | "name": "Plastic chopping board", 20 | "price": 1.50 21 | }, 22 | { 23 | "id": 4, 24 | "name": "Rolling pin", 25 | "price": 2.50 26 | } 27 | ] 28 | -------------------------------------------------------------------------------- /assets/datasets/restaurants.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": 1, 4 | "name": "Nàpiz' Milano", 5 | "address": "Viale Vittorio Veneto, 30, 20124, Milan, Italy", 6 | "type": "pizza", 7 | "rating": 9, 8 | "_geo": { 9 | "lat": 45.4777599, 10 | "lng": 9.1967508 11 | } 12 | }, 13 | { 14 | "id": 2, 15 | "name": "Bouillon Pigalle", 16 | "address": "22 Bd de Clichy, 75018 Paris, France", 17 | "type": "french", 18 | "rating": 8, 19 | "_geo": { 20 | "lat": 48.8826517, 21 | "lng": 2.3352748 22 | } 23 | }, 24 | { 25 | "id": 3, 26 | "name": "Artico Gelateria Tradizionale", 27 | "address": "Via Dogana, 1, 20123 Milan, Italy", 28 | "type": "ice cream", 29 | "rating": 10, 30 | "_geo": { 31 | "lat": 45.4632046, 32 | "lng": 9.1719421 33 | } 34 | } 35 | ] 36 | -------------------------------------------------------------------------------- /assets/datasets/videogames.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": 0, 4 | "title": "Return of the Obra Dinn", 5 | "genre": "adventure", 6 | "release_timestamp": 1538949600 7 | }, 8 | { 9 | "id": 1, 10 | "title": "The Excavation of Hob's Barrow", 11 | "genre": "adventure", 12 | "release_timestamp": 1664316000 13 | }, 14 | { 15 | "id": 2, 16 | "title": "Bayonetta 2", 17 | "genre": "action", 18 | "release_timestamp": 1411164000 19 | } 20 | ] 21 | -------------------------------------------------------------------------------- /assets/images/aws/01.launch-instances.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/aws/01.launch-instances.png -------------------------------------------------------------------------------- /assets/images/aws/02.select-ami.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/aws/02.select-ami.png -------------------------------------------------------------------------------- /assets/images/aws/03.size-and-specs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/aws/03.size-and-specs.png -------------------------------------------------------------------------------- /assets/images/aws/04.instance-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/aws/04.instance-details.png -------------------------------------------------------------------------------- /assets/images/aws/05.storage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/aws/05.storage.png -------------------------------------------------------------------------------- /assets/images/aws/06.tags.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/aws/06.tags.png -------------------------------------------------------------------------------- /assets/images/aws/07.security.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/aws/07.security.png -------------------------------------------------------------------------------- /assets/images/aws/08.key-pair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/aws/08.key-pair.png -------------------------------------------------------------------------------- /assets/images/aws/09.launch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/aws/09.launch.png -------------------------------------------------------------------------------- /assets/images/aws/10.enjoy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/aws/10.enjoy.png -------------------------------------------------------------------------------- /assets/images/aws/11.domain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/aws/11.domain.png -------------------------------------------------------------------------------- /assets/images/azure/01.azure-deploy-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/azure/01.azure-deploy-button.png -------------------------------------------------------------------------------- /assets/images/azure/02.azure-output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/azure/02.azure-output.png -------------------------------------------------------------------------------- /assets/images/cloud-analytics/01-analytics-enable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-analytics/01-analytics-enable.png -------------------------------------------------------------------------------- /assets/images/cloud-analytics/02-analytics-disable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-analytics/02-analytics-disable.png -------------------------------------------------------------------------------- /assets/images/cloud-dumps/01-export-dump.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-dumps/01-export-dump.png -------------------------------------------------------------------------------- /assets/images/cloud-dumps/02-import-dump.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-dumps/02-import-dump.png -------------------------------------------------------------------------------- /assets/images/cloud-getting-started/1-new-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-getting-started/1-new-project.png -------------------------------------------------------------------------------- /assets/images/cloud-getting-started/10-index-list-filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-getting-started/10-index-list-filled.png -------------------------------------------------------------------------------- /assets/images/cloud-getting-started/11-index-list-breadcrumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-getting-started/11-index-list-breadcrumb.png -------------------------------------------------------------------------------- /assets/images/cloud-getting-started/12-project-page-url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-getting-started/12-project-page-url.png -------------------------------------------------------------------------------- /assets/images/cloud-getting-started/13-search-preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-getting-started/13-search-preview.png -------------------------------------------------------------------------------- /assets/images/cloud-getting-started/2-create-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-getting-started/2-create-project.png -------------------------------------------------------------------------------- /assets/images/cloud-getting-started/3-project-billing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-getting-started/3-project-billing.png -------------------------------------------------------------------------------- /assets/images/cloud-getting-started/4-project-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-getting-started/4-project-list.png -------------------------------------------------------------------------------- /assets/images/cloud-getting-started/5-project-page-menu-indexes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-getting-started/5-project-page-menu-indexes.png -------------------------------------------------------------------------------- /assets/images/cloud-getting-started/6-index-list-empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-getting-started/6-index-list-empty.png -------------------------------------------------------------------------------- /assets/images/cloud-getting-started/7-create-index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-getting-started/7-create-index.png -------------------------------------------------------------------------------- /assets/images/cloud-getting-started/8-file-upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-getting-started/8-file-upload.png -------------------------------------------------------------------------------- /assets/images/cloud-getting-started/9-data-import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-getting-started/9-data-import.png -------------------------------------------------------------------------------- /assets/images/cloud-index-settings/01-indexes-tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-index-settings/01-indexes-tab.png -------------------------------------------------------------------------------- /assets/images/cloud-index-settings/02-index-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-index-settings/02-index-settings.png -------------------------------------------------------------------------------- /assets/images/cloud-index-settings/03-general-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-index-settings/03-general-settings.png -------------------------------------------------------------------------------- /assets/images/cloud-index-settings/04-searchable-attributes-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-index-settings/04-searchable-attributes-default.png -------------------------------------------------------------------------------- /assets/images/cloud-index-settings/05-searchable-attributes-delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-index-settings/05-searchable-attributes-delete.png -------------------------------------------------------------------------------- /assets/images/cloud-index-settings/06-searchable-attributes-confirm-deletion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-index-settings/06-searchable-attributes-confirm-deletion.png -------------------------------------------------------------------------------- /assets/images/cloud-index-settings/07-searchable-attributes-attribute-deleted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-index-settings/07-searchable-attributes-attribute-deleted.png -------------------------------------------------------------------------------- /assets/images/cloud-index-settings/08-searchable-attributes-reset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-index-settings/08-searchable-attributes-reset.png -------------------------------------------------------------------------------- /assets/images/cloud-migration/1-new-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-migration/1-new-project.png -------------------------------------------------------------------------------- /assets/images/cloud-migration/2-import-dump.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-migration/2-import-dump.png -------------------------------------------------------------------------------- /assets/images/cloud-tasks-tutorial/01-tasks-menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-tasks-tutorial/01-tasks-menu.png -------------------------------------------------------------------------------- /assets/images/cloud-tasks-tutorial/02-tasks-table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/cloud-tasks-tutorial/02-tasks-table.png -------------------------------------------------------------------------------- /assets/images/demos/saas-demo-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/demos/saas-demo-screenshot.png -------------------------------------------------------------------------------- /assets/images/digitalocean/add-domain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/digitalocean/add-domain.png -------------------------------------------------------------------------------- /assets/images/digitalocean/add-ssh-key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/digitalocean/add-ssh-key.png -------------------------------------------------------------------------------- /assets/images/digitalocean/add-tags.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/digitalocean/add-tags.png -------------------------------------------------------------------------------- /assets/images/digitalocean/copy-ip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/digitalocean/copy-ip.png -------------------------------------------------------------------------------- /assets/images/digitalocean/create-droplet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/digitalocean/create-droplet.png -------------------------------------------------------------------------------- /assets/images/digitalocean/create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/digitalocean/create.png -------------------------------------------------------------------------------- /assets/images/digitalocean/domain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/digitalocean/domain.png -------------------------------------------------------------------------------- /assets/images/digitalocean/droplet-name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/digitalocean/droplet-name.png -------------------------------------------------------------------------------- /assets/images/digitalocean/marketplace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/digitalocean/marketplace.png -------------------------------------------------------------------------------- /assets/images/digitalocean/select-plan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/digitalocean/select-plan.png -------------------------------------------------------------------------------- /assets/images/digitalocean/select-region.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/digitalocean/select-region.png -------------------------------------------------------------------------------- /assets/images/digitalocean/test-meili.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/digitalocean/test-meili.png -------------------------------------------------------------------------------- /assets/images/faceted-search/conjunctive-and-disjunctive-facets.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/faceted-search/conjunctive-and-disjunctive-facets.gif -------------------------------------------------------------------------------- /assets/images/faceted-search/conjunctive-factes.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/faceted-search/conjunctive-factes.gif -------------------------------------------------------------------------------- /assets/images/faceted-search/disjunctive_facets.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/faceted-search/disjunctive_facets.gif -------------------------------------------------------------------------------- /assets/images/faceted-search/facets-ecommerce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/faceted-search/facets-ecommerce.png -------------------------------------------------------------------------------- /assets/images/gcp/01.compute-engine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/gcp/01.compute-engine.png -------------------------------------------------------------------------------- /assets/images/gcp/02.image-info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/gcp/02.image-info.png -------------------------------------------------------------------------------- /assets/images/gcp/03.import-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/gcp/03.import-image.png -------------------------------------------------------------------------------- /assets/images/gcp/04.create-instance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/gcp/04.create-instance.png -------------------------------------------------------------------------------- /assets/images/gcp/05.machine-configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/gcp/05.machine-configuration.png -------------------------------------------------------------------------------- /assets/images/gcp/06.boot-disk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/gcp/06.boot-disk.png -------------------------------------------------------------------------------- /assets/images/gcp/07.instance-running.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/gcp/07.instance-running.png -------------------------------------------------------------------------------- /assets/images/gcp/08.domain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/gcp/08.domain.png -------------------------------------------------------------------------------- /assets/images/movies-demo-dark.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/movies-demo-dark.gif -------------------------------------------------------------------------------- /assets/images/postman/create_index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/postman/create_index.png -------------------------------------------------------------------------------- /assets/images/postman/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/postman/edit.png -------------------------------------------------------------------------------- /assets/images/postman/import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/postman/import.png -------------------------------------------------------------------------------- /assets/images/postman/set_token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/postman/set_token.png -------------------------------------------------------------------------------- /assets/images/postman/set_variables.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/postman/set_variables.png -------------------------------------------------------------------------------- /assets/images/postman/url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/postman/url.png -------------------------------------------------------------------------------- /assets/images/rails_quick_start/rails-qs-search-preview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/rails_quick_start/rails-qs-search-preview.gif -------------------------------------------------------------------------------- /assets/images/railway/public-url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/railway/public-url.png -------------------------------------------------------------------------------- /assets/images/ranking-rules/belgium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/ranking-rules/belgium.png -------------------------------------------------------------------------------- /assets/images/ranking-rules/knight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/ranking-rules/knight.png -------------------------------------------------------------------------------- /assets/images/ranking-rules/new_road.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/ranking-rules/new_road.png -------------------------------------------------------------------------------- /assets/images/ranking-rules/vogli3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/ranking-rules/vogli3.png -------------------------------------------------------------------------------- /assets/images/react_quick_start/react-qs-search-ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/react_quick_start/react-qs-search-ui.png -------------------------------------------------------------------------------- /assets/images/search_preview/01-search-preview-menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/search_preview/01-search-preview-menu.png -------------------------------------------------------------------------------- /assets/images/search_preview/02-select-index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/search_preview/02-select-index.png -------------------------------------------------------------------------------- /assets/images/search_preview/03-basic-search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/search_preview/03-basic-search.png -------------------------------------------------------------------------------- /assets/images/search_preview/04-score.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/search_preview/04-score.png -------------------------------------------------------------------------------- /assets/images/search_preview/05-sidebar-options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/search_preview/05-sidebar-options.png -------------------------------------------------------------------------------- /assets/images/search_preview/06-sidebar-options-advanced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/search_preview/06-sidebar-options-advanced.png -------------------------------------------------------------------------------- /assets/images/search_preview/07-sidebar-options-export.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/search_preview/07-sidebar-options-export.png -------------------------------------------------------------------------------- /assets/images/security/01-master-api-keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/security/01-master-api-keys.png -------------------------------------------------------------------------------- /assets/images/similar-guide/01-add-embedder-ui.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/similar-guide/01-add-embedder-ui.gif -------------------------------------------------------------------------------- /assets/images/strapi-v4/strapi-add-category.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/strapi-v4/strapi-add-category.png -------------------------------------------------------------------------------- /assets/images/strapi-v4/strapi-add-collection-to-meilisearch.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/strapi-v4/strapi-add-collection-to-meilisearch.gif -------------------------------------------------------------------------------- /assets/images/strapi-v4/strapi-dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/strapi-v4/strapi-dashboard.png -------------------------------------------------------------------------------- /assets/images/strapi-v4/strapi-meilisearch-credentials.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/strapi-v4/strapi-meilisearch-credentials.png -------------------------------------------------------------------------------- /assets/images/strapi-v4/strapi-meilisearch-plugin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/strapi-v4/strapi-meilisearch-plugin.png -------------------------------------------------------------------------------- /assets/images/strapi-v4/strapi-restaurant-content-type.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/strapi-v4/strapi-restaurant-content-type.png -------------------------------------------------------------------------------- /assets/images/strapi-v4/strapi-search-preview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/strapi-v4/strapi-search-preview.gif -------------------------------------------------------------------------------- /assets/images/strapi-v4/strapi-signup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/strapi-v4/strapi-signup.png -------------------------------------------------------------------------------- /assets/images/tuto-searchbar-for-docs/docxtemplater-searchbar-demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/tuto-searchbar-for-docs/docxtemplater-searchbar-demo.gif -------------------------------------------------------------------------------- /assets/images/tuto-searchbar-for-docs/vuepress-plugin-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/tuto-searchbar-for-docs/vuepress-plugin-example.png -------------------------------------------------------------------------------- /assets/images/tuto-searchbar-for-docs/vuepress-searchbar-demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/tuto-searchbar-for-docs/vuepress-searchbar-demo.gif -------------------------------------------------------------------------------- /assets/images/updating/update-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/updating/update-button.png -------------------------------------------------------------------------------- /assets/images/updating/update-in-progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/updating/update-in-progress.png -------------------------------------------------------------------------------- /assets/images/vercel/01.create-new-project-on-vercel-dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/vercel/01.create-new-project-on-vercel-dashboard.png -------------------------------------------------------------------------------- /assets/images/vercel/02.project-settings-integrations-tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/vercel/02.project-settings-integrations-tab.png -------------------------------------------------------------------------------- /assets/images/vercel/03.meilisearch-cloud-integration-page-in-marketplace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/vercel/03.meilisearch-cloud-integration-page-in-marketplace.png -------------------------------------------------------------------------------- /assets/images/vercel/04.add-meilisearch-cloud-form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/vercel/04.add-meilisearch-cloud-form.png -------------------------------------------------------------------------------- /assets/images/vercel/05.create-a-meilisearch-cloud-project-form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/vercel/05.create-a-meilisearch-cloud-project-form.png -------------------------------------------------------------------------------- /assets/images/vercel/06.meilisearch-cloud-integration-page-in-vercel-dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/vercel/06.meilisearch-cloud-integration-page-in-vercel-dashboard.png -------------------------------------------------------------------------------- /assets/images/vercel/07.project-settings-environment-variables-tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/vercel/07.project-settings-environment-variables-tab.png -------------------------------------------------------------------------------- /assets/images/vercel/08.meilisearch-cloud-dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meilisearch/documentation/23c2bd55341eaad98eabc691b7c61a44c8207396/assets/images/vercel/08.meilisearch-cloud-dashboard.png -------------------------------------------------------------------------------- /assets/repo/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /cookieyes-banner.js: -------------------------------------------------------------------------------- 1 | const cookieyesSrc = "https://cdn-cookieyes.com/client_data/0ec5a8e516eccaa724a461f6/script.js"; 2 | const bannerId = "cookieyes"; 3 | 4 | function createBanner() { 5 | const el = document.createElement("script"); 6 | el.src = cookieyesSrc; 7 | el.id = bannerId; 8 | el.type = "text/javascript"; 9 | 10 | document.head.appendChild(el); 11 | } 12 | 13 | createBanner(); 14 | -------------------------------------------------------------------------------- /home.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Documentation 3 | sidebarTitle: Home 4 | description: Discover our guides, examples, and APIs to build fast and relevant search experiences with Meilisearch. 5 | --- 6 | 7 | ## Overview 8 | 9 | 10 | 11 | Get an overview of Meilisearch features and philosophy. 12 | 13 | 14 | See how Meilisearch compares to alternatives. 15 | 16 | 17 | Use Meilisearch with your favorite language and framework. 18 | 19 | 20 | 21 | ## Use case demos 22 | 23 | Take at look at example applications built with Meilisearch. 24 | 25 | 26 | 27 | Search through multiple Eloquent models with Laravel. 28 | 29 | 30 | Browse millions of products in our Nuxt 3 e-commerce demo app. 31 | 32 | 33 | Search across the TMDB movies databases using Next.js. 34 | 35 | 36 | -------------------------------------------------------------------------------- /learn/analytics/deactivate_analytics_monitoring.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Deactivate search analytics and monitoring 3 | sidebarTitle: Deactivate search analytics and monitoring 4 | description: Meilisearch Cloud offers in-depth search analytics to help you understand how users search in your application. 5 | --- 6 | 7 | This guide shows you how to deactivate Meilisearch Cloud's search analytics and monitoring. 8 | 9 | ## Disable analytics and monitoring in the project overview 10 | 11 | Log into your Meilisearch Cloud account and navigate to your project's overview. Find the "Analytics and monitoring" section and press the "Disable analytics and monitoring" button: 12 | 13 | 14 | The analytics section of the project overview. It shows one button, 'Disable analytics and monitoring', and a short explanation of both features. 15 | 16 | 17 | ## Update URLs in your application 18 | 19 | Disabling analytics and monitoring changes your API URL. Update your application so all API requests point to the correct URL: 20 | 21 | ```sh 22 | curl \ 23 | -X POST 'https://PROJECT_URL/indexes/products/search' \ 24 | -H 'Content-Type: application/json' \ 25 | --data-binary '{ "q": "green socks" }' 26 | ``` 27 | 28 | **The previous API URL will remain functional**, but Meilisearch recommends not using it after disabling analytics in your project. If you created any custom API keys using the previous URL, you will need to replace them. 29 | 30 | ## Update `conversion` and `click` events 31 | 32 | If you were tracking `conversion` and `click` events, update your application to stop sending them to Meilisearch Cloud. 33 | -------------------------------------------------------------------------------- /learn/security/protected_unprotected.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Protected and unprotected Meilisearch projects 3 | sidebarTitle: Protected and unprotected projects 4 | description: This article explains the differences between protected and unprotected Meilisearch projects and instances. 5 | --- 6 | 7 | This article explains the differences between protected and unprotected Meilisearch projects and instances. 8 | 9 | ## Protected projects 10 | 11 | In protected projects, all Meilisearch API routes and endpoints can only be accessed by requests bearing an API key. The only exception to this rule is the `/health` endpoint, which may still be queried with unauthorized requests. 12 | 13 | **Meilisearch Cloud projects are protected by default**. Self-hosted instances are only protected if you launch them with a master key. 14 | 15 | Consult the [basic security tutorial](/learn/security/basic_security) for instructions on how to communicate with protected projects. 16 | 17 | ## Unprotected projects 18 | 19 | In unprotected projects and self-hosted instances, any user may access any API endpoint. Never leave a publicly accessible instance unprotected. Only use unprotected instances in safe development environments. 20 | 21 | Meilisearch Cloud projects are always protected. Meilisearch self-hosted instances are unprotected by default. 22 | -------------------------------------------------------------------------------- /learn/security/resetting_master_key.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Resetting the master key 3 | sidebarTitle: Resetting the master key 4 | description: This guide shows you how to reset the master key in Meilisearch Cloud and self-hosted instances. 5 | --- 6 | 7 | This guide shows you how to manage the master key in Meilisearch Cloud and self-hosted instances. Resetting the master key may be necessary if an unauthorized party obtains access to your master key. 8 | 9 | ## Resetting the master key in Meilisearch Cloud 10 | 11 | Meilisearch Cloud does not give users control over the master key. If you need to change your master key, contact support through the Cloud interface or on the official [Meilisearch Discord server](https://discord.meilisearch.com). 12 | 13 | 14 | Resetting the master key automatically invalidates all API keys. Meilisearch Cloud will generate new default API keys automatically. 15 | 16 | 17 | ## Resetting the master key in self-hosted instances 18 | 19 | To reset your master key in a self-hosted instance, relaunch your instance and pass a new value to `--master-key` or `MEILI_MASTER_KEY`. 20 | 21 | 22 | Resetting the master key automatically invalidates all API keys. Meilisearch Cloud will generate new default API keys automatically. 23 | 24 | -------------------------------------------------------------------------------- /learn/teams/teams.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Meilisearch Cloud teams 3 | sidebarTitle: Meilisearch Cloud teams 4 | description: Meilisearch Cloud teams helps collaboration between project stakeholders with different skillsets and responsibilities. 5 | --- 6 | 7 | Meilisearch Cloud teams are groups of users who all have access a to specific set of projects. This feature is designed to help collaboration between project stakeholders with different skillsets and responsibilities. 8 | 9 | When you open a new account, Meilisearch Cloud automatically creates a default team. A team may have any number of team members. 10 | 11 | ## Team roles and permissions 12 | 13 | There are two types of team members in Meilisearch Cloud teams: owners and regular team members. 14 | 15 | Team owners have full control over a project's administrative details. Only team owners may change a project's billing plan or update its billing information. Additionally, only team owners may rename a team, add and remove members from a team, or transfer team ownership. 16 | 17 | A team may only have one owner. 18 | 19 | ## Multiple teams in the same account 20 | 21 | If you are responsible for different applications belonging to multiple organizations, it might be useful to create separate teams. There are no limits for the amount of teams a single user may create. 22 | 23 | It is not possible to delete a team once you have created it. However, Meilisearch Cloud billing is based on projects and there are no costs associated with creating multiple teams. 24 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.14.0", 3 | "homepage": "https://meilisearch.com/docs", 4 | "license": "MIT", 5 | "repository": "meilisearch/documentation", 6 | "bugs": "https://github.com/meilisearch/documentation/issues", 7 | "dependencies": { 8 | "js-yaml": "^4.1.0", 9 | "node-fetch": "^2.7.0" 10 | }, 11 | "devDependencies": { 12 | "@ocular-d/vale-bin": "^2.29.6", 13 | "markdownlint-cli": "^0.37.0" 14 | }, 15 | "scripts": { 16 | "marklint": "markdownlint '**/*.mdx' --config .markdownlint.jsonc", 17 | "marklint:fix": "markdownlint '**/*.mdx' --config .markdownlint.jsonc --fix", 18 | "proselint": "vale --glob='!.github/*' ." 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /reference/api/dump.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Dumps 3 | sidebarTitle: Dumps 4 | description: The /dumps route allows the creation of database dumps. Use dumps to migrate Meilisearch to a new version. 5 | --- 6 | 7 | import { RouteHighlighter } from '/snippets/route_highlighter.mdx' 8 | 9 | import CodeSamplesPostDump1 from '/snippets/samples/code_samples_post_dump_1.mdx'; 10 | 11 | The `/dumps` route allows the creation of database dumps. Dumps are `.dump` files that can be used to restore Meilisearch data or migrate between different versions. 12 | 13 | 14 | Meilisearch Cloud does not support the `/dumps` route. 15 | 16 | 17 | [Learn more about dumps](/learn/data_backup/dumps). 18 | 19 | ## Create a dump 20 | 21 | 22 | 23 | Triggers a dump creation task. Once the process is complete, a dump is created in the [dump directory](/learn/self_hosted/configure_meilisearch_at_launch#dump-directory). If the dump directory does not exist yet, it will be created. 24 | 25 | Dump tasks take priority over all other tasks in the queue. This means that a newly created dump task will be processed as soon as the current task is finished. 26 | 27 | [Learn more about asynchronous operations](/learn/async/asynchronous_operations). 28 | 29 | ### Example 30 | 31 | 32 | 33 | #### Response: `202 Accepted` 34 | 35 | ```json 36 | { 37 | "taskUid": 1, 38 | "indexUid": null, 39 | "status": "enqueued", 40 | "type": "dumpCreation", 41 | "enqueuedAt": "2022-06-21T16:10:29.217688Z" 42 | } 43 | ``` 44 | 45 | You can use this `taskUid` to get more details on [the status of the task](/reference/api/tasks#get-one-task) 46 | -------------------------------------------------------------------------------- /reference/api/health.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Health 3 | sidebarTitle: Health 4 | description: The /health route allows you to verify the status and availability of a Meilisearch instance. 5 | --- 6 | 7 | import { RouteHighlighter } from '/snippets/route_highlighter.mdx' 8 | 9 | import CodeSamplesGetHealth1 from '/snippets/samples/code_samples_get_health_1.mdx'; 10 | 11 | The `/health` route allows you to verify the status and availability of a Meilisearch instance. 12 | 13 | ## Get health 14 | 15 | 16 | 17 | Get health of Meilisearch server. 18 | 19 | ### Example 20 | 21 | 22 | 23 | #### Response: `200 OK` 24 | 25 | ```json 26 | { "status": "available" } 27 | ``` 28 | -------------------------------------------------------------------------------- /reference/api/snapshots.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Snapshots 3 | sidebarTitle: Snapshots 4 | description: The /snapshots route creates database snapshots. Use snapshots to backup your Meilisearch data. 5 | --- 6 | 7 | import { RouteHighlighter } from '/snippets/route_highlighter.mdx' 8 | 9 | import CodeSamplesCreateSnapshot1 from '/snippets/samples/code_samples_create_snapshot_1.mdx'; 10 | 11 | The `/snapshot` route allows you to create database snapshots. Snapshots are `.snapshot` files that can be used to make quick backups of Meilisearch data. 12 | 13 | [Learn more about snapshots.](/learn/data_backup/snapshots) 14 | 15 | 16 | Meilisearch Cloud does not support the `/snapshots` route. 17 | 18 | 19 | ## Create a snapshot 20 | 21 | 22 | 23 | Triggers a snapshot creation task. Once the process is complete, Meilisearch creates a snapshot in the [snapshot directory](/learn/self_hosted/configure_meilisearch_at_launch#snapshot-destination). If the snapshot directory does not exist yet, it will be created. 24 | 25 | Snapshot tasks take priority over other tasks in the queue. 26 | 27 | [Learn more about asynchronous operations](/learn/async/asynchronous_operations). 28 | 29 | ### Example 30 | 31 | 32 | 33 | #### Response: `202 Accepted` 34 | 35 | ```json 36 | { 37 | "taskUid": 1, 38 | "indexUid": null, 39 | "status": "enqueued", 40 | "type": "snapshotCreation", 41 | "enqueuedAt": "2023-06-21T11:09:36.417758Z" 42 | } 43 | ``` 44 | 45 | You can use this `taskUid` to get more details on [the status of the task](/reference/api/tasks#get-one-task) 46 | -------------------------------------------------------------------------------- /reference/api/version.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Version 3 | sidebarTitle: Version 4 | description: The /version route allows you to check the version of a running Meilisearch instance. 5 | --- 6 | 7 | import { RouteHighlighter } from '/snippets/route_highlighter.mdx' 8 | 9 | import CodeSamplesGetVersion1 from '/snippets/samples/code_samples_get_version_1.mdx'; 10 | 11 | The `/version` route allows you to check the version of a running Meilisearch instance. 12 | 13 | ## Version object 14 | 15 | | Name | Description | 16 | | :--------------- | :----------------------------------------------------- | 17 | | **`commitSha`** | Commit identifier that tagged the `pkgVersion` release | 18 | | **`commitDate`** | Date when the `commitSha` was created | 19 | | **`pkgVersion`** | Meilisearch version | 20 | 21 | ## Get version of Meilisearch 22 | 23 | 24 | 25 | Get version of Meilisearch. 26 | 27 | ### Example 28 | 29 | 30 | 31 | #### Response: `200 Ok` 32 | 33 | ```json 34 | { 35 | "commitSha": "b46889b5f0f2f8b91438a08a358ba8f05fc09fc1", 36 | "commitDate": "2019-11-15T09:51:54.278247+00:00", 37 | "pkgVersion": "0.1.1" 38 | } 39 | ``` 40 | -------------------------------------------------------------------------------- /snippets/notice_tag.mdx: -------------------------------------------------------------------------------- 1 | export const NoticeTag = ({label}) => ( 2 | 3 | { label } 4 | 5 | ); 6 | -------------------------------------------------------------------------------- /snippets/route_highlighter.mdx: -------------------------------------------------------------------------------- 1 | export const RouteHighlighter = ({ method, path }) => ( 2 |
3 |
4 | { method } 5 |
6 |
7 | { path } 8 |
9 |
10 | ); 11 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_analytics_event_bind_event_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'https://edge.meilisearch.com/events' \ 6 | -H 'Content-Type: application/json' \ 7 | -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \ 8 | -H 'X-MS-USER-ID: MEILISEARCH_USER_ID' \ 9 | --data-binary '{ 10 | "eventType": "click", 11 | "eventName": "Search Result Clicked", 12 | "indexUid": "products", 13 | "objectId": "0", 14 | "position": 0 15 | }' 16 | ``` 17 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_analytics_event_bind_search_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \ 6 | -H 'Content-Type: application/json' \ 7 | -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \ 8 | -H 'X-MS-USER-ID: MEILISEARCH_USER_ID' \ 9 | --data-binary '{}' 10 | ``` 11 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_analytics_event_click_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'https://edge.meilisearch.com/events' \ 6 | -H 'Content-Type: application/json' \ 7 | -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \ 8 | --data-binary '{ 9 | "eventType": "click", 10 | "eventName": "Search Result Clicked", 11 | "indexUid": "products", 12 | "objectId": "0", 13 | "position": 0 14 | }' 15 | ``` 16 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_analytics_event_conversion_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'https://edge.meilisearch.com/events' \ 6 | -H 'Content-Type: application/json' \ 7 | -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' 8 | --data-binary '{ 9 | "eventType": "conversion", 10 | "eventName": "Product Added To Cart", 11 | "indexUid": "products", 12 | "objectId": "0", 13 | "position": 0 14 | }' 15 | ``` 16 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_async_guide_canceled_by.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```swift Swift 4 | client.getTasks(params: TasksQuery(canceledBy: [9, 15])) { result in 5 | switch result { 6 | case .success(let taskResult): 7 | print(taskResult) 8 | case .failure(let error): 9 | print(error) 10 | } 11 | } 12 | ``` 13 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_async_guide_canceled_by_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```javascript JS 4 | client.getTasks({ canceledBy: [9, 15] }) 5 | ``` 6 | 7 | ```python Python 8 | client.get_tasks({'canceledBy': ['9', '15']}) 9 | ``` 10 | 11 | ```php PHP 12 | $client->getTasks((new TasksQuery())->setCanceledBy([9, 15])); 13 | ``` 14 | 15 | ```java Java 16 | TasksQuery query = new TasksQuery().setCanceledBy(new int[] {9, 15}); 17 | client.getTasks(query); 18 | ``` 19 | 20 | ```ruby Ruby 21 | client.get_tasks(canceled_by: [9, 15]) 22 | ``` 23 | 24 | ```go Go 25 | client.GetTasks(&meilisearch.TasksQuery{ 26 | CanceledBy: []int64{9, 15}, 27 | }) 28 | ``` 29 | 30 | ```csharp C# 31 | await client.GetTasksAsync(new TasksQuery { CanceledBy = new List { 9, 15 } }); 32 | ``` 33 | 34 | ```rust Rust 35 | let mut query = TasksQuery::new(&client); 36 | let tasks = query 37 | .with_canceled_by([9, 15]) 38 | .execute() 39 | .await 40 | .unwrap(); 41 | ``` 42 | 43 | ```dart Dart 44 | await client.getTasks(params: TasksQuery(canceledBy: [9, 15])); 45 | ``` 46 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_async_guide_filter_by_ids_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```javascript JS 4 | client.getTasks({ uids: [5, 10, 13] }) 5 | ``` 6 | 7 | ```python Python 8 | client.get_tasks({'uids': ['5', '10', '13']}) 9 | ``` 10 | 11 | ```php PHP 12 | $client->getTasks((new TasksQuery())->setUids([5, 10, 13])); 13 | ``` 14 | 15 | ```java Java 16 | TasksQuery query = new TasksQuery().setUids(new int[] {5, 10, 13}); 17 | client.getTasks(query); 18 | ``` 19 | 20 | ```ruby Ruby 21 | client.get_tasks(uids: [5, 10, 13]) 22 | ``` 23 | 24 | ```go Go 25 | client.GetTasks(&meilisearch.TasksQuery{ 26 | UIDS: []int64{5, 10, 13}, 27 | }) 28 | ``` 29 | 30 | ```csharp C# 31 | await client.GetTasksAsync(new TasksQuery { Uids = new List { 5, 10, 13 } }); 32 | ``` 33 | 34 | ```rust Rust 35 | let mut query = TasksQuery::new(&client); 36 | let tasks = query 37 | .with_uids([5, 10, 13]) 38 | .execute() 39 | .await 40 | .unwrap(); 41 | ``` 42 | 43 | ```swift Swift 44 | client.getTasks(params: TasksQuery(uids: [5, 10, 13])) { result in 45 | switch result { 46 | case .success(let taskResult): 47 | print(taskResult) 48 | case .failure(let error): 49 | print(error) 50 | } 51 | } 52 | ``` 53 | 54 | ```dart Dart 55 | await client.getTasks( 56 | params: TasksQuery( 57 | uids: [5, 10, 13], 58 | ), 59 | ); 60 | ``` 61 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_async_guide_filter_by_index_uids_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```javascript JS 4 | client.getTasks({ indexUids: ['movies'] }) 5 | ``` 6 | 7 | ```python Python 8 | client.get_tasks({'indexUids': ['movies']}) 9 | ``` 10 | 11 | ```php PHP 12 | $client->getTasks((new TasksQuery())->setIndexUids(['movies'])); 13 | ``` 14 | 15 | ```java Java 16 | TasksQuery query = new TasksQuery().setIndexUids(new String[] {"movies"}); 17 | client.getTasks(query); 18 | ``` 19 | 20 | ```ruby Ruby 21 | client.get_tasks(index_uids: ['movies']) 22 | ``` 23 | 24 | ```go Go 25 | client.GetTasks(&meilisearch.TasksQuery{ 26 | IndexUIDS: []string{"movie"}, 27 | }) 28 | ``` 29 | 30 | ```csharp C# 31 | await client.GetTasksAsync(new TasksQuery { IndexUids = new List { "movies" } }); 32 | ``` 33 | 34 | ```rust Rust 35 | let mut query = TasksQuery::new(&client); 36 | let tasks = query 37 | .with_index_uids(["movies"]) 38 | .execute() 39 | .await 40 | .unwrap(); 41 | ``` 42 | 43 | ```swift Swift 44 | client.getTasks(params: TasksQuery(indexUids: ["movies"])) { result in 45 | switch result { 46 | case .success(let taskResult): 47 | print(taskResult) 48 | case .failure(let error): 49 | print(error) 50 | } 51 | } 52 | ``` 53 | 54 | ```dart Dart 55 | await client.getTasks(params: TasksQuery(indexUids: ['movies'])); 56 | ``` 57 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_async_guide_filter_by_statuses_2.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/tasks?statuses=failed,canceled' 6 | ``` 7 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_async_guide_filter_by_types_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```javascript JS 4 | client.getTasks({ types: ['dumpCreation', 'indexSwap'] }) 5 | ``` 6 | 7 | ```python Python 8 | client.get_tasks({'types': ['dumpCreation', 'indexSwap']}) 9 | ``` 10 | 11 | ```php PHP 12 | $client->getTasks((new TasksQuery())->setTypes(['dumpCreation', 'indexSwap'])); 13 | ``` 14 | 15 | ```java Java 16 | TasksQuery query = new TasksQuery().setTypes(new String[] {"dumpCreation", "indexSwap"}); 17 | client.getTasks(query); 18 | ``` 19 | 20 | ```ruby Ruby 21 | client.get_tasks(types: ['dumpCreation', 'indexSwap']) 22 | ``` 23 | 24 | ```go Go 25 | client.GetTasks(&meilisearch.TasksQuery{ 26 | Types: []meilisearch.TaskType{ 27 | meilisearch.TaskTypeDumpCreation, 28 | meilisearch.TaskTypeIndexSwap, 29 | }, 30 | }) 31 | ``` 32 | 33 | ```csharp C# 34 | await client.GetTasksAsync(new TasksQuery { Types = new List { TaskInfoType.DumpCreation, TaskInfoType.IndexSwap } }); 35 | ``` 36 | 37 | ```rust Rust 38 | let mut query = TasksQuery::new(&client); 39 | let tasks = query 40 | .with_types(["dumpCreation", "indexSwap"]) 41 | .execute() 42 | .await 43 | .unwrap(); 44 | ``` 45 | 46 | ```swift Swift 47 | client.getTasks(params: TasksQuery(types: [.dumpCreation, .indexSwap])) { result in 48 | switch result { 49 | case .success(let taskResult): 50 | print(taskResult) 51 | case .failure(let error): 52 | print(error) 53 | } 54 | } 55 | ``` 56 | 57 | ```dart Dart 58 | await client.getTasks( 59 | params: TasksQuery( 60 | types: ['dumpCreation', 'indexSwap'], 61 | ), 62 | ); 63 | ``` 64 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_basic_security_tutorial_admin_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'MEILISEARCH_URL/indexes' \ 6 | -H 'Content-Type: application/json' \ 7 | -H 'Authorization: Bearer DEFAULT_ADMIN_API_KEY' \ 8 | --data-binary '{ 9 | "uid": "medical_records", 10 | "primaryKey": "id" 11 | }' 12 | ``` 13 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_basic_security_tutorial_listing_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl -X GET 'MEILISEARCH_URL/keys' \ 5 | -H 'Authorization: Bearer MASTER_KEY' 6 | ``` 7 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_basic_security_tutorial_search_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'MEILISEARCH_URL/indexes/medical_records/search' \ 6 | -H 'Content-Type: application/json' \ 7 | -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \ 8 | --data-binary '{ "q": "appointments" }' 9 | ``` 10 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_cancel_tasks_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'MEILISEARCH_URL/tasks/cancel?uids=1,2' 6 | ``` 7 | 8 | ```javascript JS 9 | client.cancelTasks({ uids: [1, 2] }) 10 | ``` 11 | 12 | ```python Python 13 | client.cancel_tasks({'uids': ['1', '2']}) 14 | ``` 15 | 16 | ```php PHP 17 | $client->cancelTasks((new CancelTasksQuery())->setUids([1, 2])); 18 | ``` 19 | 20 | ```java Java 21 | CancelTasksQuery query = new CancelTasksQuery().setUids(new int[] {1, 2}) 22 | client.cancelTasks(query); 23 | ``` 24 | 25 | ```ruby Ruby 26 | client.cancel_tasks(uids: [1, 2]) 27 | ``` 28 | 29 | ```go Go 30 | client.CancelTasks(&meilisearch.CancelTasksQuery{ 31 | UIDS: []int64{1, 2}, 32 | }); 33 | ``` 34 | 35 | ```csharp C# 36 | await client.CancelTasksAsync(new CancelTasksQuery { Uids = new List { 1, 2 } }); 37 | ``` 38 | 39 | ```rust Rust 40 | let mut query = tasks::TasksCancelQuery::new(&client); 41 | query.with_uids([1, 2]); 42 | 43 | let res = client.cancel_task_with(&query).await.unwrap(); 44 | ``` 45 | 46 | ```swift Swift 47 | client.cancelTasks(filter: CancelTasksQuery(uids: [1, 2])) { (result) in 48 | switch result { 49 | case .success(let taskInfo): 50 | print(taskInfo) 51 | case .failure(let error): 52 | print(error) 53 | } 54 | } 55 | ``` 56 | 57 | ```dart Dart 58 | await client.cancelTasks(params: CancelTasksQuery(uids: [1, 2])); 59 | ``` 60 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_create_an_index_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'MEILISEARCH_URL/indexes' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '{ 8 | "uid": "movies", 9 | "primaryKey": "id" 10 | }' 11 | ``` 12 | 13 | ```javascript JS 14 | client.createIndex('movies', { primaryKey: 'id' }) 15 | ``` 16 | 17 | ```python Python 18 | client.create_index('movies', {'primaryKey': 'id'}) 19 | ``` 20 | 21 | ```php PHP 22 | $client->createIndex('movies', ['primaryKey' => 'id']); 23 | ``` 24 | 25 | ```java Java 26 | client.createIndex("movies", "id"); 27 | ``` 28 | 29 | ```ruby Ruby 30 | client.create_index('movies', primary_key: 'id') 31 | ``` 32 | 33 | ```go Go 34 | client.CreateIndex(&meilisearch.IndexConfig{ 35 | Uid: "movies", 36 | PrimaryKey: "id", 37 | }) 38 | ``` 39 | 40 | ```csharp C# 41 | TaskInfo task = await client.CreateIndexAsync("movies", "id"); 42 | ``` 43 | 44 | ```rust Rust 45 | client.create_index("movies", Some("id")) 46 | .await 47 | .unwrap(); 48 | ``` 49 | 50 | ```swift Swift 51 | client.createIndex(uid: "movies", primaryKey: "id") { (result) in 52 | switch result { 53 | case .success(let task): 54 | print(task) 55 | case .failure(let error): 56 | print(error) 57 | } 58 | } 59 | ``` 60 | 61 | ```dart Dart 62 | await client.createIndex('movies', primaryKey: 'id'); 63 | ``` 64 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_create_snapshot_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'MEILISEARCH_URL/snapshots' 6 | ``` 7 | 8 | ```javascript JS 9 | client.createSnapshot() 10 | ``` 11 | 12 | ```python Python 13 | client.create_snapshot() 14 | ``` 15 | 16 | ```php PHP 17 | $client->createSnapshot(); 18 | ``` 19 | 20 | ```java Java 21 | client.createSnapshot(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.create_snapshot 26 | ``` 27 | 28 | ```go Go 29 | client.CreateSnapshot() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.CreateSnapshotAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | client 38 | .create_snapshot() 39 | .await 40 | .unwrap(); 41 | ``` 42 | 43 | ```swift Swift 44 | let task = try await self.client.createSnapshot() 45 | ``` 46 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_delete_a_key_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \ 6 | -H 'Authorization: Bearer MASTER_KEY' 7 | ``` 8 | 9 | ```javascript JS 10 | client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d') 11 | ``` 12 | 13 | ```python Python 14 | client.delete_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d') 15 | ``` 16 | 17 | ```php PHP 18 | $client->deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d'); 19 | ``` 20 | 21 | ```java Java 22 | client.deleteKey("6062abda-a5aa-4414-ac91-ecd7944c0f8d") 23 | ``` 24 | 25 | ```ruby Ruby 26 | client.delete_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d') 27 | ``` 28 | 29 | ```go Go 30 | client.DeleteKey("6062abda-a5aa-4414-ac91-ecd7944c0f8d") 31 | ``` 32 | 33 | ```csharp C# 34 | client.DeleteKeyAsync("6062abda-a5aa-4414-ac91-ecd7944c0f8d") 35 | ``` 36 | 37 | ```rust Rust 38 | let key = client 39 | .get_key("6062abda-a5aa-4414-ac91-ecd7944c0f8d") 40 | .await 41 | .unwrap(); 42 | client 43 | .delete_key(&key) 44 | .await?; 45 | ``` 46 | 47 | ```swift Swift 48 | client.deleteKey(keyOrUid: "6062abda-a5aa-4414-ac91-ecd7944c0f8d") { result in 49 | switch result { 50 | case .success: 51 | print("success") 52 | case .failure(let error): 53 | print(error) 54 | } 55 | } 56 | ``` 57 | 58 | ```dart Dart 59 | await client.deleteKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d'); 60 | ``` 61 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_delete_all_documents_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/indexes/movies/documents' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('movies').deleteAllDocuments() 10 | ``` 11 | 12 | ```python Python 13 | client.index('movies').delete_all_documents() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('movies')->deleteAllDocuments(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("movies").deleteAllDocuments(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('movies').delete_all_documents 26 | ``` 27 | 28 | ```go Go 29 | client.Index("movies").DeleteAllDocuments() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("movies").DeleteAllDocumentsAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let task: TaskInfo = client 38 | .index("movies") 39 | .delete_all_documents() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("movies").deleteAllDocuments() { (result) in 46 | switch result { 47 | case .success(let task): 48 | print(task) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.index('movies').deleteAllDocuments(); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_delete_an_index_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/indexes/movies' 6 | ``` 7 | 8 | ```javascript JS 9 | client.deleteIndex('movies') 10 | ``` 11 | 12 | ```python Python 13 | client.delete_index('movies') 14 | // OR 15 | client.index('movies').delete() 16 | ``` 17 | 18 | ```php PHP 19 | $client->deleteIndex('movies'); 20 | ``` 21 | 22 | ```java Java 23 | client.deleteIndex("movies"); 24 | ``` 25 | 26 | ```ruby Ruby 27 | client.delete_index('movies') 28 | ``` 29 | 30 | ```go Go 31 | client.DeleteIndex("movies") 32 | // OR 33 | client.Index("movies").Delete() 34 | ``` 35 | 36 | ```csharp C# 37 | await client.DeleteIndexAsync("movies"); 38 | ``` 39 | 40 | ```rust Rust 41 | client.index("movies") 42 | .delete() 43 | .await 44 | .unwrap(); 45 | ``` 46 | 47 | ```swift Swift 48 | client.index("movies").delete { (result) in 49 | switch result { 50 | case .success: 51 | print("Index deleted") 52 | case .failure(let error): 53 | print(error) 54 | } 55 | } 56 | ``` 57 | 58 | ```dart Dart 59 | await client.index('movies').delete(); 60 | ``` 61 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_delete_documents_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```swift Swift 4 | client.index("movies").deleteBatchDocuments(["23488", "153738", "437035", "363869"]) { 5 | (result) in 6 | switch result { 7 | case .success(let task): 8 | print(task) 9 | case .failure(let error): 10 | print(error) 11 | } 12 | } 13 | ``` 14 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_delete_documents_by_batch_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'MEILISEARCH_URL/indexes/movies/documents/delete-batch' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '[ 8 | 23488, 9 | 153738, 10 | 437035, 11 | 363869 12 | ]' 13 | ``` 14 | 15 | ```javascript JS 16 | client.index('movies').deleteDocuments([23488, 153738, 437035, 363869]) 17 | ``` 18 | 19 | ```python Python 20 | client.index('movies').delete_documents([23488, 153738, 437035, 363869]) 21 | ``` 22 | 23 | ```php PHP 24 | $client->index('movies')->deleteDocuments([23488, 153738, 437035, 363869]); 25 | ``` 26 | 27 | ```java Java 28 | client.index("movies").deleteDocuments(Arrays.asList(new String[] 29 | { 30 | "23488", 31 | "153738", 32 | "437035", 33 | "363869" 34 | })); 35 | ``` 36 | 37 | ```ruby Ruby 38 | client.index('movies').delete_documents([23488, 153738, 437035, 363869]) 39 | ``` 40 | 41 | ```go Go 42 | client.Index("movies").DeleteDocuments([]string{ 43 | "23488", 44 | "153738", 45 | "437035", 46 | "363869", 47 | }) 48 | ``` 49 | 50 | ```csharp C# 51 | await client.Index("movies").DeleteDocumentsAsync(new[] { "23488", "153738", "437035", "363869" }); 52 | ``` 53 | 54 | ```rust Rust 55 | let task: TaskInfo = client 56 | .index("movies") 57 | .delete_documents(&[23488, 153738, 437035, 363869]) 58 | .await 59 | .unwrap(); 60 | ``` 61 | 62 | ```dart Dart 63 | await client.index('movies').deleteDocuments( 64 | DeleteDocumentsQuery( 65 | ids: [23488, 153738, 437035, 363869], 66 | ), 67 | ); 68 | ``` 69 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_delete_one_document_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/indexes/movies/documents/25684' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('movies').deleteDocument(25684) 10 | ``` 11 | 12 | ```python Python 13 | client.index('movies').delete_document(25684) 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('movies')->deleteDocument(25684); 18 | ``` 19 | 20 | ```java Java 21 | client.index("movies").deleteDocument("25684"); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('movies').delete_document(25684) 26 | ``` 27 | 28 | ```go Go 29 | client.Index("movies").DeleteDocument("25684") 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("movies").DeleteOneDocumentAsync("25684"); 34 | ``` 35 | 36 | ```rust Rust 37 | let task: TaskInfo = client 38 | .index("movies") 39 | .delete_document(25684) 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("movies").deleteDocument("25684") { (result) in 46 | switch result { 47 | case .success(let task): 48 | print(task) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.index('movies').deleteDocument(25684); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_delete_tasks_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/tasks?uids=1,2' 6 | ``` 7 | 8 | ```javascript JS 9 | client.deleteTasks({ uids: [1, 2] }) 10 | ``` 11 | 12 | ```python Python 13 | client.delete_tasks({'uids': ['1', '2']}) 14 | ``` 15 | 16 | ```php PHP 17 | $client->deleteTasks((new DeleteTasksQuery())->setUids([1, 2])); 18 | ``` 19 | 20 | ```java Java 21 | DeleteTasksQuery query = new DeleteTasksQuery().setUids(new int[] {1, 2}) 22 | client.deleteTasks(query); 23 | ``` 24 | 25 | ```ruby Ruby 26 | client.delete_tasks(uids: [1, 2]) 27 | ``` 28 | 29 | ```go Go 30 | client.DeleteTaks(&meilisearch.DeleteTasksQuery{ 31 | UIDS: []int64{1, 2}, 32 | }); 33 | ``` 34 | 35 | ```csharp C# 36 | await client.DeleteTasksAsync(new DeleteTasksQuery { Uids = new List { 1, 2 } }); 37 | ``` 38 | 39 | ```rust Rust 40 | let mut query = tasks::TasksDeleteQuery::new(&client); 41 | query.with_uids([1, 2]); 42 | 43 | let res = client.delete_tasks_with(&query).await.unwrap(); 44 | ``` 45 | 46 | ```swift Swift 47 | client.deleteTasks(filter: DeleteTasksQuery(uids: [1, 2])) { (result) in 48 | switch result { 49 | case .success(let taskInfo): 50 | print(taskInfo) 51 | case .failure(let error): 52 | print(error) 53 | } 54 | } 55 | ``` 56 | 57 | ```dart Dart 58 | await client.deleteTasks(params: DeleteTasksQuery(uids: [1, 2])); 59 | ``` 60 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_distinct_attribute_guide_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X PUT 'MEILISEARCH_URL/indexes/jackets/settings/distinct-attribute' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '"product_id"' 8 | ``` 9 | 10 | ```javascript JS 11 | client.index('jackets').updateDistinctAttribute('product_id') 12 | ``` 13 | 14 | ```python Python 15 | client.index('jackets').update_distinct_attribute('product_id') 16 | ``` 17 | 18 | ```php PHP 19 | $client->index('jackets')->updateDistinctAttribute('product_id'); 20 | ``` 21 | 22 | ```java Java 23 | client.index("jackets").updateDistinctAttributeSettings("product_id"); 24 | ``` 25 | 26 | ```ruby Ruby 27 | client.index('jackets').update_distinct_attribute('product_id') 28 | ``` 29 | 30 | ```go Go 31 | client.Index("jackets").UpdateDistinctAttribute("product_id") 32 | ``` 33 | 34 | ```csharp C# 35 | await client.Index("jackets").UpdateDistinctAttributeAsync("product_id"); 36 | ``` 37 | 38 | ```rust Rust 39 | let task: TaskInfo = client 40 | .index("jackets") 41 | .set_distinct_attribute("product_id") 42 | .await 43 | .unwrap(); 44 | ``` 45 | 46 | ```swift Swift 47 | client.index("jackets").updateDistinctAttribute("product_id") { (result) in 48 | switch result { 49 | case .success(let task): 50 | print(task) 51 | case .failure(let error): 52 | print(error) 53 | } 54 | } 55 | ``` 56 | 57 | ```dart Dart 58 | await client.index('jackets').updateDistinctAttribute('product_id'); 59 | ``` 60 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_distinct_attribute_guide_distinct_parameter_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'MEILISEARCH_URL/indexes/products/search' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '{ 8 | "q": "white shirt", 9 | "distinct": "sku" 10 | }' 11 | ``` 12 | 13 | ```javascript JS 14 | client.index('products').search('white shirt', { distinct: 'sku' }) 15 | ``` 16 | 17 | ```python Python 18 | client.index('products').search('white shirt', { distinct: 'sku' }) 19 | ``` 20 | 21 | ```php PHP 22 | $client->index('products')->search('white shirt', [ 23 | 'distinct' => 'sku' 24 | ]); 25 | ``` 26 | 27 | ```java Java 28 | SearchRequest searchRequest = SearchRequest.builder().q("white shirt").distinct("sku").build(); 29 | client.index("products").search(searchRequest); 30 | ``` 31 | 32 | ```ruby Ruby 33 | client.index('products').search('white shirt', { 34 | distinct: 'sku' 35 | }) 36 | ``` 37 | 38 | ```go Go 39 | client.Index("products").Search("white shirt", &meilisearch.SearchRequest{ 40 | Distinct: "sku", 41 | }) 42 | ``` 43 | 44 | ```csharp C# 45 | var params = new SearchQuery() 46 | { 47 | Distinct = "sku" 48 | }; 49 | await client.Index("products").SearchAsync("white shirt", params); 50 | ``` 51 | 52 | ```rust Rust 53 | let res = client 54 | .index("products") 55 | .search() 56 | .with_query("white shirt") 57 | .with_distinct("sku") 58 | .execute() 59 | .await 60 | .unwrap(); 61 | ``` 62 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_distinct_attribute_guide_filterable_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X PUT 'MEILISEARCH_URL/indexes/products/settings/filterable-attributes' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '[ 8 | "product_id", 9 | "sku", 10 | "url" 11 | ]' 12 | ``` 13 | 14 | ```javascript JS 15 | client.index('products').updateFilterableAttributes(['product_id', 'sku', 'url']) 16 | ``` 17 | 18 | ```python Python 19 | client.index('products').update_filterable_attributes(['product_id', 'sku', 'url']) 20 | ``` 21 | 22 | ```php PHP 23 | $client->index('products')->updateFilterableAttributes(['product_id', 'sku', 'url']); 24 | ``` 25 | 26 | ```java Java 27 | Settings settings = new Settings(); 28 | settings.setFilterableAttributes(new String[] {"product_id", "SKU", "url"}); 29 | client.index("products").updateSettings(settings); 30 | ``` 31 | 32 | ```ruby Ruby 33 | client.index('products').update_filterable_attributes([ 34 | 'product_id', 35 | 'sku', 36 | 'url' 37 | ]) 38 | ``` 39 | 40 | ```go Go 41 | filterableAttributes := []string{ 42 | "product_id", 43 | "sku", 44 | "url", 45 | } 46 | client.Index("products").UpdateFilterableAttributes(&filterableAttributes) 47 | ``` 48 | 49 | ```csharp C# 50 | List attributes = new() { "product_id", "sku", "url" }; 51 | TaskInfo result = await client.Index("products").UpdateFilterableAttributesAsync(attributes); 52 | ``` 53 | 54 | ```rust Rust 55 | let task: TaskInfo = client 56 | .index("products") 57 | .settings() 58 | .set_filterable_attributes(["product_id", "sku", "url"]) 59 | .execute() 60 | .await 61 | .unwrap(); 62 | ``` 63 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_documents_guide_add_movie_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```swift Swift 4 | let documentJsonString = """ 5 | [{ 6 | "movie_id": 123sq178, 7 | "title": "Amélie Poulain" 8 | }] 9 | """ 10 | let documents: Data = documentJsonString.data(using: .utf8)! 11 | 12 | client.index("movies").addDocuments(documents: documents) { (result) in 13 | switch result { 14 | case .success(let task): 15 | print(task) 16 | case .failure(let error): 17 | print(error) 18 | } 19 | } 20 | ``` 21 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_experimental_delete_logs_stream_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE MEILISEARCH_URL/logs/stream 6 | ``` 7 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_experimental_get_metrics_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/metrics' 6 | ``` 7 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_experimental_post_logs_stderr_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST MEILISEARCH_URL/logs/stderr \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '{ 8 | "target": "milli=trace,index_scheduler=info,actix_web=off" 9 | }' 10 | ``` 11 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_experimental_post_logs_stream_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST MEILISEARCH_URL/logs/stream \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '{ 8 | "mode": "human", 9 | "target": "index_scheduler=trace" 10 | }' 11 | ``` 12 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_facet_search_3.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'MEILISEARCH_URL/indexes/books/facet-search' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '{ 8 | "facetQuery": "c", 9 | "facetName": "genres" 10 | }' 11 | ``` 12 | 13 | ```javascript JS 14 | client.index('books').searchForFacetValues({ 15 | facetQuery: 'c', 16 | facetName: 'genres' 17 | }) 18 | ``` 19 | 20 | ```python Python 21 | client.index('books').facet_search('genres', 'c') 22 | ``` 23 | 24 | ```php PHP 25 | $client->index('books')->facetSearch( 26 | (new FacetSearchQuery()) 27 | ->setFacetQuery('c') 28 | ->setFacetName('genres') 29 | ); 30 | ``` 31 | 32 | ```java Java 33 | FacetSearchRequest fsr = FacetSearchRequest.builder().facetName("genres").facetQuery("c").build(); 34 | client.index("books").facetSearch(fsr); 35 | ``` 36 | 37 | ```ruby Ruby 38 | client.index('books').facet_search('genres', 'c') 39 | ``` 40 | 41 | ```go Go 42 | client.Index("books").FacetSearch(&meilisearch.FacetSearchRequest{ 43 | FacetQuery: "c", 44 | FacetName: "genres", 45 | }) 46 | ``` 47 | 48 | ```csharp C# 49 | var query = new SearchFacetsQuery() 50 | { 51 | FacetQuery = "c" 52 | }; 53 | await client.Index("books").FacetSearchAsync("genres", query); 54 | ``` 55 | 56 | ```dart Dart 57 | await client.index('books').facetSearch( 58 | FacetSearchQuery( 59 | facetQuery: 'c', 60 | facetName: 'genres', 61 | ), 62 | ); 63 | ``` 64 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_faceted_search_facets_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```swift Swift 4 | let searchParameters = SearchParameters( 5 | query: "Batman", 6 | facets: ["genres"]) 7 | client.index("movies").search(searchParameters) { (result: Result, Swift.Error>) in 8 | switch result { 9 | case .success(let searchResult): 10 | print(searchResult) 11 | case .failure(let error): 12 | print(error) 13 | } 14 | } 15 | ``` 16 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_all_batches_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'http://MEILISEARCH_URL/batches' 6 | ``` 7 | 8 | ```javascript JS 9 | client.getBatches(); 10 | ``` 11 | 12 | ```python Python 13 | client.get_batches() 14 | ``` 15 | 16 | ```php PHP 17 | $client->getBatches(); 18 | ``` 19 | 20 | ```ruby Ruby 21 | client.batches 22 | ``` 23 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_all_keys_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/keys?limit=3' \ 6 | -H 'Authorization: Bearer MASTER_KEY' 7 | ``` 8 | 9 | ```javascript JS 10 | client.getKeys({ limit: 3 }) 11 | ``` 12 | 13 | ```python Python 14 | client.get_keys({'limit': 3}) 15 | ``` 16 | 17 | ```php PHP 18 | $client->getKeys((new KeysQuery())->setLimit(3)); 19 | ``` 20 | 21 | ```java Java 22 | KeysQuery query = new KeysQuery().setLimit(3); 23 | client.getKeys(query); 24 | ``` 25 | 26 | ```ruby Ruby 27 | client.keys(limit: 3) 28 | ``` 29 | 30 | ```go Go 31 | client.GetKeys(&meilisearch.KeysQuery{ 32 | Limit: 3 33 | }); 34 | ``` 35 | 36 | ```csharp C# 37 | ResourceResults keyResult = await client.GetKeysAsync(new KeysQuery { Limit = 3 }); 38 | ``` 39 | 40 | ```rust Rust 41 | let mut query = KeysQuery::new() 42 | .with_limit(3) 43 | .execute(&client) 44 | .await 45 | .unwrap(); 46 | ``` 47 | 48 | ```swift Swift 49 | client.getKeys(params: KeysQuery(limit: 3)) { result in 50 | switch result { 51 | case .success(let keys): 52 | print(keys) 53 | case .failure(let error): 54 | print(error) 55 | } 56 | } 57 | ``` 58 | 59 | ```dart Dart 60 | await client.getKeys(params: KeysQuery(limit: 3)); 61 | ``` 62 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_all_tasks_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/tasks' 6 | ``` 7 | 8 | ```javascript JS 9 | client.getTasks() 10 | ``` 11 | 12 | ```python Python 13 | client.get_tasks() 14 | ``` 15 | 16 | ```php PHP 17 | $client->getTasks(); 18 | ``` 19 | 20 | ```java Java 21 | client.getTasks(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.tasks 26 | ``` 27 | 28 | ```go Go 29 | client.GetTasks(nil); 30 | ``` 31 | 32 | ```csharp C# 33 | ResourceResults taskResult = await client.GetTasksAsync(); 34 | 35 | ``` 36 | 37 | ```rust Rust 38 | let tasks: TasksResults = client 39 | .get_tasks() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.getTasks { (result) in 46 | switch result { 47 | case .success(let tasks): 48 | print(tasks) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.getTasks(); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_all_tasks_paginating_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/tasks?limit=2&from=10 6 | ``` 7 | 8 | ```javascript JS 9 | client.getTasks({ limit: 2, from: 10 }) 10 | ``` 11 | 12 | ```python Python 13 | client.get_tasks({ 14 | 'limit': 2, 15 | 'from': 10 16 | }) 17 | ``` 18 | 19 | ```php PHP 20 | $taskQuery = (new TasksQuery())->setLimit(2)->setFrom(10)); 21 | $client->getTasks($taskQuery); 22 | ``` 23 | 24 | ```java Java 25 | TasksQuery query = new TasksQuery() 26 | .setLimit(2) 27 | .setFrom(10); 28 | 29 | client.index("movies").getTasks(query); 30 | ``` 31 | 32 | ```ruby Ruby 33 | client.tasks(limit: 2, from: 10) 34 | ``` 35 | 36 | ```go Go 37 | client.GetTasks(&meilisearch.TasksQuery{ 38 | Limit: 2, 39 | From: 10, 40 | }); 41 | ``` 42 | 43 | ```csharp C# 44 | ResourceResults taskResult = await client.GetTasksAsync(new TasksQuery { Limit = 2, From = 10 }); 45 | ``` 46 | 47 | ```rust Rust 48 | let mut query = TasksSearchQuery::new(&client) 49 | .with_limit(2) 50 | .with_from(10) 51 | .execute() 52 | .await 53 | .unwrap(); 54 | ``` 55 | 56 | ```swift Swift 57 | client.getTasks(params: TasksQuery(limit: 2, from: 10)) { result in 58 | switch result { 59 | case .success(let taskResult): 60 | print(taskResult) 61 | case .failure(let error): 62 | print(error) 63 | } 64 | } 65 | ``` 66 | 67 | ```dart Dart 68 | await client.getTasks(params: TasksQuery(limit: 2, from: 10)); 69 | ``` 70 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_all_tasks_paginating_2.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/tasks?limit=2&from=8 6 | ``` 7 | 8 | ```javascript JS 9 | client.getTasks({ limit: 2, from: 8 }) 10 | ``` 11 | 12 | ```python Python 13 | client.get_tasks({ 14 | 'limit': 2, 15 | 'from': 8 16 | }) 17 | ``` 18 | 19 | ```php PHP 20 | $taskQuery = (new TasksQuery())->setLimit(2)->setFrom(8)); 21 | $client->getTasks($taskQuery); 22 | ``` 23 | 24 | ```java Java 25 | TasksQuery query = new TasksQuery() 26 | .setLimit(2) 27 | .setFrom(8); 28 | 29 | client.index("movies").getTasks(query); 30 | ``` 31 | 32 | ```ruby Ruby 33 | client.tasks(limit: 2, from: 8) 34 | ``` 35 | 36 | ```go Go 37 | client.GetTasks(&meilisearch.TasksQuery{ 38 | Limit: 2, 39 | From: 8, 40 | }); 41 | ``` 42 | 43 | ```csharp C# 44 | ResourceResults taskResult = await client.GetTasksAsync(new TasksQuery { Limit = 2, From = 8 }); 45 | ``` 46 | 47 | ```rust Rust 48 | let mut query = TasksSearchQuery::new(&client) 49 | .with_limit(2) 50 | .from(8) 51 | .execute() 52 | .await 53 | .unwrap(); 54 | ``` 55 | 56 | ```swift Swift 57 | client.getTasks(params: TasksQuery(limit: 2, from: 8)) { result in 58 | switch result { 59 | case .success(let taskResult): 60 | print(taskResult) 61 | case .failure(let error): 62 | print(error) 63 | } 64 | } 65 | ``` 66 | 67 | ```dart Dart 68 | await client.getTasks(params: TasksQuery(limit: 2, from: 8)); 69 | ``` 70 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_batch_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'http://MEILISEARCH_URL/batches/BATCH_UID' 6 | ``` 7 | 8 | ```javascript JS 9 | client.getBatch(BATCH_UID); 10 | ``` 11 | 12 | ```python Python 13 | client.get_batch(BATCH_UID) 14 | ``` 15 | 16 | ```php PHP 17 | $client->getBatch(BATCH_UID); 18 | ``` 19 | 20 | ```ruby Ruby 21 | client.batch(BATCH_UID) 22 | ``` 23 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_dictionary_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/books/settings/dictionary' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('books').getDictionary() 10 | ``` 11 | 12 | ```python Python 13 | client.index('books').get_dictionary() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('books')->getDictionary(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("books").getDictionarySettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('books').dictionary 26 | ``` 27 | 28 | ```go Go 29 | client.Index("books").GetDictionary() 30 | ``` 31 | 32 | ```csharp C# 33 | var indexDictionary = await client.Index("books").GetDictionaryAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let task: TaskInfo = client 38 | .index('books') 39 | .get_dictionary() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("books").getDictionary { result in 46 | // handle result 47 | } 48 | ``` 49 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_displayed_attributes_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('movies').getDisplayedAttributes() 10 | ``` 11 | 12 | ```python Python 13 | client.index('movies').get_displayed_attributes() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('movies')->getDisplayedAttributes(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("movies").getDisplayedAttributesSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('movies').get_displayed_attributes 26 | ``` 27 | 28 | ```go Go 29 | client.Index("movies").GetDisplayedAttributes() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("movies").GetDisplayedAttributesAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let displayed_attributes: Vec = client 38 | .index("movies") 39 | .get_displayed_attributes() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("movies").getDisplayedAttributes { (result) in 46 | switch result { 47 | case .success(let displayedAttributes): 48 | print(displayedAttributes) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.index('movies').getDisplayedAttributes(); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_distinct_attribute_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('shoes').getDistinctAttribute() 10 | ``` 11 | 12 | ```python Python 13 | client.index('shoes').get_distinct_attribute() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('shoes')->getDistinctAttribute(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("shoes").getDistinctAttributeSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('shoes').distinct_attribute 26 | ``` 27 | 28 | ```go Go 29 | client.Index("shoes").GetDistinctAttribute() 30 | ``` 31 | 32 | ```csharp C# 33 | string result = await client.Index("shoes").GetDistinctAttributeAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let distinct_attribute: Option = client 38 | .index("shoes") 39 | .get_distinct_attribute() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("shoes").getDistinctAttribute { (result) in 46 | switch result { 47 | case .success(let distinctAttribute): 48 | print(distinctAttribute) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.index('shoes').getDistinctAttribute(); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_embedders_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders' 6 | ``` 7 | 8 | ```ruby Ruby 9 | client.index('INDEX_NAME').embedders 10 | ``` 11 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_experimental_features_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/experimental-features/' 6 | ``` 7 | 8 | ```ruby Ruby 9 | client.experimental_features 10 | ``` 11 | 12 | ```go Go 13 | client.ExperimentalFeatures().Get() 14 | ``` 15 | 16 | ```rust Rust 17 | let client = Client::new("http://localhost:7700", Some("apiKey")); 18 | let features = ExperimentalFeatures::new(&client); 19 | let res = features 20 | .get() 21 | .await 22 | .unwrap(); 23 | ``` 24 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_facet_search_settings_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('INDEX_NAME').getFacetSearch(); 10 | ``` 11 | 12 | ```php PHP 13 | $client->index('INDEX_NAME')->getFacetSearch(); 14 | ``` 15 | 16 | ```ruby Ruby 17 | client.index('INDEX_UID').facet_search_setting 18 | ``` 19 | 20 | ```go Go 21 | client.Index("books").GetFacetSearch() 22 | ``` 23 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_faceting_settings_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/books/settings/faceting' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('books').getFaceting() 10 | ``` 11 | 12 | ```python Python 13 | client.index('books').get_faceting_settings() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('books')->getFaceting(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("books").getFacetingSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('books').faceting 26 | ``` 27 | 28 | ```go Go 29 | client.Index("books").GetFaceting() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("movies").GetFacetingAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let faceting: FacetingSettings = client 38 | .index("books") 39 | .get_faceting() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```dart Dart 45 | await client.index('movies').getFaceting(); 46 | ``` 47 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_filterable_attributes_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('movies').getFilterableAttributes() 10 | ``` 11 | 12 | ```python Python 13 | client.index('movies').get_filterable_attributes() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('movies')->getFilterableAttributes(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("movies").getFilterableAttributesSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('movies').filterable_attributes 26 | ``` 27 | 28 | ```go Go 29 | client.Index("movies").GetFilterableAttributes() 30 | ``` 31 | 32 | ```csharp C# 33 | IEnumerable attributes = await client.Index("movies").GetFilterableAttributesAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let filterable_attributes: Vec = client 38 | .index("movies") 39 | .get_filterable_attributes() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("movies").getFilterableAttributes { (result) in 46 | switch result { 47 | case .success(let attributes): 48 | print(attributes) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.index('movies').getFilterableAttributes(); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_health_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/health' 6 | ``` 7 | 8 | ```javascript JS 9 | client.health() 10 | ``` 11 | 12 | ```python Python 13 | client.health() 14 | ``` 15 | 16 | ```php PHP 17 | $client->health(); 18 | ``` 19 | 20 | ```java Java 21 | client.health(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.health 26 | ``` 27 | 28 | ```go Go 29 | client.Health() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.HealthAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | // health() return an Err() if the server is not healthy, so this example would panic due to the unwrap 38 | client 39 | .health() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.health { (result) in 46 | switch result { 47 | case .success: 48 | print("Healthy!") 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.health(); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_index_stats_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/movies/stats' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('movies').getStats() 10 | ``` 11 | 12 | ```python Python 13 | client.index('movies').get_stats() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('movies')->stats(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("movies").getStats(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('movies').stats 26 | ``` 27 | 28 | ```go Go 29 | client.Index("movies").GetStats() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("movies").GetStatsAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let stats: IndexStats = client 38 | .index("movies") 39 | .get_stats() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("movies").stats { (result) in 46 | switch result { 47 | case .success(let stats): 48 | print(stats) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.index('movies').getStats(); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_indexes_stats_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/stats' 6 | ``` 7 | 8 | ```javascript JS 9 | client.getStats() 10 | ``` 11 | 12 | ```python Python 13 | client.get_all_stats() 14 | ``` 15 | 16 | ```php PHP 17 | $client->stats(); 18 | ``` 19 | 20 | ```java Java 21 | client.getStats(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.stats 26 | ``` 27 | 28 | ```go Go 29 | client.GetStats() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.GetStatsAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let stats: ClientStats = client 38 | .get_stats() 39 | .await 40 | .unwrap(); 41 | ``` 42 | 43 | ```swift Swift 44 | client.allStats { (result) in 45 | switch result { 46 | case .success(let stats): 47 | print(stats) 48 | case .failure(let error): 49 | print(error) 50 | } 51 | } 52 | ``` 53 | 54 | ```dart Dart 55 | await client.getStats(); 56 | ``` 57 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_localized_attribute_settings_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('INDEX_NAME').getLocalizedAttributes() 10 | ``` 11 | 12 | ```python Python 13 | client.index('INDEX_NAME').get_localized_attributes() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('INDEX_NAME')->getLocalizedAttributes(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("INDEX_NAME").getLocalizedAttributesSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('INDEX_NAME').localized_attributes 26 | ``` 27 | 28 | ```go Go 29 | client.index("INDEX_NAME").GetLocalizedAttributes() 30 | ``` 31 | 32 | ```rust Rust 33 | let localized_attributes: Option> = client 34 | .index("books") 35 | .get_localized_attributes() 36 | .await 37 | .unwrap(); 38 | ``` 39 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_network_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/network' 6 | ``` 7 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_non_separator_tokens_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('books').getNonSeparatorTokens() 10 | ``` 11 | 12 | ```python Python 13 | client.index('articles').get_non_separator_tokens() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('articles')->getNonSeparatorTokens(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("articles").getNonSeparatorTokensSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('articles').non_separator_tokens 26 | ``` 27 | 28 | ```go Go 29 | client.Index("articles").GetNonSeparatorTokens() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("movies").GetNonSeparatorTokensAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let task: TaskInfo = client 38 | .index('articles') 39 | .get_non_separator_tokens() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("books").getNonSeparatorTokens { result in 46 | // handle result 47 | } 48 | ``` 49 | 50 | ```dart Dart 51 | await client.index('articles').getNonSeparatorTokens(); 52 | ``` 53 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_one_index_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/movies' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('movies').getRawInfo() 10 | ``` 11 | 12 | ```python Python 13 | client.get_index('movies') 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('movies')->fetchRawInfo(); 18 | ``` 19 | 20 | ```java Java 21 | client.getIndex("movies"); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.fetch_index('movies') 26 | ``` 27 | 28 | ```go Go 29 | client.GetIndex("movies") 30 | ``` 31 | 32 | ```csharp C# 33 | await client.GetIndexAsync("movies"); 34 | ``` 35 | 36 | ```rust Rust 37 | let movies: Index = client 38 | .get_index("movies") 39 | .await 40 | .unwrap(); 41 | ``` 42 | 43 | ```swift Swift 44 | client.getIndex("movies") { (result) in 45 | switch result { 46 | case .success(let index): 47 | print(index) 48 | case .failure(let error): 49 | print(error) 50 | } 51 | } 52 | ``` 53 | 54 | ```dart Dart 55 | await client.getIndex('movies'); 56 | ``` 57 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_one_key_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/keys/6062abda-a5aa-4414-ac91-ecd7944c0f8d' \ 6 | -H 'Authorization: Bearer MASTER_KEY' 7 | ``` 8 | 9 | ```javascript JS 10 | client.getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d') 11 | ``` 12 | 13 | ```python Python 14 | client.get_key('6062abda-a5aa-4414-ac91-ecd7944c0f8d') 15 | ``` 16 | 17 | ```php PHP 18 | $client->getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d'); 19 | ``` 20 | 21 | ```java Java 22 | client.getKey("6062abda-a5aa-4414-ac91-ecd7944c0f8d"); 23 | ``` 24 | 25 | ```ruby Ruby 26 | client.key('6062abda-a5aa-4414-ac91-ecd7944c0f8d') 27 | ``` 28 | 29 | ```go Go 30 | client.GetKey("6062abda-a5aa-4414-ac91-ecd7944c0f8d") 31 | ``` 32 | 33 | ```csharp C# 34 | Key key = await client.GetKeyAsync("d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4"); 35 | ``` 36 | 37 | ```rust Rust 38 | let key = client 39 | .get_key("6062abda-a5aa-4414-ac91-ecd7944c0f8d") 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.getKey(keyOrUid: "6062abda-a5aa-4414-ac91-ecd7944c0f8d") { result in 46 | switch result { 47 | case .success(let key): 48 | print(key) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.getKey('6062abda-a5aa-4414-ac91-ecd7944c0f8d'); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_pagination_settings_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/books/settings/pagination' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('books').getPagination() 10 | ``` 11 | 12 | ```python Python 13 | client.index('books').get_pagination_settings() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('books')->getPagination(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("books").getPaginationSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | index('books').pagination 26 | ``` 27 | 28 | ```go Go 29 | client.Index("books").GetPagination() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("movies").GetPaginationAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let pagination: PaginationSetting = client 38 | .index("books") 39 | .get_pagination() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```dart Dart 45 | await client.index('movies').getPagination(); 46 | ``` 47 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_prefix_search_settings_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('INDEX_NAME').getPrefixSearch(); 10 | ``` 11 | 12 | ```php PHP 13 | $client->index('INDEX_NAME')->getPrefixSearch(); 14 | ``` 15 | 16 | ```ruby Ruby 17 | client.index('INDEX_UID').prefix_search 18 | ``` 19 | 20 | ```go Go 21 | client.Index("books").GetPrefixSearch() 22 | ``` 23 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_proximity_precision_settings_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/books/settings/proximity-precision' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('books').getProximityPrecision() 10 | ``` 11 | 12 | ```python Python 13 | client.index('books').get_proximity_precision() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('books')->getProximityPrecision(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("books").getProximityPrecisionSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('books').proximity_precision 26 | ``` 27 | 28 | ```go Go 29 | client.Index("books").GetProximityPrecision() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("books").GetProximityPrecisionAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let proximity_precision: String = client 38 | .index("books") 39 | .get_proximity_precision() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | let precisionValue = try await self.client.index("books").getProximityPrecision() 46 | ``` 47 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_ranking_rules_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('movies').getRankingRules() 10 | ``` 11 | 12 | ```python Python 13 | client.index('movies').get_ranking_rules() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('movies')->getRankingRules(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("movies").getRankingRulesSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('movies').ranking_rules 26 | ``` 27 | 28 | ```go Go 29 | client.Index("movies").GetRankingRules() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("movies").GetRankingRulesAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let ranking_rules: Vec = client 38 | .index("movies") 39 | .get_ranking_rules() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("movies").getRankingRules { (result) in 46 | switch result { 47 | case .success(let rankingRules): 48 | print(rankingRules) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.index('movies').getRankingRules(); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_search_cutoff_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('movies').getSearchCutoffMs() 10 | ``` 11 | 12 | ```python Python 13 | client.index('movies').get_search_cutoff_ms() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('movies')->getSearchCutoffMs(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("movies").getSearchCutoffMsSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('movies').search_cutoff_ms 26 | ``` 27 | 28 | ```go Go 29 | client.Index("movies").GetSearchCutoffMs() 30 | ``` 31 | 32 | ```csharp C# 33 | var searchCutoff = await client.Index("movies").GetSearchCutoffMsAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let search_cutoff_ms: String = client 38 | .index("movies") 39 | .get_search_cutoff_ms() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | let precisionValue = try await self.client.index("books").getSearchCutoffMs() 46 | ``` 47 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_searchable_attributes_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('movies').getSearchableAttributes() 10 | ``` 11 | 12 | ```python Python 13 | client.index('movies').get_searchable_attributes() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('movies')->getSearchableAttributes(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("movies").getSearchableAttributesSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('movies').searchable_attributes 26 | ``` 27 | 28 | ```go Go 29 | client.Index("movies").GetSearchableAttributes() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("movies").GetSearchableAttributesAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let searchable_attributes: Vec = client 38 | .index("movies") 39 | .get_searchable_attributes() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("movies").getSearchableAttributes { (result) in 46 | switch result { 47 | case .success(let searchableAttributes): 48 | print(searchableAttributes) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.index('movies').getSearchableAttributes(); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_separator_tokens_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('books').getSeparatorTokens() 10 | ``` 11 | 12 | ```python Python 13 | client.index('articles').get_separator_tokens() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('articles')->getSeparatorTokens(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("articles").getSeparatorTokensSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('articles').separator_tokens 26 | ``` 27 | 28 | ```go Go 29 | client.Index("articles").GetSeparatorTokens() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("movies").GetSeparatorTokensAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let task: TaskInfo = client 38 | .index('articles') 39 | .get_separator_tokens() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("books").getSeparatorTokens { result in 46 | // handle result 47 | } 48 | ``` 49 | 50 | ```dart Dart 51 | await client.index('articles').getSeparatorTokens(); 52 | ``` 53 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_settings_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/movies/settings' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('movies').getSettings() 10 | ``` 11 | 12 | ```python Python 13 | client.index('movies').get_settings() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('movies')->getSettings(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("movies").getSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('movies').settings 26 | ``` 27 | 28 | ```go Go 29 | client.Index("movies").GetSettings() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("movies").GetSettingsAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let settings: Settings = client 38 | .index("movies") 39 | .get_settings() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("movies").getSettings { (result) in 46 | switch result { 47 | case .success(let setting): 48 | print(setting) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.index('movies').getSettings(); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_similar_get_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/similar?id=TARGET_DOCUMENT_ID&embedder=EMBEDDER_NAME' 6 | ``` 7 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_similar_post_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/similar' \ 6 | -H 'Content-Type: application/json' \ 7 | -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \ 8 | --data-binary '{ 9 | "id": TARGET_DOCUMENT_ID, 10 | "embedder": "EMBEDDER_NAME" 11 | }' 12 | ``` 13 | 14 | ```javascript JS 15 | client.index('INDEX_NAME').searchSimilarDocuments({ id: 'TARGET_DOCUMENT_ID', embedder: 'default' }) 16 | ``` 17 | 18 | ```python Python 19 | client.index("INDEX_NAME").get_similar_documents({"id": "TARGET_DOCUMENT_ID", "embedder": "default"}) 20 | ``` 21 | 22 | ```php PHP 23 | $similarQuery = new SimilarDocumentsQuery('TARGET_DOCUMENT_ID', 'default'); 24 | $client->index('INDEX_NAME')->searchSimilarDocuments($similarQuery); 25 | ``` 26 | 27 | ```java Java 28 | SimilarDocumentRequest query = new SimilarDocumentRequest() .setId("143") .setEmbedder("manual"); client.index("movies").searchSimilarDocuments(query) 29 | ``` 30 | 31 | ```ruby Ruby 32 | client.index('INDEX_NAME').search_similar_documents('TARGET_DOCUMENT_ID', embedder: 'default') 33 | ``` 34 | 35 | ```go Go 36 | resp := new(meilisearch.SimilarDocumentResult) 37 | client.Index("INDEX_NAME").SearchSimilarDocuments(&meilisearch.SimilarDocumentQuery{ 38 | Id: "TARGET_DOCUMENT_ID", 39 | Embedder: "default", 40 | }, resp) 41 | ``` 42 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_sortable_attributes_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('books').getSortableAttributes() 10 | ``` 11 | 12 | ```python Python 13 | client.index('books').get_sortable_attributes() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('books')->getSortableAttributes(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("books").getSortableAttributesSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('books').sortable_attributes 26 | ``` 27 | 28 | ```go Go 29 | client.Index("books").GetSortableAttributes() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("books").GetSortableAttributesAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let sortable_attributes: Vec = client 38 | .index("books") 39 | .get_sortable_attributes() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("books").getSortableAttributes { (result: Result, Swift.Error>) in 46 | switch result { 47 | case .success(let attributes): 48 | print(attributes) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.index('books').getSortableAttributes(); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_stop_words_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/movies/settings/stop-words' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('movies').getStopWords() 10 | ``` 11 | 12 | ```python Python 13 | client.index('movies').get_stop_words() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('movies')->getStopWords(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("movies").getStopWordsSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('movies').stop_words 26 | ``` 27 | 28 | ```go Go 29 | client.Index("movies").GetStopWords() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("movies").GetStopWordsAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let stop_words: Vec = client 38 | .index("movies") 39 | .get_stop_words() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("movies").getStopWords { (result) in 46 | switch result { 47 | case .success(let stopWords): 48 | print(stopWords) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.index('movies').getStopWords(); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_synonyms_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/movies/settings/synonyms' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('movies').getSynonyms() 10 | ``` 11 | 12 | ```python Python 13 | client.index('movies').get_synonyms() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('movies')->getSynonyms(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("movies").getSynonymsSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('movies').synonyms 26 | ``` 27 | 28 | ```go Go 29 | client.Index("movies").GetSynonyms() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("movies").GetSynonymsAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let synonyms: HashMap> = client 38 | .index("movies") 39 | .get_synonyms() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("movies").getSynonyms { (result) in 46 | switch result { 47 | case .success(let synonyms): 48 | print(synonyms) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.index('movies').getSynonyms(); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_task_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/tasks/1' 6 | ``` 7 | 8 | ```javascript JS 9 | client.getTask(1) 10 | ``` 11 | 12 | ```python Python 13 | client.get_task(1) 14 | ``` 15 | 16 | ```php PHP 17 | $client->getTask(1); 18 | ``` 19 | 20 | ```java Java 21 | client.getTask(1); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.task(1) 26 | ``` 27 | 28 | ```go Go 29 | client.GetTask(1); 30 | ``` 31 | 32 | ```csharp C# 33 | TaskInfo task = await client.GetTaskAsync(1); 34 | 35 | ``` 36 | 37 | ```rust Rust 38 | let task: Task = client 39 | .get_task(1) 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.getTask(taskUid: 1) { (result) in 46 | switch result { 47 | case .success(let task): 48 | print(task) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.getTask(1); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_typo_tolerance_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('books').getTypoTolerance() 10 | ``` 11 | 12 | ```python Python 13 | client.index('books').get_typo_tolerance() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('books')->getTypoTolerance(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("books").getTypoToleranceSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | index('books').typo_tolerance 26 | ``` 27 | 28 | ```go Go 29 | client.Index("books").GetTypoTolerance() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("books").GetTypoToleranceAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let typo_tolerance: TypoToleranceSettings = client 38 | .index("books") 39 | .get_typo_tolerance() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```dart Dart 45 | await client.index('books').getTypoTolerance(); 46 | ``` 47 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_get_version_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/version' 6 | ``` 7 | 8 | ```javascript JS 9 | client.getVersion() 10 | ``` 11 | 12 | ```python Python 13 | client.get_version() 14 | ``` 15 | 16 | ```php PHP 17 | $client->version(); 18 | ``` 19 | 20 | ```java Java 21 | client.getVersion(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.version 26 | ``` 27 | 28 | ```go Go 29 | client.GetVersion() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.GetVersionAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let version: Version = client 38 | .get_version() 39 | .await 40 | .unwrap(); 41 | ``` 42 | 43 | ```swift Swift 44 | client.version { (result) in 45 | switch result { 46 | case .success(let version): 47 | print(version) 48 | case .failure(let error): 49 | print(error) 50 | } 51 | } 52 | ``` 53 | 54 | ```dart Dart 55 | await client.getVersion(); 56 | ``` 57 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_getting_started_check_task_status.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/tasks/0' \ 6 | -H 'Authorization: Bearer aSampleMasterKey' 7 | ``` 8 | 9 | ```javascript JS 10 | client.getTask(0) 11 | ``` 12 | 13 | ```python Python 14 | client.get_task(0) 15 | ``` 16 | 17 | ```php PHP 18 | $client->getTask(0); 19 | ``` 20 | 21 | ```java Java 22 | client.getTask(0); 23 | ``` 24 | 25 | ```ruby Ruby 26 | client.task(0) 27 | ``` 28 | 29 | ```go Go 30 | client.GetTask(0) 31 | ``` 32 | 33 | ```csharp C# 34 | TaskInfo task = await client.GetTaskAsync(0); 35 | ``` 36 | 37 | ```rust Rust 38 | client 39 | .get_task(0) 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.getTask(taskUid: 0) { (result) in 46 | switch result { 47 | case .success(let task): 48 | print(task) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.getTask(0); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_getting_started_communicating_with_a_protected_instance.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```swift Swift 4 | let client = try MeiliSearch(host: "http://localhost:7700", apiKey: "apiKey") 5 | 6 | client.index("movies").search(SearchParameters(query: "")) { (result: Result, Swift.Error>) in 7 | switch result { 8 | case .success(let searchResult): 9 | print(searchResult) 10 | case .failure(let error): 11 | print(error) 12 | } 13 | } 14 | ``` 15 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_getting_started_pagination.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X PATCH 'MEILISEARCH_URL/indexes/movies/settings/pagination' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '{ 8 | "maxTotalHits": 500 9 | }' 10 | ``` 11 | 12 | ```javascript JS 13 | client.index('movies').updatePagination({ maxTotalHits: 500 }) 14 | ``` 15 | 16 | ```python Python 17 | client.index('movies').update_pagination_settings({'maxTotalHits': 500}) 18 | ``` 19 | 20 | ```php PHP 21 | $client->index('movies')->updatePagination(['maxTotalHits' => 500]); 22 | ``` 23 | 24 | ```java Java 25 | Pagination newPagination = new Pagination(); 26 | newPagination.setMaxTotalHits(500); 27 | client.index("movies").updatePaginationSettings(newPagination); 28 | ``` 29 | 30 | ```ruby Ruby 31 | client.index('movies').update_pagination(max_total_hits: 500) 32 | ``` 33 | 34 | ```go Go 35 | client.Index("movies").UpdatePagination(&meilisearch.Pagination{ 36 | MaxTotalHits: 500, 37 | }) 38 | ``` 39 | 40 | ```csharp C# 41 | var pagination = new Pagination { 42 | MaxTotalHits = 500 43 | }; 44 | await client.Index("movies").UpdatePaginationAsync(pagination); 45 | ``` 46 | 47 | ```rust Rust 48 | let pagination = PaginationSetting {max_total_hits:500}; 49 | 50 | let task: TaskInfo = client 51 | .index("books") 52 | .set_pagination(pagination) 53 | .await 54 | .unwrap(); 55 | ``` 56 | 57 | ```swift Swift 58 | client.index("movies").updatePagination({ maxTotalHits: 500 }) 59 | ``` 60 | 61 | ```dart Dart 62 | await client 63 | .index('books') 64 | .updatePagination(Pagination(maxTotalHits: 500)); 65 | ``` 66 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_getting_started_update_stop_words.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X PUT 'MEILISEARCH_URL/indexes/movies/settings/stop-words' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '["the"]' 8 | ``` 9 | 10 | ```javascript JS 11 | client.index('movies').updateStopWords(['the']) 12 | ``` 13 | 14 | ```python Python 15 | client.index('movies').update_stop_words(['the']) 16 | ``` 17 | 18 | ```php PHP 19 | $client->index('movies')->updateStopWords(['the']); 20 | ``` 21 | 22 | ```java Java 23 | Settings settings = new Settings(); 24 | settings.setStopWords(new String[] 25 | { 26 | "the" 27 | }); 28 | client.index("movies").updateSettings(settings); 29 | ``` 30 | 31 | ```ruby Ruby 32 | client.index('movies').update_stop_words(['the']) 33 | ``` 34 | 35 | ```go Go 36 | stopWords := []string{"the"} 37 | client.Index("movies").UpdateStopWords(&stopWords) 38 | ``` 39 | 40 | ```csharp C# 41 | await client.Index("movies").UpdateStopWordsAsync(new string[] { 42 | "the" 43 | }); 44 | ``` 45 | 46 | ```rust Rust 47 | let stop_words = ["the"]; 48 | client 49 | .index("movies") 50 | .set_stop_words(&stop_words) 51 | .await 52 | .unwrap(); 53 | ``` 54 | 55 | ```swift Swift 56 | let stopWords: [String] = ["the"] 57 | client.index("movies").updateStopWords(stopWords) { (result) in 58 | switch result { 59 | case .success(let task): 60 | print(task) 61 | case .failure(let error): 62 | print(error) 63 | } 64 | } 65 | ``` 66 | 67 | ```dart Dart 68 | await client.index('movies').updateStopWords(['the']); 69 | ``` 70 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_index_settings_tutorial_api_get_setting_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/searchable-attributes' 6 | ``` 7 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_index_settings_tutorial_api_put_setting_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X PUT 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/searchable-attributes' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '[ 8 | "title", 9 | "overview" 10 | ]' 11 | ``` 12 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_index_settings_tutorial_api_task_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/tasks/TASK_UID' 6 | ``` 7 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_landing_getting_started.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```javascript Vue3.js 4 | // In main.js 5 | import { createApp } from 'vue'; 6 | import App from './App.vue'; 7 | import InstantSearch from 'vue-instantsearch/vue3/es'; 8 | import "instantsearch.css/themes/algolia-min.css"; 9 | import "@meilisearch/instant-meilisearch/templates/basic_search.css"; 10 | 11 | createApp(App).use(InstantSearch).mount('#app'); 12 | 13 | // In App.vue 14 | 27 | 28 | 42 | ``` 43 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_list_all_indexes_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes?limit=3' 6 | ``` 7 | 8 | ```javascript JS 9 | client.getIndexes({ limit: 3 }) 10 | ``` 11 | 12 | ```python Python 13 | client.get_indexes({'limit': 3}) 14 | ``` 15 | 16 | ```php PHP 17 | $client->getIndexes((new IndexesQuery())->setLimit(3)); 18 | ``` 19 | 20 | ```java Java 21 | IndexesQuery query = new IndexesQuery().setLimit(3); 22 | client.getIndexes(query); 23 | ``` 24 | 25 | ```ruby Ruby 26 | client.indexes(limit: 3) 27 | ``` 28 | 29 | ```go Go 30 | client.GetIndexes(&meilisearch.IndexesQuery{ 31 | Limit: 3, 32 | }) 33 | ``` 34 | 35 | ```csharp C# 36 | await client.GetAllIndexesAsync(new IndexesQuery { Limit = 3 }); 37 | ``` 38 | 39 | ```rust Rust 40 | let mut indexes = IndexesQuery::new(&client) 41 | .with_limit(3) 42 | .execute() 43 | .await 44 | .unwrap(); 45 | ``` 46 | 47 | ```swift Swift 48 | client.getIndexes { (result) in 49 | switch result { 50 | case .success(let indexes): 51 | print(indexes) 52 | case .failure(let error): 53 | print(error) 54 | } 55 | } 56 | ``` 57 | 58 | ```dart Dart 59 | await client.getIndexes(params: IndexesQuery(limit: 3)); 60 | ``` 61 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_multi_search_federated_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'MEILISEARCH_URL/multi-search' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '{ 8 | "federation": {}, 9 | "queries": [ 10 | { 11 | "indexUid": "movies", 12 | "q": "batman" 13 | }, 14 | { 15 | "indexUid": "comics", 16 | "q": "batman" 17 | } 18 | ] 19 | }' 20 | ``` 21 | 22 | ```javascript JS 23 | client.multiSearch({ 24 | federation: {}, 25 | queries: [ 26 | { 27 | indexUid: 'movies', 28 | q: 'batman', 29 | }, 30 | { 31 | indexUid: 'comics', 32 | q: 'batman', 33 | }, 34 | ] 35 | }) 36 | ``` 37 | 38 | ```python Python 39 | client.multi_search( 40 | [{"indexUid": "movies", "q": "batman"}, {"indexUid": "comics", "q": "batman"}], 41 | {} 42 | ) 43 | ``` 44 | 45 | ```php PHP 46 | $client->multiSearch([ 47 | (new SearchQuery()) 48 | ->setIndexUid('movies')) 49 | ->setQuery('batman'), 50 | (new SearchQuery()) 51 | ->setIndexUid('comics') 52 | ->setQuery('batman'), 53 | ], 54 | (new MultiSearchFederation()) 55 | ); 56 | ``` 57 | 58 | ```ruby Ruby 59 | client.multi_search( 60 | queries: [{ index_uid: 'movies', q: 'batman' }, { index_uid: 'comics', q: 'batman' }], 61 | federation: {} 62 | ) 63 | ``` 64 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_multi_search_remote_federated_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'MEILISEARCH_URL/multi-search' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '{ 8 | "federation": {}, 9 | "queries": [ 10 | { 11 | "indexUid": "movies", 12 | "q": "batman", 13 | "federationOptions": { 14 | "remote": "ms-00" 15 | } 16 | }, 17 | { 18 | "indexUid": "movies", 19 | "q": "batman", 20 | "federationOptions": { 21 | "remote": "ms-01" 22 | } 23 | } 24 | ] 25 | }' 26 | ``` 27 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_negative_search_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'MEILISEARCH_URL/indexes/movies/search' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '{ "q": "-escape" }' 8 | ``` 9 | 10 | ```javascript JS 11 | client.index('movies').search('-escape') 12 | ``` 13 | 14 | ```php PHP 15 | $client->index('movies')->search('-escape'); 16 | ``` 17 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_negative_search_2.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'MEILISEARCH_URL/indexes/movies/search' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '{ "q": "-\"escape room\"" }' 8 | ``` 9 | 10 | ```javascript JS 11 | client.index('movies').search('-"escape"') 12 | ``` 13 | 14 | ```php PHP 15 | $client->index('movies')->search('-"escape"'); 16 | ``` 17 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_post_dump_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'MEILISEARCH_URL/dumps' 6 | ``` 7 | 8 | ```javascript JS 9 | client.createDump() 10 | ``` 11 | 12 | ```python Python 13 | client.create_dump() 14 | ``` 15 | 16 | ```php PHP 17 | $client->createDump(); 18 | ``` 19 | 20 | ```java Java 21 | client.createDump(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.create_dump 26 | ``` 27 | 28 | ```go Go 29 | resp, err := client.CreateDump() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.CreateDumpAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | client 38 | .create_dump() 39 | .await 40 | .unwrap(); 41 | ``` 42 | 43 | ```swift Swift 44 | client.createDump { result in 45 | switch result { 46 | case .success(let dumpStatus): 47 | print(dumpStatus) 48 | case .failure(let error): 49 | print(error) 50 | } 51 | } 52 | ``` 53 | 54 | ```dart Dart 55 | await client.createDump(); 56 | ``` 57 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_primary_field_guide_create_index_primary_key.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'MEILISEARCH_URL/indexes' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '{ 8 | "uid": "books", 9 | "primaryKey": "reference_number" 10 | }' 11 | ``` 12 | 13 | ```javascript JS 14 | client.createIndex('books', { primaryKey: 'reference_number' }) 15 | ``` 16 | 17 | ```python Python 18 | client.create_index('books', {'primaryKey': 'reference_number'}) 19 | ``` 20 | 21 | ```php PHP 22 | $client->createIndex('books', ['primaryKey' => 'reference_number']); 23 | ``` 24 | 25 | ```java Java 26 | client.createIndex("books", "reference_number"); 27 | ``` 28 | 29 | ```ruby Ruby 30 | client.create_index('books', primary_key: 'reference_number') 31 | ``` 32 | 33 | ```go Go 34 | client.CreateIndex(&meilisearch.IndexConfig{ 35 | Uid: "books", 36 | PrimaryKey: "reference_number", 37 | }) 38 | ``` 39 | 40 | ```csharp C# 41 | TaskInfo task = await client.CreateIndexAsync("books", "reference_number"); 42 | ``` 43 | 44 | ```rust Rust 45 | client 46 | .create_index("books", Some("reference_number")) 47 | .await 48 | .unwrap(); 49 | ``` 50 | 51 | ```swift Swift 52 | client.createIndex(uid: "books", primaryKey: "reference_number") { (result) in 53 | switch result { 54 | case .success(let task): 55 | print(task) 56 | case .failure(let error): 57 | print(error) 58 | } 59 | } 60 | ``` 61 | 62 | ```dart Dart 63 | await client.createIndex('books', primaryKey: 'reference_number'); 64 | ``` 65 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_primary_field_guide_update_document_primary_key.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X PATCH 'MEILISEARCH_URL/indexes/books' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '{ "primaryKey": "title" }' 8 | ``` 9 | 10 | ```javascript JS 11 | client.updateIndex('books', { 12 | primaryKey: 'title' 13 | }) 14 | ``` 15 | 16 | ```python Python 17 | client.index('books').update(primary_key='title') 18 | ``` 19 | 20 | ```php PHP 21 | $client->updateIndex('books', ['primaryKey' => 'title']); 22 | ``` 23 | 24 | ```java Java 25 | client.updateIndex("books", "title"); 26 | ``` 27 | 28 | ```ruby Ruby 29 | client.index('books').update(primary_key: 'title') 30 | ``` 31 | 32 | ```go Go 33 | client.Index("books").UpdateIndex("title") 34 | ``` 35 | 36 | ```csharp C# 37 | TaskInfo task = await client.UpdateIndexAsync("books", "title"); 38 | ``` 39 | 40 | ```rust Rust 41 | let task = IndexUpdater::new("books", &client) 42 | .with_primary_key("title") 43 | .execute() 44 | .await 45 | .unwrap(); 46 | ``` 47 | 48 | ```swift Swift 49 | client.updateIndex(uid: "movies", primaryKey: "title") { (result) in 50 | switch result { 51 | case .success(let task): 52 | print(task) 53 | case .failure(let error): 54 | print(error) 55 | } 56 | } 57 | ``` 58 | 59 | ```dart Dart 60 | await client.updateIndex('books', 'title'); 61 | ``` 62 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_related_results_embedder_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl -X PATCH 'MEILISEARCH_URL/indexes/movies/settings' 5 | -H 'Content-Type: application/json' 6 | -H 'Authorization: Bearer MEILISEARCH_API_KEY' 7 | --data-binary '{ 8 | "embedders": { 9 | "movies-text": { 10 | "source": "openAi", 11 | "apiKey": "OPENAI_API_KEY", 12 | "model": "text-embedding-3-small", 13 | "documentTemplate": "A movie titled '{{doc.title}}' released in {{ doc.release_date }}. The movie genres are: {{doc.genres}}. The story is about: {{doc.overview|truncatewords: 20}}" 14 | } 15 | } 16 | }' 17 | ``` 18 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_related_results_search_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \ 5 | -H 'content-type: application/json' \ 6 | -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \ 7 | --data-binary '{ 8 | "q": "batman", 9 | "hybrid": { 10 | "embedder": "EMBEDDER_NAME" 11 | } 12 | }' 13 | ``` 14 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_related_results_similar_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'MEILISEARCH_URL/indexes/movies/similar' \ 6 | -H 'Content-Type: application/json' \ 7 | -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \ 8 | --data-binary '{ 9 | "id": 192, 10 | "embedder": "EMBEDDER_NAME" 11 | }' 12 | ``` 13 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_reset_dictionary_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/indexes/books/settings/dictionary' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('books').resetDictionary() 10 | ``` 11 | 12 | ```python Python 13 | client.index('books').reset_dictionary() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('books')->resetDictionary(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("books").resetDictionarySettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('books').reset_dictionary 26 | ``` 27 | 28 | ```go Go 29 | client.Index("books").ResetDictionary() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("books").ResetDictionaryAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let task: TaskInfo = client 38 | .index('books') 39 | .reset_dictionary() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("books").resetDictionary { result in 46 | // handle result 47 | } 48 | ``` 49 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_reset_displayed_attributes_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/displayed-attributes' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('movies').resetDisplayedAttributes() 10 | ``` 11 | 12 | ```python Python 13 | client.index('movies').reset_displayed_attributes() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('movies')->resetDisplayedAttributes(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("movies").resetDisplayedAttributesSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('movies').reset_displayed_attributes 26 | ``` 27 | 28 | ```go Go 29 | client.Index("movies").ResetDisplayedAttributes() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("movies").ResetDisplayedAttributesAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let task: TaskInfo = client 38 | .index("movies") 39 | .reset_displayed_attributes() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("movies").resetDisplayedAttributes { (result) in 46 | switch result { 47 | case .success(let task): 48 | print(task) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.index('movies').resetDisplayedAttributes(); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_reset_distinct_attribute_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('shoes').resetDistinctAttribute() 10 | ``` 11 | 12 | ```python Python 13 | client.index('shoes').reset_distinct_attribute() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('shoes')->resetDistinctAttribute(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("shoes").resetDistinctAttributeSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('shoes').reset_distinct_attribute 26 | ``` 27 | 28 | ```go Go 29 | client.Index("shoes").ResetDistinctAttribute() 30 | ``` 31 | 32 | ```csharp C# 33 | TaskInfo result = await client.Index("shoes").ResetDistinctAttributeAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let task: TaskInfo = client 38 | .index("shoes") 39 | .reset_distinct_attribute() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("shoes").resetDistinctAttribute { (result) in 46 | switch result { 47 | case .success(let task): 48 | print(task) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.index('shoes').resetDistinctAttribute(); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_reset_embedders_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders' 6 | ``` 7 | 8 | ```ruby Ruby 9 | client.index('INDEX_NAME').reset_embedders 10 | ``` 11 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_reset_facet_search_settings_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('INDEX_NAME').resetFacetSearch(); 10 | ``` 11 | 12 | ```php PHP 13 | $client->index('INDEX_NAME')->resetFacetSearch(); 14 | ``` 15 | 16 | ```ruby Ruby 17 | client.index('INDEX_UID').reset_facet_search_setting 18 | ``` 19 | 20 | ```go Go 21 | client.Index("books").ResetFacetSearch() 22 | ``` 23 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_reset_faceting_settings_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/indexes/books/settings/faceting' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('books').resetFaceting() 10 | ``` 11 | 12 | ```python Python 13 | client.index('books').reset_faceting_settings() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('books')->resetFaceting(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("books").resetFacetingSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | index('books').reset_faceting 26 | ``` 27 | 28 | ```go Go 29 | client.Index("books").ResetFaceting() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("movies").ResetFacetingAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let task: TaskInfo = client 38 | .index("books") 39 | .reset_faceting() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```dart Dart 45 | await client.index('movies').resetFaceting(); 46 | ``` 47 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_reset_filterable_attributes_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/filterable-attributes' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('movies').resetFilterableAttributes() 10 | ``` 11 | 12 | ```python Python 13 | client.index('movies').reset_filterable_attributes() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('movies')->resetFilterableAttributes(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("movies").resetFilterableAttributesSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('movies').reset_filterable_attributes 26 | ``` 27 | 28 | ```go Go 29 | client.Index("movies").ResetFilterableAttributes() 30 | ``` 31 | 32 | ```csharp C# 33 | TaskInfo result = await client.Index("movies").ResetFilterableAttributesAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let task: TaskInfo = client 38 | .index("movies") 39 | .reset_filterable_attributes() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("movies").resetFilterableAttributes { (result) in 46 | switch result { 47 | case .success(let attributes): 48 | print(attributes) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.index('movies').resetFilterableAttributes(); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_reset_localized_attribute_settings_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('INDEX_NAME').resetLocalizedAttributes() 10 | ``` 11 | 12 | ```python Python 13 | client.index('INDEX_NAME').reset_localized_attributes() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('INDEX_NAME')->resetLocalizedAttributes(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("INDEX_NAME").resetLocalizedAttributesSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('INDEX_NAME').reset_localized_attributes 26 | ``` 27 | 28 | ```go Go 29 | client.index("INDEX_NAME").ResetLocalizedAttributes() 30 | ``` 31 | 32 | ```rust Rust 33 | let task: TaskInfo = client 34 | .index("books") 35 | .reset_localized_attributes() 36 | .await 37 | .unwrap(); 38 | ``` 39 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_reset_non_separator_tokens_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('books').resetNonSeparatorTokens() 10 | ``` 11 | 12 | ```python Python 13 | client.index('articles').reset_non_separator_tokens() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('articles')->resetNonSeparatorTokens(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("articles").resetNonSeparatorTokensSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('articles').reset_non_separator_tokens 26 | ``` 27 | 28 | ```go Go 29 | client.Index("articles").ResetNonSeparatorTokens() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("movies").ResetNonSeparatorTokensAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let task: TaskInfo = client 38 | .index('articles') 39 | .reset_non_separator_tokens() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("books").resetNonSeparatorTokens { result in 46 | // handle result 47 | } 48 | ``` 49 | 50 | ```dart Dart 51 | await client.index('articles').resetNonSeparatorTokens(); 52 | ``` 53 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_reset_pagination_settings_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/indexes/books/settings/pagination' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('books').resetPagination() 10 | ``` 11 | 12 | ```python Python 13 | client.index('books').reset_pagination_settings() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('books')->resetPagination(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("books").resetPaginationSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | index('books').reset_pagination 26 | ``` 27 | 28 | ```go Go 29 | client.Index("books").ResetPagination() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("movies").ResetPaginationAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let task: TaskInfo = client 38 | .index("books") 39 | .reset_pagination() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```dart Dart 45 | await client.index('movies').resetPagination(); 46 | ``` 47 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_reset_prefix_search_settings_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('INDEX_NAME').resetPrefixSearch(); 10 | ``` 11 | 12 | ```php PHP 13 | $client->index('INDEX_NAME')->resetPrefixSearch(); 14 | ``` 15 | 16 | ```ruby Ruby 17 | client.index('INDEX_UID').reset_prefix_search 18 | ``` 19 | 20 | ```go Go 21 | client.Index("books").ResetPrefixSearch() 22 | ``` 23 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_reset_proximity_precision_settings_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/indexes/books/settings/proximity-precision' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('books').resetProximityPrecision() 10 | ``` 11 | 12 | ```python Python 13 | client.index('books').reset_proximity_precision() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('books')->resetProximityPrecision(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("books").resetProximityPrecisionSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('books').reset_proximity_precision 26 | ``` 27 | 28 | ```go Go 29 | client.Index("books").ResetProximityPrecision() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("books").ResetProximityPrecisionAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let task: TaskInfo = client 38 | .index("books") 39 | .reset_proximity_precision() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | let task = try await self.client.index("books").resetProximityPrecision() 46 | ``` 47 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_reset_ranking_rules_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/ranking-rules' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('movies').resetRankingRules() 10 | ``` 11 | 12 | ```python Python 13 | client.index('movies').reset_ranking_rules() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('movies')->resetRankingRules(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("movies").resetRankingRulesSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('movies').reset_ranking_rules 26 | ``` 27 | 28 | ```go Go 29 | client.Index("movies").ResetRankingRules() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("movies").ResetRankingRulesAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let task: TaskInfo = client 38 | .index("movies") 39 | .reset_ranking_rules() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("movies").resetRankingRules { (result) in 46 | switch result { 47 | case .success(let task): 48 | print(task) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.index('movies').resetRankingRules(); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_reset_search_cutoff_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('movies').resetSearchCutoffMs() 10 | ``` 11 | 12 | ```python Python 13 | client.index('movies').reset_search_cutoff_ms() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('movies')->resetSearchCutoffMs(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("movies").resetSearchCutoffMsSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('movies').reset_search_cutoff_ms 26 | ``` 27 | 28 | ```go Go 29 | client.Index("books").ResetSearchCutoffMs() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("movies").ResetSearchCutoffMsAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let task: TaskInfo = client 38 | .index("movies") 39 | .reset_search_cutoff_ms() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | let task = try await self.client.index("books").resetSearchCutoffMs() 46 | ``` 47 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_reset_searchable_attributes_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/searchable-attributes' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('movies').resetSearchableAttributes() 10 | ``` 11 | 12 | ```python Python 13 | client.index('movies').reset_searchable_attributes() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('movies')->resetSearchableAttributes(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("movies").resetSearchableAttributesSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('movies').reset_searchable_attributes 26 | ``` 27 | 28 | ```go Go 29 | client.Index("movies").ResetSearchableAttributes() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("movies").ResetSearchableAttributesAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let task: TaskInfo = client 38 | .index("movies") 39 | .reset_searchable_attributes() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("movies").resetSearchableAttributes { (result) in 46 | switch result { 47 | case .success(let task): 48 | print(task) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.index('movies').resetSearchableAttributes(); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_reset_separator_tokens_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('books').resetSeparatorTokens() 10 | ``` 11 | 12 | ```python Python 13 | client.index('articles').reset_separator_tokens() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('articles')->resetSeparatorTokens(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("articles").resetSeparatorTokensSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('articles').reset_separator_tokens 26 | ``` 27 | 28 | ```go Go 29 | client.Index("articles").ResetSeparatorTokens() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("movies").ResetSeparatorTokensAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let task: TaskInfo = client 38 | .index('articles') 39 | .reset_separator_tokens() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("books").resetSeparatorTokens { result in 46 | // handle result 47 | } 48 | ``` 49 | 50 | ```dart Dart 51 | await client.index('articles').resetSeparatorTokens(); 52 | ``` 53 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_reset_settings_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/indexes/movies/settings' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('movies').resetSettings() 10 | ``` 11 | 12 | ```python Python 13 | client.index('movies').reset_settings() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('movies')->resetSettings(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("movies").resetSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('movies').reset_settings 26 | ``` 27 | 28 | ```go Go 29 | client.Index("movies").ResetSettings() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("movies").ResetSettingsAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let task: TaskInfo = client 38 | .index("movies") 39 | .reset_settings() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("movies").resetSettings { (result) in 46 | switch result { 47 | case .success(let task): 48 | print(task) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.index('movies').resetSettings(); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_reset_sortable_attributes_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/indexes/books/settings/sortable-attributes' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('books').resetSortableAttributes() 10 | ``` 11 | 12 | ```python Python 13 | client.index('books').reset_sortable_attributes() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('books')->resetSortableAttributes(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("books").resetSortableAttributesSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('books').reset_sortable_attributes 26 | ``` 27 | 28 | ```go Go 29 | client.Index("books").ResetSortableAttributes() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("books").ResetSortableAttributesAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let task: TaskInfo = client 38 | .index("books") 39 | .reset_sortable_attributes() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("books").resetSortableAttributes() { (result) in 46 | switch result { 47 | case .success(let attributes): 48 | print(attributes) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.index('books').resetSortableAttributes(); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_reset_stop_words_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/stop-words' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('movies').resetStopWords() 10 | ``` 11 | 12 | ```python Python 13 | client.index('movies').reset_stop_words() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('movies')->resetStopWords(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("movies").resetStopWordsSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('movies').reset_stop_words 26 | ``` 27 | 28 | ```go Go 29 | client.Index("movies").ResetStopWords() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("movies").ResetStopWordsAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let task: TaskInfo = client 38 | .index("movies") 39 | .reset_stop_words() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("movies").resetStopWords { (result) in 46 | switch result { 47 | case .success(let task): 48 | print(task) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.index('movies').resetStopWords(); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_reset_synonyms_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/synonyms' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('movies').resetSynonyms() 10 | ``` 11 | 12 | ```python Python 13 | client.index('movies').reset_synonyms() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('movies')->resetSynonyms(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("movies").resetSynonymsSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | client.index('movies').reset_synonyms 26 | ``` 27 | 28 | ```go Go 29 | client.Index("movies").ResetSynonyms() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("movies").ResetSynonymsAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let task: TaskInfo = client 38 | .index("movies") 39 | .reset_synonyms() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```swift Swift 45 | client.index("movies").resetSynonyms { (result) in 46 | switch result { 47 | case .success(let task): 48 | print(task) 49 | case .failure(let error): 50 | print(error) 51 | } 52 | } 53 | ``` 54 | 55 | ```dart Dart 56 | await client.index('movies').resetSynonyms(); 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_reset_typo_tolerance_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'MEILISEARCH_URL/indexes/books/settings/typo-tolerance' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('books').resetTypoTolerance() 10 | ``` 11 | 12 | ```python Python 13 | client.index('books').reset_typo_tolerance() 14 | ``` 15 | 16 | ```php PHP 17 | $client->index('books')->resetTypoTolerance(); 18 | ``` 19 | 20 | ```java Java 21 | client.index("books").resetTypoToleranceSettings(); 22 | ``` 23 | 24 | ```ruby Ruby 25 | index('books').reset_typo_tolerance 26 | ``` 27 | 28 | ```go Go 29 | client.Index("books").ResetTypoTolerance() 30 | ``` 31 | 32 | ```csharp C# 33 | await client.Index("books").ResetTypoToleranceAsync(); 34 | ``` 35 | 36 | ```rust Rust 37 | let task: TaskInfo = client 38 | .index("books") 39 | .reset_typo_tolerance() 40 | .await 41 | .unwrap(); 42 | ``` 43 | 44 | ```dart Dart 45 | await client.index('books').resetTypoTolerance(); 46 | ``` 47 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_search_get_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'MEILISEARCH_URL/indexes/movies/search?q=american%20ninja' 6 | ``` 7 | 8 | ```javascript JS 9 | client.index('movies').searchGet('American ninja') 10 | ``` 11 | 12 | ```dart Dart 13 | await client.index('movies').search('American ninja'); 14 | ``` 15 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_search_parameter_guide_hybrid_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \ 5 | -H 'content-type: application/json' \ 6 | --data-binary '{ 7 | "q": "kitchen utensils", 8 | "hybrid": { 9 | "semanticRatio": 0.9, 10 | "embedder": "EMBEDDER_NAME" 11 | } 12 | }' 13 | ``` 14 | 15 | ```javascript JS 16 | client.index('INDEX_NAME').search('kitchen utensils', { 17 | hybrid: { 18 | semanticRatio: 0.9, 19 | embedder: 'EMBEDDER_NAME' 20 | } 21 | }) 22 | ``` 23 | 24 | ```php PHP 25 | $client->index('INDEX_NAME')->search('kitchen utensils', [ 26 | 'hybrid' => [ 27 | 'semanticRatio' => 0.9, 28 | 'embedder' => 'EMBEDDER_NAME' 29 | ] 30 | ]); 31 | ``` 32 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_search_parameter_guide_matching_strategy_3.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'MEILISEARCH_URL/indexes/movies/search' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '{ 8 | "q": "white shirt", 9 | "matchingStrategy": "frequency" 10 | }' 11 | ``` 12 | 13 | ```javascript JS 14 | client.index('movies').search('white shirt', { 15 | matchingStrategy: 'frequency' 16 | }) 17 | ``` 18 | 19 | ```python Python 20 | client.index('movies').search('big fat liar', { 21 | 'matchingStrategy': 'frequency' 22 | }) 23 | ``` 24 | 25 | ```php PHP 26 | $client->index('movies')->search('white shirt', ['matchingStrategy' => 'frequency']); 27 | ``` 28 | 29 | ```java Java 30 | SearchRequest searchRequest = SearchRequest.builder().q("white shirt").matchingStrategy(MatchingStrategy.FREQUENCY).build(); 31 | client.index("movies").search(searchRequest); 32 | ``` 33 | 34 | ```ruby Ruby 35 | client.index('movies').search('white shirt', { 36 | matching_strategy: 'frequency' 37 | }) 38 | ``` 39 | 40 | ```go Go 41 | client.Index("movies").Search("white shirt", &meilisearch.SearchRequest{ 42 | MatchingStrategy: Frequency, 43 | }) 44 | ``` 45 | 46 | ```rust Rust 47 | let results: SearchResults = client 48 | .index("movies") 49 | .search() 50 | .with_query("white shirt") 51 | .with_matching_strategy(MatchingStrategies::FREQUENCY) 52 | .execute() 53 | .await 54 | .unwrap(); 55 | ``` 56 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_search_parameter_guide_query_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'MEILISEARCH_URL/indexes/movies/search' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '{ "q": "shifu" }' 8 | ``` 9 | 10 | ```javascript JS 11 | client.index('movies').search('shifu') 12 | ``` 13 | 14 | ```python Python 15 | client.index('movies').search('shifu') 16 | ``` 17 | 18 | ```php PHP 19 | $client->index('movies')->search('shifu'); 20 | ``` 21 | 22 | ```java Java 23 | client.index("movies").search("shifu"); 24 | ``` 25 | 26 | ```ruby Ruby 27 | client.index('movies').search('shifu') 28 | ``` 29 | 30 | ```go Go 31 | resp, err := client.Index("movies").Search("shifu", &meilisearch.SearchRequest{}) 32 | ``` 33 | 34 | ```csharp C# 35 | await client.Index("movies").SearchAsync("shifu"); 36 | ``` 37 | 38 | ```rust Rust 39 | let results: SearchResults = client 40 | .index("movies") 41 | .search() 42 | .with_query("shifu") 43 | .execute() 44 | .await 45 | .unwrap(); 46 | ``` 47 | 48 | ```swift Swift 49 | client.index("movies").search(SearchParameters(query: "shifu")) { (result: Result, Swift.Error>) in 50 | switch result { 51 | case .success(let searchResult): 52 | print(searchResult) 53 | case .failure(let error): 54 | print(error) 55 | } 56 | } 57 | ``` 58 | 59 | ```dart Dart 60 | await client.index('movies').search('shifu'); 61 | ``` 62 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_search_parameter_guide_vector_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \ 5 | -H 'content-type: application/json' \ 6 | --data-binary '{ 7 | "vector": [0, 1, 2], 8 | "hybrid": { 9 | "embedder": "EMBEDDER_NAME" 10 | } 11 | }' 12 | ``` 13 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_search_parameter_reference_distinct_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '{ 8 | "q": "QUERY TERMS", 9 | "distinct": "ATTRIBUTE_A" 10 | }' 11 | ``` 12 | 13 | ```javascript JS 14 | client.index('INDEX_NAME').search('QUERY TERMS', { distinct: 'ATTRIBUTE_A' }) 15 | ``` 16 | 17 | ```python Python 18 | client.index('INDEX_NAME').search('QUERY_TERMS', { distinct: 'ATTRIBUTE_A' }) 19 | ``` 20 | 21 | ```php PHP 22 | $client->index('INDEX_NAME')->search('QUERY TERMS', [ 23 | 'distinct' => 'ATTRIBUTE_A' 24 | ]); 25 | ``` 26 | 27 | ```java Java 28 | SearchRequest searchRequest = SearchRequest.builder().q("QUERY TERMS").distinct("ATTRIBUTE_A").build(); 29 | client.index("INDEX_NAME").search(searchRequest); 30 | ``` 31 | 32 | ```ruby Ruby 33 | client.index('INDEX_NAME').search('QUERY TERMS', { 34 | distinct: 'ATTRIBUTE_A' 35 | }) 36 | ``` 37 | 38 | ```go Go 39 | client.Index("INDEX_NAME").Search("QUERY TERMS", &meilisearch.SearchRequest{ 40 | Distinct: "ATTRIBUTE_A", 41 | }) 42 | ``` 43 | 44 | ```csharp C# 45 | var params = new SearchQuery() 46 | { 47 | Distinct = "ATTRIBUTE_A" 48 | }; 49 | await client.Index("INDEX_NAME").SearchAsync("QUERY TERMS", params); 50 | ``` 51 | 52 | ```rust Rust 53 | let res = client 54 | .index("INDEX_NAME") 55 | .search() 56 | .with_query("QUERY TERMS") 57 | .with_distinct("ATTRIBUTE_A") 58 | .execute() 59 | .await 60 | .unwrap(); 61 | ``` 62 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_search_parameter_reference_locales_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '{ 8 | "q": "QUERY TEXT IN JAPANESE", 9 | "locales": ["jpn"] 10 | }' 11 | ``` 12 | 13 | ```javascript JS 14 | client.index('INDEX_NAME').search('QUERY TEXT IN JAPANESE', { locales: ['jpn'] }) 15 | ``` 16 | 17 | ```python Python 18 | client.index('INDEX_NAME').search('進撃の巨人', { 'locales': ['jpn'] }) 19 | ``` 20 | 21 | ```php PHP 22 | $client->index('INDEX_NAME')->search('QUERY TEXT IN JAPANESE', [ 23 | 'locales' => ['jpn'] 24 | ]); 25 | ``` 26 | 27 | ```java Java 28 | SearchRequest searchRequest = SearchRequest.builder().q("QUERY TEXT IN JAPANESE").locales(new String[]{"jpn"}).build(); 29 | client.index("INDEX_NAME").search(searchRequest); 30 | ``` 31 | 32 | ```ruby Ruby 33 | client.index('INDEX_NAME').search('進撃の巨人', { locales: ['jpn'] }) 34 | ``` 35 | 36 | ```go Go 37 | client.index("INDEX_NAME").Search("QUERY TEXT IN JAPANESE", &meilisearch.SearchRequest{ 38 | Locates: []string{"jpn"} 39 | }) 40 | ``` 41 | 42 | ```rust Rust 43 | let res = client 44 | .index("books") 45 | .search() 46 | .with_query("進撃の巨人") 47 | .with_locales(&["jpn"]) 48 | .execute() 49 | .await 50 | .unwrap(); 51 | ``` 52 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_search_parameter_reference_ranking_score_threshold_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '{ 8 | "q": "badman", 9 | "rankingScoreThreshold": 0.2 10 | }' 11 | ``` 12 | 13 | ```javascript JS 14 | client.index('INDEX_NAME').search('badman', { rankingScoreThreshold: 0.2 }) 15 | ``` 16 | 17 | ```python Python 18 | client.index('INDEX_NAME').search('badman', { 'rankingScoreThreshold': 0.2 }) 19 | ``` 20 | 21 | ```php PHP 22 | $client->index('INDEX_NAME')->search('badman', [ 23 | 'rankingScoreThreshold' => 0.2 24 | ]); 25 | ``` 26 | 27 | ```java Java 28 | SearchRequest searchRequest = SearchRequest.builder().q("badman").rankingScoreThreshold(0.2).build(); 29 | client.index("INDEX_NAME").search(searchRequest); 30 | ``` 31 | 32 | ```ruby Ruby 33 | client.index('INDEX_NAME').search('badman', { 34 | rankingScoreThreshold: 0.2 35 | }) 36 | ``` 37 | 38 | ```go Go 39 | client.Index("INDEX_NAME").Search("badman", &meilisearch.SearchRequest{ 40 | RankingScoreThreshold: 0.2, 41 | }) 42 | ``` 43 | 44 | ```rust Rust 45 | let res = client 46 | .index("INDEX_NAME") 47 | .search() 48 | .with_query("badman") 49 | .with_ranking_score_threshold(0.2) 50 | .execute() 51 | .await 52 | .unwrap(); 53 | ``` 54 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_search_parameter_reference_retrieve_vectors_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \ 5 | -H 'content-type: application/json' \ 6 | --data-binary '{ 7 | "q": "kitchen utensils", 8 | "retrieveVectors": true, 9 | "hybrid": { 10 | "embedder": "EMBEDDER_NAME" 11 | } 12 | }' 13 | ``` 14 | 15 | ```javascript JS 16 | client.index('INDEX_NAME').search('kitchen utensils', { 17 | retrieveVectors: true, 18 | hybrid: { 19 | embedder: 'EMBEDDER_NAME' 20 | } 21 | }) 22 | ``` 23 | 24 | ```php PHP 25 | $client->index('INDEX_NAME')->search('kitchen utensils', [ 26 | 'retrieveVectors' => true, 27 | 'hybrid' => [ 28 | 'embedder': 'EMBEDDER_NAME' 29 | ] 30 | ]); 31 | ``` 32 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_search_post_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'MEILISEARCH_URL/indexes/movies/search' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '{ "q": "american ninja" }' 8 | ``` 9 | 10 | ```javascript JS 11 | client.index('movies').search('American ninja') 12 | ``` 13 | 14 | ```python Python 15 | client.index('movies').search('American ninja') 16 | ``` 17 | 18 | ```php PHP 19 | $client->index('movies')->search('american ninja'); 20 | ``` 21 | 22 | ```java Java 23 | client.index("movies").search("American ninja"); 24 | ``` 25 | 26 | ```ruby Ruby 27 | client.index('movies').search('american ninja') 28 | ``` 29 | 30 | ```go Go 31 | client.Index("movies").Search("american ninja", &meilisearch.SearchRequest{}) 32 | ``` 33 | 34 | ```csharp C# 35 | await client.Index("movies").SearchAsync("American ninja"); 36 | ``` 37 | 38 | ```rust Rust 39 | let results: SearchResults = client 40 | .index("movies") 41 | .search() 42 | .with_query("American ninja") 43 | .execute() 44 | .await 45 | .unwrap(); 46 | ``` 47 | 48 | ```swift Swift 49 | let searchParameters = SearchParameters(query: "American ninja") 50 | client.index("movies").search(searchParameters) { (result: Result, Swift.Error>) in 51 | switch result { 52 | case .success(let searchResult): 53 | print(searchResult) 54 | case .failure(let error): 55 | print(error) 56 | } 57 | } 58 | ``` 59 | 60 | ```dart Dart 61 | await client.index('movies').search('American ninja'); 62 | ``` 63 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_tenant_token_guide_search_no_sdk_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'MEILISEARCH_URL/indexes/patient_medical_records/search' \ 6 | -H 'Authorization: Bearer TENANT_TOKEN' 7 | ``` 8 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_update_an_index_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X PATCH 'MEILISEARCH_URL/indexes/movies' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '{ "primaryKey": "id" }' 8 | ``` 9 | 10 | ```javascript JS 11 | client.updateIndex('movies', { primaryKey: 'id' }) 12 | ``` 13 | 14 | ```python Python 15 | client.index('movies').update(primary_key='id') 16 | ``` 17 | 18 | ```php PHP 19 | $client->updateIndex('movies', ['primaryKey' => 'id']); 20 | ``` 21 | 22 | ```java Java 23 | client.updateIndex("movies", "id"); 24 | ``` 25 | 26 | ```ruby Ruby 27 | client.index('movies').update(primary_key: 'movie_id') 28 | ``` 29 | 30 | ```go Go 31 | client.Index("movies").UpdateIndex("id") 32 | ``` 33 | 34 | ```csharp C# 35 | TaskInfo task = await client.UpdateIndexAsync("movies", "id"); 36 | ``` 37 | 38 | ```rust Rust 39 | let task = IndexUpdater::new("movies", &client) 40 | .with_primary_key("movie_review_id") 41 | .execute() 42 | .await 43 | .unwrap(); 44 | ``` 45 | 46 | ```swift Swift 47 | client.index("movies").update(primaryKey: "id") { (result) in 48 | switch result { 49 | case .success(let task): 50 | print(task) 51 | case .failure(let error): 52 | print(error) 53 | } 54 | } 55 | ``` 56 | 57 | ```dart Dart 58 | await client.index('movies').update(primaryKey: 'id'); 59 | ``` 60 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_update_dictionary_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X PUT 'MEILISEARCH_URL/indexes/books/settings/dictionary' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '[ 8 | "J. R. R.", 9 | "W. E. B." 10 | ]' 11 | ``` 12 | 13 | ```javascript JS 14 | client.index('books').updateDictionary(['J. R. R.', 'W. E. B.']) 15 | ``` 16 | 17 | ```python Python 18 | client.index('books').update_dictionary(["J. R. R.", "W. E. B."]) 19 | ``` 20 | 21 | ```php PHP 22 | $client->index('books')->updateDictionary(['J. R. R.', 'W. E. B.']); 23 | ``` 24 | 25 | ```java Java 26 | client.index("books").updateDictionarySettings(new String[] {"J. R. R.", "W. E. B."}); 27 | ``` 28 | 29 | ```ruby Ruby 30 | client.index('books').update_dictionary(['J. R. R.', 'W. E. B.']) 31 | ``` 32 | 33 | ```go Go 34 | client.Index("books").UpdateDictionary([]string{ 35 | "J. R. R.", 36 | "W. E. B.", 37 | }) 38 | ``` 39 | 40 | ```csharp C# 41 | var newDictionary = new string[] { "J. R. R.", "W. E. B." }; 42 | await client.Index("books").UpdateDictionaryAsync(newDictionary); 43 | ``` 44 | 45 | ```rust Rust 46 | let task: TaskInfo = client 47 | .index('books') 48 | .set_dictionary(['J. R. R.', 'W. E. B.']) 49 | .await 50 | .unwrap(); 51 | ``` 52 | 53 | ```swift Swift 54 | client.index("books").updateDictionary(["J. R. R.", "W. E. B."]) { result in 55 | // handle result 56 | } 57 | ``` 58 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_update_distinct_attribute_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X PUT 'MEILISEARCH_URL/indexes/shoes/settings/distinct-attribute' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '"skuid"' 8 | ``` 9 | 10 | ```javascript JS 11 | client.index('shoes').updateDistinctAttribute('skuid') 12 | ``` 13 | 14 | ```python Python 15 | client.index('shoes').update_distinct_attribute('skuid') 16 | ``` 17 | 18 | ```php PHP 19 | $client->index('shoes')->updateDistinctAttribute('skuid'); 20 | ``` 21 | 22 | ```java Java 23 | client.index("shoes").updateDistinctAttributeSettings("skuid"); 24 | ``` 25 | 26 | ```ruby Ruby 27 | client.index('shoes').update_distinct_attribute('skuid') 28 | ``` 29 | 30 | ```go Go 31 | client.Index("shoes").UpdateDistinctAttribute("skuid") 32 | ``` 33 | 34 | ```csharp C# 35 | TaskInfo result = await client.Index("shoes").UpdateDistinctAttributeAsync("skuid"); 36 | ``` 37 | 38 | ```rust Rust 39 | let task: TaskInfo = client 40 | .index("shoes") 41 | .set_distinct_attribute("skuid") 42 | .await 43 | .unwrap(); 44 | ``` 45 | 46 | ```swift Swift 47 | client.index("shoes").updateDistinctAttribute("skuid") { (result) in 48 | switch result { 49 | case .success(let task): 50 | print(task) 51 | case .failure(let error): 52 | print(error) 53 | } 54 | } 55 | ``` 56 | 57 | ```dart Dart 58 | await client.index('shoes').updateDistinctAttribute('skuid'); 59 | ``` 60 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_update_embedders_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X PATCH 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '{ 8 | "default": { 9 | "source": "openAi", 10 | "apiKey": "OPEN_AI_API_KEY", 11 | "model": "text-embedding-3-small", 12 | "documentTemplate": "A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}" 13 | } 14 | }' 15 | ``` 16 | 17 | ```javascript JS 18 | client.index('INDEX_NAME').updateEmbedders({ 19 | default: { 20 | source: 'openAi', 21 | apiKey: 'OPEN_AI_API_KEY', 22 | model: 'text-embedding-3-small', 23 | documentTemplate: 'A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}' 24 | } 25 | }); 26 | ``` 27 | 28 | ```php PHP 29 | $client->updateEmbedders([ 30 | 'default' => [ 31 | 'source' => 'openAi', 32 | 'apiKey' => 'OPEN_AI_API_KEY', 33 | 'model' => 'text-embedding-3-small', 34 | 'documentTemplate' => 'A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}' 35 | ] 36 | ]); 37 | ``` 38 | 39 | ```ruby Ruby 40 | client.index('INDEX_NAME').update_embedders( 41 | default: { 42 | source: 'openAi', 43 | api_key: 'OPEN_AI_API_KEY', 44 | model: 'text-embedding-3-small', 45 | document_template: "A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}" 46 | } 47 | ) 48 | ``` 49 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_update_experimental_features_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X PATCH 'MEILISEARCH_URL/experimental-features/' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '{ 8 | "metrics": true 9 | }' 10 | ``` 11 | 12 | ```ruby Ruby 13 | client.update_experimental_features(metrics: true) 14 | ``` 15 | 16 | ```go Go 17 | client.ExperimentalFeatures().SetMetrics(true).Update() 18 | ``` 19 | 20 | ```rust Rust 21 | let client = Client::new("http://localhost:7700", Some("apiKey")); 22 | let features = ExperimentalFeatures::new(&client); 23 | features.set_metrics(true) 24 | let res = features 25 | .update() 26 | .await 27 | .unwrap(); 28 | ``` 29 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_update_facet_search_settings_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/facet-search' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary 'false' 8 | ``` 9 | 10 | ```javascript JS 11 | client.index('INDEX_NAME').updateFacetSearch(false); 12 | ``` 13 | 14 | ```php PHP 15 | $client->index('INDEX_NAME')->updateFacetSearch(false); 16 | ``` 17 | 18 | ```ruby Ruby 19 | client.index('INDEX_UID').update_facet_search_setting(false) 20 | ``` 21 | 22 | ```go Go 23 | client.Index("books").UpdateFacetSearch(false) 24 | ``` 25 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_update_network_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X PATCH 'MEILISEARCH_URL/network' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '{ 8 | "self": "ms-00", 9 | "remotes": { 10 | "ms-00": { 11 | "url": "http://INSTANCE_URL", 12 | "searchApiKey": "INSTANCE_API_KEY" 13 | }, 14 | "ms-01": { 15 | "url": "http://ANOTHER_INSTANCE_URL", 16 | "searchApiKey": "ANOTHER_INSTANCE_API_KEY" 17 | } 18 | } 19 | }' 20 | ``` 21 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_update_non_separator_tokens_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X PUT 'MEILISEARCH_URL/indexes/articles/settings/non-separator-tokens' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '["@", "#"]' 8 | ``` 9 | 10 | ```javascript JS 11 | client.index('books').updateNonSeparatorTokens(['@', '#']) 12 | ``` 13 | 14 | ```python Python 15 | client.index('articles').update_non_separator_tokens(["@", "#"]) 16 | ``` 17 | 18 | ```php PHP 19 | $client->index('articles')->updateNonSeparatorTokens(['@', '#']); 20 | ``` 21 | 22 | ```java Java 23 | String[] newSeparatorTokens = { "@", "#" }; 24 | client.index("articles").updateNonSeparatorTokensSettings(newSeparatorTokens); 25 | ``` 26 | 27 | ```ruby Ruby 28 | client.index('articles').update_non_separator_tokens(['@', '#']) 29 | ``` 30 | 31 | ```go Go 32 | client.Index("articles").UpdateNonSeparatorTokens([]string{ 33 | "@", 34 | "#", 35 | }) 36 | ``` 37 | 38 | ```csharp C# 39 | await client.Index("movies").UpdateNonSeparatorTokensAsync(new[] { "@", "#" }); 40 | ``` 41 | 42 | ```rust Rust 43 | let task: TaskInfo = client 44 | .index('articles') 45 | .set_non_separator_tokens(&vec!['@'.to_string(), '#'.to_string()]) 46 | .await 47 | .unwrap(); 48 | ``` 49 | 50 | ```swift Swift 51 | client.index("books").updateNonSeparatorTokens(["@", "#"]) { result in 52 | // handle result 53 | } 54 | ``` 55 | 56 | ```dart Dart 57 | await client.index('articles').updateNonSeparatorTokens(["@", "#"]); 58 | ``` 59 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_update_pagination_settings_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X PATCH 'MEILISEARCH_URL/indexes/books/settings/pagination' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '{ 8 | "maxTotalHits": 100 9 | }' 10 | ``` 11 | 12 | ```javascript JS 13 | client.index('books').updateSettings({ pagination: { maxTotalHits: 100 }}) 14 | ``` 15 | 16 | ```python Python 17 | client.index('books').update_pagination_settings({'maxTotalHits': 100}) 18 | ``` 19 | 20 | ```php PHP 21 | $client->index('books')->updateSettings([ 22 | 'pagination' => [ 23 | 'maxTotalHits' => 100 24 | ] 25 | ]); 26 | ``` 27 | 28 | ```java Java 29 | Pagination newPagination = new Pagination(); 30 | newPagination.setMaxTotalHits(100); 31 | client.index("books").updatePaginationSettings(newPagination); 32 | ``` 33 | 34 | ```ruby Ruby 35 | index('books').update_pagination({ max_total_hits: 100 }) 36 | ``` 37 | 38 | ```go Go 39 | client.Index("books").UpdatePagination(&meilisearch.Pagination{ 40 | MaxTotalHits: 100, 41 | }) 42 | ``` 43 | 44 | ```csharp C# 45 | var pagination = new Pagination { 46 | MaxTotalHits = 20 47 | }; 48 | await client.Index("movies").UpdatePaginationAsync(pagination); 49 | ``` 50 | 51 | ```rust Rust 52 | let pagination = PaginationSetting {max_total_hits:100}; 53 | 54 | let task: TaskInfo = client 55 | .index("books") 56 | .set_pagination(pagination) 57 | .await 58 | .unwrap(); 59 | ``` 60 | 61 | ```dart Dart 62 | await client 63 | .index('books') 64 | .updatePagination(Pagination(maxTotalHits: 100)); 65 | ``` 66 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_update_prefix_search_settings_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/prefix-search' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '"disabled"' 8 | ``` 9 | 10 | ```javascript JS 11 | client.index('INDEX_NAME').updatePrefixSearch('disabled'); 12 | ``` 13 | 14 | ```php PHP 15 | $client->index('INDEX_NAME')->updatePrefixSearch('disabled'); 16 | ``` 17 | 18 | ```ruby Ruby 19 | client.index('INDEX_UID').update_prefix_search('disabled') 20 | ``` 21 | 22 | ```go Go 23 | client.Index("books").UpdatePrefixSearch("disabled") 24 | ``` 25 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_update_proximity_precision_settings_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X PUT 'MEILISEARCH_URL/indexes/books/settings/proximity-precision' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '"byAttribute"' 8 | ``` 9 | 10 | ```javascript JS 11 | client.index('books').updateProximityPrecision('byAttribute') 12 | ``` 13 | 14 | ```python Python 15 | client.index('books').update_proximity_precision(ProximityPrecision.BY_ATTRIBUTE) 16 | ``` 17 | 18 | ```php PHP 19 | $client->index('books')->updateProximityPrecision('byAttribute'); 20 | ``` 21 | 22 | ```java Java 23 | client.index("books").updateProximityPrecisionSettings("byAttribute"); 24 | ``` 25 | 26 | ```ruby Ruby 27 | client.index('books').update_proximity_precision('byAttribute') 28 | ``` 29 | 30 | ```go Go 31 | client.Index("books").UpdateProximityPrecision(ByAttribute) 32 | ``` 33 | 34 | ```csharp C# 35 | await client.Index("books").UpdateProximityPrecisionAsync("byAttribute"); 36 | ``` 37 | 38 | ```rust Rust 39 | let task: TaskInfo = client 40 | .index("books") 41 | .set_proximity_precision("byAttribute".to_string()) 42 | .await 43 | .unwrap(); 44 | ``` 45 | 46 | ```swift Swift 47 | let task = try await self.client.index("books").updateProximityPrecision(.byWord) 48 | ``` 49 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_update_search_cutoff_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X PUT 'MEILISEARCH_URL/indexes/movies/settings/search-cutoff-ms' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '150' 8 | ``` 9 | 10 | ```javascript JS 11 | client.index('movies').updateSearchCutoffMs(150) 12 | ``` 13 | 14 | ```python Python 15 | client.index('movies').update_search_cutoff_ms(150) 16 | ``` 17 | 18 | ```php PHP 19 | $client->index('movies')->updateSearchCutoffMs(150); 20 | ``` 21 | 22 | ```java Java 23 | client.index("movies").updateSearchCutoffMsSettings(150); 24 | ``` 25 | 26 | ```ruby Ruby 27 | client.index('movies').update_search_cutoff_ms(150) 28 | ``` 29 | 30 | ```go Go 31 | client.Index("movies").UpdateSearchCutoffMs(150) 32 | ``` 33 | 34 | ```csharp C# 35 | await client.Index("movies").UpdateSearchCutoffMsAsync(150); 36 | ``` 37 | 38 | ```rust Rust 39 | let task: TaskInfo = client 40 | .index("movies") 41 | .set_search_cutoff_ms(Some(150)) 42 | .await 43 | .unwrap(); 44 | ``` 45 | 46 | ```swift Swift 47 | let task = try await self.client.index("books").updateSearchCutoffMs(150) 48 | ``` 49 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_update_separator_tokens_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X PUT 'MEILISEARCH_URL/indexes/articles/settings/separator-tokens' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '["|", "…"]' 8 | ``` 9 | 10 | ```javascript JS 11 | client.index('books').updateSeparatorTokens(['|', '…']) 12 | ``` 13 | 14 | ```python Python 15 | client.index('articles').update_separator_tokens(["|", "…"]) 16 | ``` 17 | 18 | ```php PHP 19 | $client->index('articles')->updateSeparatorTokens(['|', '…']); 20 | ``` 21 | 22 | ```java Java 23 | String[] newSeparatorTokens = { "|", "…" }; 24 | client.index("articles").updateSeparatorTokensSettings(newSeparatorTokens); 25 | ``` 26 | 27 | ```ruby Ruby 28 | client.index('articles').update_separator_tokens(['|', '…']) 29 | ``` 30 | 31 | ```go Go 32 | client.Index("articles").UpdateSeparatorTokens([]string{ 33 | "|", 34 | "…", 35 | }) 36 | ``` 37 | 38 | ```csharp C# 39 | await client.Index("movies").UpdateSeparatorTokensAsync(new[] { "|", "…" }); 40 | ``` 41 | 42 | ```rust Rust 43 | let task: TaskInfo = client 44 | .index('articles') 45 | .set_separator_tokens(&vec!['|'.to_string(), '…'.to_string()]) 46 | .await 47 | .unwrap(); 48 | ``` 49 | 50 | ```swift Swift 51 | client.index("books").updateSeparatorTokens(["|", "…"]) { result in 52 | // handle result 53 | } 54 | ``` 55 | 56 | ```dart Dart 57 | await client.index('articles').updateSeparatorTokens(["|", "…"]); 58 | ``` 59 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_update_stop_words_1.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X PUT 'MEILISEARCH_URL/indexes/movies/settings/stop-words' \ 6 | -H 'Content-Type: application/json' \ 7 | --data-binary '[ 8 | "the", 9 | "of", 10 | "to" 11 | ]' 12 | ``` 13 | 14 | ```javascript JS 15 | client.index('movies').updateStopWords(['of', 'the', 'to']) 16 | ``` 17 | 18 | ```python Python 19 | client.index('movies').update_stop_words(['of', 'the', 'to']) 20 | ``` 21 | 22 | ```php PHP 23 | $client->index('movies')->updateStopWords(['the', 'of', 'to']); 24 | ``` 25 | 26 | ```java Java 27 | client.index("movies").updateStopWordsSettings(new String[] {"of", "the", "to"}); 28 | ``` 29 | 30 | ```ruby Ruby 31 | client.index('movies').update_stop_words(['of', 'the', 'to']) 32 | ``` 33 | 34 | ```go Go 35 | stopWords := []string{"of", "the", "to"} 36 | client.Index("movies").UpdateStopWords(&stopWords) 37 | ``` 38 | 39 | ```csharp C# 40 | await client.Index("movies").UpdateStopWordsAsync(new[] {"of", "the", "to"}); 41 | ``` 42 | 43 | ```rust Rust 44 | let stop_words = ["of", "the", "to"]; 45 | let task: TaskInfo = client 46 | .index("movies") 47 | .set_stop_words(&stop_words) 48 | .await 49 | .unwrap(); 50 | ``` 51 | 52 | ```swift Swift 53 | let stopWords: [String] = ["of", "the", "to"] 54 | client.index("movies").updateStopWords(stopWords) { (result) in 55 | switch result { 56 | case .success(let task): 57 | print(task) 58 | case .failure(let error): 59 | print(error) 60 | } 61 | } 62 | ``` 63 | 64 | ```dart Dart 65 | await client.index('movies').updateStopWords(['of', 'the', 'to']); 66 | ``` 67 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_updating_guide_check_version_new_authorization_header.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'http:///version' \ 6 | -H 'Authorization: Bearer API_KEY' 7 | ``` 8 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_updating_guide_check_version_old_authorization_header.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X GET 'http:///version' \ 6 | -H 'X-Meili-API-Key: API_KEY' 7 | ``` 8 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_updating_guide_create_dump.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X POST 'http:///dumps' \ 6 | -H 'Authorization: Bearer API_KEY' 7 | # -H 'X-Meili-API-Key: API_KEY' for v0.24 or below 8 | ``` 9 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_updating_guide_get_displayed_attributes_old_authorization_header.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | # whenever you see {index_uid}, replace it with your index's unique id 5 | curl \ 6 | -X GET 'http:///indexes/{index_uid}/settings/displayed-attributes' \ 7 | -H 'X-Meili-API-Key: API_KEY' 8 | ``` 9 | -------------------------------------------------------------------------------- /snippets/samples/code_samples_updating_guide_reset_displayed_attributes_old_authorization_header.mdx: -------------------------------------------------------------------------------- 1 | 2 | 3 | ```bash cURL 4 | curl \ 5 | -X DELETE 'http:///indexes/{index_uid}/settings/displayed-attributes' \ 6 | -H 'X-Meili-API-Key: API_KEY' 7 | ``` 8 | --------------------------------------------------------------------------------