Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add contextual links to demos #2649

Merged
merged 15 commits into from
Feb 6, 2024
14 changes: 12 additions & 2 deletions learn/fine_tuning_results/faceted_search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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/).
8 changes: 7 additions & 1 deletion learn/fine_tuning_results/sorting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:

<CodeSamples id="geosearch_guide_sort_usage_1" />

## 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/)
8 changes: 7 additions & 1 deletion learn/security/tenant_tokens.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -261,3 +261,9 @@ Changing an instance's master key forces Meilisearch to regenerate all API keys
</Capsule>

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/).
5 changes: 2 additions & 3 deletions learn/what_is_meilisearch/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -52,4 +52,3 @@ Meilisearch provides an intuitive search-as-you-type experience with response ti
Instead of showing you examples, why not just invite you to test Meilisearch interactively in the **out-of-the-box search preview** we deliver?

There's no need to write a single line of front-end code. All you need to do is follow [this guide](/learn/getting_started/quick_start) to give the search engine a try!