Skip to content

Commit 9759c35

Browse files
authored
Merge branch 'main' into improve-eslint-prettier-tsconfig
2 parents 422b3af + d891f15 commit 9759c35

File tree

9 files changed

+15
-18
lines changed

9 files changed

+15
-18
lines changed

.code-samples.meilisearch.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,3 +741,5 @@ facet_search_3: |-
741741
facetQuery: 'c',
742742
facetName: 'genres'
743743
})
744+
search_parameter_guide_show_ranking_score_details_1: |-
745+
client.index('movies').search('dragon', { showRankingScoreDetails: true })

.github/workflows/release-drafter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
update_release_draft:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: release-drafter/release-drafter@v5
12+
- uses: release-drafter/release-drafter@v6
1313
with:
1414
config-name: release-draft-template.yml
1515
env:

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
- name: Run Browser env
5959
run: yarn test:env:browser
6060
- name: Upload coverage reports to Codecov
61-
uses: codecov/codecov-action@v3
61+
uses: codecov/codecov-action@v4
6262
env:
6363
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
6464
style_tests:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<p align="center">
1818
<a href="https://www.npmjs.com/package/meilisearch"><img src="https://img.shields.io/npm/v/meilisearch.svg" alt="npm version"></a>
1919
<a href="https://github.com/meilisearch/meilisearch-js/actions"><img src="https://github.com/meilisearch/meilisearch-js/workflows/Tests/badge.svg" alt="Tests"></a>
20-
<a href="https://codecov.io/gh/meilisearch/meilisearch-python">
20+
<a href="https://codecov.io/gh/meilisearch/meilisearch-js">
2121
<img src="https://codecov.io/github/meilisearch/meilisearch-js/coverage.svg?branch=main" alt="Codecov">
2222
</a>
2323
<a href="https://github.com/prettier/prettier"><img src="https://img.shields.io/badge/styled_with-prettier-ff69b4.svg" alt="Prettier"></a>
@@ -983,7 +983,7 @@ client.index('myIndex').resetProximityPrecision(): Promise<EnqueuedTask>
983983

984984
### Embedders <!-- omit in toc -->
985985

986-
⚠️ This feature is experimental. Activate the `vectorStore` experimental feature to use it](https://www.meilisearch.com/docs/reference/api/experimental_features#configure-experimental-features)
986+
⚠️ This feature is experimental. Activate the [`vectorStore` experimental feature to use it](https://www.meilisearch.com/docs/reference/api/experimental_features#configure-experimental-features)
987987

988988
#### [Get embedders](https://www.meilisearch.com/docs/reference/api/settings#get-embedders)
989989

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "meilisearch",
3-
"version": "0.37.0",
3+
"version": "0.38.0",
44
"description": "The Meilisearch JS client for Node.js and the browser.",
55
"keywords": [
66
"meilisearch",

src/package-version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const PACKAGE_VERSION = '0.37.0'
1+
export const PACKAGE_VERSION = '0.38.0'

src/types/types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,8 @@ export type RawDocumentAdditionOptions = DocumentOptions & {
292292
export type DocumentsQuery<T = Record<string, any>> = ResourceQuery & {
293293
fields?: Fields<T>
294294
filter?: Filter
295+
limit?: number
296+
offset?: number
295297
}
296298

297299
export type DocumentQuery<T = Record<string, any>> = {
@@ -337,6 +339,7 @@ export type OpenAiEmbedder = {
337339
model?: string
338340
apiKey?: string
339341
documentTemplate?: string
342+
dimensions?: number
340343
}
341344

342345
export type HuggingFaceEmbedder = {
@@ -350,6 +353,7 @@ export type UserProvidedEmbedder = {
350353
source: 'userProvided'
351354
dimensions: number
352355
}
356+
353357
export type Embedder =
354358
| OpenAiEmbedder
355359
| HuggingFaceEmbedder

tests/embedders.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,10 @@ describe.each([{ permission: 'Master' }, { permission: 'Admin' }])(
7373
default: {
7474
source: 'openAi',
7575
apiKey: '<your-OpenAI-API-key>',
76-
model: 'text-embedding-ada-002',
76+
model: 'text-embedding-3-small',
7777
documentTemplate:
7878
"A movie titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}",
79+
dimensions: 1536,
7980
},
8081
}
8182
const task: EnqueuedTask = await client

tests/search.test.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -271,18 +271,8 @@ describe.each([
271271
expect(hit).toHaveProperty('_rankingScore')
272272
})
273273

274-
test(`${permission} key: search with showRankingScoreDetails enabled`, async () => {
274+
test(`${permission} key: search with showRankingScoreDetails`, async () => {
275275
const client = await getClient(permission)
276-
const key = await getKey(permission)
277-
278-
await fetch(`${HOST}/experimental-features`, {
279-
body: JSON.stringify({ scoreDetails: true }),
280-
headers: {
281-
Authorization: `Bearer ${key}`,
282-
'Content-Type': 'application/json',
283-
},
284-
method: 'PATCH',
285-
})
286276

287277
const response = await client.index(index.uid).search('prince', {
288278
showRankingScoreDetails: true,

0 commit comments

Comments
 (0)