Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion learn/security/multitenancy_tenant_tokens.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ You must generate tokens in your application. The quickest method to generate te

Meilisearch developed an in-app search demo using multi-tenancy in a SaaS CRM. It only allows authenticated users to search through contacts, companies, and deals belonging to their organization.

Check out this [sample application](https://saas.meilisearch.com/utm_source=docs) Its code is publicly available in a dedicated [GitHub repository](https://github.com/meilisearch/saas-demo/).
Check out this [sample application](https://saas.meilisearch.com/?utm_source=docs) Its code is publicly available in a dedicated [GitHub repository](https://github.com/meilisearch/saas-demo/).

<Tip>
You can also use tenant tokens in role-based access control (RBAC) systems. Consult [How to implement RBAC with Meilisearch](https://blog.meilisearch.com/role-based-access-guide/) on Meilisearch's official blog for more information.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

```bash cURL
curl \
-X POST 'https://edge.meilisearch.com/events' \
-X POST 'https://PROJECT_URL/events' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \
-H 'X-MS-USER-ID: MEILISEARCH_USER_ID' \
-H 'X-MS-USER-ID: SEARCH_USER_ID' \
--data-binary '{
"eventType": "click",
"eventName": "Search Result Clicked",
Expand Down
17 changes: 17 additions & 0 deletions snippets/samples/code_samples_analytics_event_bind_event_2.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<CodeGroup>

```bash cURL
curl \
-X POST 'https://PROJECT_URL/events' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \
--data-binary '{
"eventType": "click",
"userId": "SEARCH_USER_ID",
"eventName": "Search Result Clicked",
"indexUid": "products",
"objectId": "0",
"position": 0
}'
```
</CodeGroup>
5 changes: 4 additions & 1 deletion snippets/samples/code_samples_analytics_event_click_1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@

```bash cURL
curl \
-X POST 'https://edge.meilisearch.com/events' \
-X POST 'https://PROJECT_URL/events' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \
--data-binary '{
"eventType": "click",
"eventName": "Search Result Clicked",
"indexUid": "products",
"userId": "SEARCH_USER_ID",
"queryUid": "019a01b7-a1c2-7782-a410-bb1274c81393",
"objectId": "0",
"objectName": "DOCUMENT_DESCRIPTION",
"position": 0
}'
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

```bash cURL
curl \
-X POST 'https://edge.meilisearch.com/events' \
-X POST 'https://PROJECT_URL/events' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY'
--data-binary '{
"eventType": "conversion",
"eventName": "Product Added To Cart",
"indexUid": "products",
"userId": "SEARCH_USER_ID",
"objectId": "0",
"objectName": "DOCUMENT_DESCRIPTION",
"position": 0
}'
```
Expand Down
8 changes: 8 additions & 0 deletions snippets/samples/code_samples_compact_index_1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,12 @@
curl \
-X POST 'MEILISEARCH_URL/indexes/INDEX_UID/compact'
```

```python Python
client.index('movies').compact()
```

```java Java
client.index("INDEX_NAME").compact();
```
</CodeGroup>
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ $client->index('movies')->addDocuments($movies);
// <dependency>
// <groupId>com.meilisearch.sdk</groupId>
// <artifactId>meilisearch-java</artifactId>
// <version>0.16.1</version>
// <version>0.17.0</version>
// <type>pom</type>
// </dependency>

// For Gradle
// Add the following line to the `dependencies` section of your `build.gradle`:
//
// implementation 'com.meilisearch.sdk:meilisearch-java:0.16.1'
// implementation 'com.meilisearch.sdk:meilisearch-java:0.17.0'

// In your .java file:
import com.meilisearch.sdk;
Expand Down
6 changes: 6 additions & 0 deletions snippets/samples/code_samples_index_compact_1.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<CodeGroup>

```go Go
client.Index("INDEX_UID").Compact();
```
</CodeGroup>