From 00675b740504f378910f524fae4d94e0bf09aaad Mon Sep 17 00:00:00 2001 From: Strift Date: Tue, 6 Feb 2024 16:48:33 +0100 Subject: [PATCH] Add contextual links to demos (#2649) --- learn/fine_tuning_results/faceted_search.mdx | 14 ++++++++++++-- learn/fine_tuning_results/sorting.mdx | 8 +++++++- learn/security/tenant_tokens.mdx | 8 +++++++- learn/what_is_meilisearch/overview.mdx | 4 ++-- 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/learn/fine_tuning_results/faceted_search.mdx b/learn/fine_tuning_results/faceted_search.mdx index 1905387362..cf2bf8414d 100644 --- a/learn/fine_tuning_results/faceted_search.mdx +++ b/learn/fine_tuning_results/faceted_search.mdx @@ -10,7 +10,7 @@ You can use Meilisearch filters to build faceted search interfaces. This type of Facets are common in ecommerce sites like Amazon. When users search for products, they are presented with a list of results and a list of facets which you can see on the sidebar in the image below: -![Meilisearch demo for an ecommerce website displaying faceting UI](https://raw.githubusercontent.com/meilisearch/documentation/main/assets/images/faceted-search/facets-ecommerce.png) +[![Meilisearch demo for an ecommerce website displaying faceting UI](https://raw.githubusercontent.com/meilisearch/documentation/main/assets/images/faceted-search/facets-ecommerce.png)](https://ecommerce.meilisearch.com/?utm_campaign=oss&utm_source=docs&utm_medium=faceted-search&utm_content=image) Faceted search interfaces often have a count of how many results belong to each facet. This gives users a visual clue of the range of results available for each facet. @@ -142,7 +142,7 @@ The following response shows the lowest and highest book ratings when searching } } … -} +} ``` If none of the matching documents have a numeric value for a facet, that facet is not included in the `facetStats` object. Since `rating` was the only numeric facet in our example, it is the only facet returned in the `facetStats` object. @@ -289,3 +289,13 @@ The user can combine these two filter expressions in one by wrapping them in par The GIF below shows the `books` dataset with conjunctive and disjunctive facets. Notice how the facet count for each facet updates based on the selection. ![Selecting 'Fiction' and 'Literature' as 'genres' for English books](https://raw.githubusercontent.com/meilisearch/documentation/main/assets/images/faceted-search/conjunctive-and-disjunctive-facets.gif) + +## Example application + +The Meilisearch ecommerce demo makes heavy use of faceting features to enable: +- Filtering products by category and brand +- Filtering products by price range and rating +- Searching through facet values (e.g. category) +- Sorting facet values (count or alphabetical order) + +Check out the [ecommerce demo](https://ecommerce.meilisearch.com/?utm_campaign=oss&utm_source=docs&utm_medium=faceted-search&utm_content=link) and the [GitHub repository](https://github.com/meilisearch/ecommerce-demo/). diff --git a/learn/fine_tuning_results/sorting.mdx b/learn/fine_tuning_results/sorting.mdx index 96cc1e902b..46543ac43b 100644 --- a/learn/fine_tuning_results/sorting.mdx +++ b/learn/fine_tuning_results/sorting.mdx @@ -295,7 +295,7 @@ Queries using `_geoPoint` will always include a `geoDistance` field containing t "id": 1, "name": "Nàpiz' Milano", "_geo": { - "lat": 45.4777599, + "lat": 45.4777599, "lng": 9.1967508 }, "_geoDistance": 1532 @@ -310,3 +310,9 @@ Queries using `_geoPoint` will always include a `geoDistance` field containing t The following query will sort results based on how close they are to the Eiffel Tower: + +## Example application + +Take a look at our demos for examples of how to implement sorting: +- **Ecommerce demo**: [preview](https://ecommerce.meilisearch.com/?utm_campaign=oss&utm_source=docs&utm_medium=sorting) • [GitHub repository](https://github.com/meilisearch/ecommerce-demo/) +- **CRM SaaS demo**: [preview](https://saas.meilisearch.com/?utm_campaign=oss&utm_source=docs&utm_medium=sorting) • [GitHub repository](https://github.com/meilisearch/saas-demo/) diff --git a/learn/security/tenant_tokens.mdx b/learn/security/tenant_tokens.mdx index ed744327db..1d4db19d18 100644 --- a/learn/security/tenant_tokens.mdx +++ b/learn/security/tenant_tokens.mdx @@ -120,7 +120,7 @@ The token header must specify a `JWT` type and an encryption algorithm. Supporte { "alg": "HS256", "typ": "JWT" -} +} ``` The token payload contains most of the relevant token data. It must be an object containing a set of search rules and the first 8 characters of a Meilisearch API key. You may optionally set an expiration date for your token. Consult the [token payload reference](#tenant-token-payload-reference) for more information on the requirements for each payload field. @@ -261,3 +261,9 @@ Changing an instance's master key forces Meilisearch to regenerate all API keys When using an official Meilisearch SDK, you may indicate the expiry date when generating a token. Consult the documentation of the SDK you are using for more specific instructions. + +## Example application + +Our in-app search demo implements multi-tenancy in a SaaS (Software as a Service) CRM. It only allows authenticated users to search through contacts, companies, and deals belonging to their organization. + +Check out the [SaaS demo](https://saas.meilisearch.com/?utm_campaign=oss&utm_source=docs&utm_medium=tenant-tokens) and the [GitHub repository](https://github.com/meilisearch/saas-demo/). diff --git a/learn/what_is_meilisearch/overview.mdx b/learn/what_is_meilisearch/overview.mdx index d3b96fee14..42096bdf30 100644 --- a/learn/what_is_meilisearch/overview.mdx +++ b/learn/what_is_meilisearch/overview.mdx @@ -13,8 +13,8 @@ Meilisearch is a **RESTful search API**. It aims to be a **ready-to-go solution* ## Demo -![Search bar updating results](https://raw.githubusercontent.com/meilisearch/documentation/main/assets/images/movies-demo-dark.gif) -_Meilisearch helps you find where to watch a movie at [where2watch.meilisearch.com](https://where2watch.meilisearch.com/)._ +[![Search bar updating results](https://raw.githubusercontent.com/meilisearch/documentation/main/assets/images/movies-demo-dark.gif)](https://where2watch.meilisearch.com/?utm_campaign=oss&utm_source=docs&utm_medium=what-is-meilisearch&utm_content=gif) +_Meilisearch helps you find where to watch a movie at [where2watch.meilisearch.com](https://where2watch.meilisearch.com/?utm_campaign=oss&utm_source=docs&utm_medium=what-is-meilisearch&utm_content=link)._ ## Features