Skip to content

Commit

Permalink
add missing embedder fields where it is now mandatory
Browse files Browse the repository at this point in the history
  • Loading branch information
guimachiavelli committed Oct 24, 2024
1 parent 16b2f60 commit 75567ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions .code-samples.meilisearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,10 @@ search_parameter_guide_hybrid_1: |-
search_parameter_guide_vector_1: |-
curl -X POST 'localhost:7700/indexes/INDEX_NAME/search' \
-H 'content-type: application/json' \
--data-binary '{ "vector": [0, 1, 2] }'
--data-binary '{
"vector": [0, 1, 2],
"embedder": "EMBEDDER_NAME"
}'
get_search_cutoff_1: |-
curl \
-X GET 'http://localhost:7700/indexes/movies/settings/search-cutoff-ms'
Expand Down Expand Up @@ -1355,11 +1358,12 @@ get_similar_post_1: |-
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \
--data-binary '{
"id": TARGET_DOCUMENT_ID
"id": TARGET_DOCUMENT_ID,
"embedder": "EMBEDDER_NAME"
}'
get_similar_get_1: |-
curl \
-X GET 'http://localhost:7700/indexes/INDEX_NAME/similar?id=TARGET_DOCUMENT_ID'
-X GET 'http://localhost:7700/indexes/INDEX_NAME/similar?id=TARGET_DOCUMENT_ID&embedder=EMBEDDER_NAME'
search_parameter_reference_ranking_score_threshold_1: |-
curl \
-X POST 'http://localhost:7700/indexes/INDEX_NAME/search' \
Expand Down
4 changes: 2 additions & 2 deletions reference/api/similar.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Retrieve documents similar to a specific search result.
| Parameter | Type | Default value | Description |
| ---------------------------------------------------------------------------- | ---------------- | ------------- | ---------------------------------------------- |
| **`id`** | String or number | `null` | Identifier of the target document (mandatory) |
| **[`embedder`](/reference/api/search#hybrid-search-experimental)** | String | `"default"` | Embedder to use when computing recommendations |
| **[`embedder`](/reference/api/search#hybrid-search-experimental)** | String | `"default"` | Embedder to use when computing recommendations. Mandatory |
| **[`attributesToRetrieve`](/reference/api/search#attributes-to-retrieve)** | Array of strings | `["*"]` | Attributes to display in the returned documents|
| **[`offset`](/reference/api/search#offset)** | Integer | `0` | Number of documents to skip |
| **[`limit`](/reference/api/search#limit)** | Integer | `20` | Maximum number of documents returned |
Expand Down Expand Up @@ -83,7 +83,7 @@ Retrieve documents similar to a specific search result.
| Parameter | Type | Default value | Description |
| ---------------------------------------------------------------------------- | ---------------- | ------------- | ---------------------------------------------- |
| **`id`** | String or number | `null` | Identifier of the target document (mandatory) |
| **[`embedder`](/reference/api/search#hybrid-search-experimental)** | String | `"default"` | Embedder to use when computing recommendations |
| **[`embedder`](/reference/api/search#hybrid-search-experimental)** | String | `"default"` | Embedder to use when computing recommendations. Mandatory |
| **[`attributesToRetrieve`](/reference/api/search#attributes-to-retrieve)** | Array of strings | `["*"]` | Attributes to display in the returned documents|
| **[`offset`](/reference/api/search#offset)** | Integer | `0` | Number of documents to skip |
| **[`limit`](/reference/api/search#limit)** | Integer | `20` | Maximum number of documents returned |
Expand Down

0 comments on commit 75567ed

Please sign in to comment.