Skip to content

Commit c19a200

Browse files
authored
Merge branch 'v3_make_strapi_compatibility_with_latest_ms' into v3_simplify_task_fetching
2 parents c8c3594 + eae787e commit c19a200

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ Complete installation requirements are the same as for Strapi itself and can be
444444

445445
**Supported Meilisearch versions**:
446446

447-
This package only guarantees the compatibility with the [version v0.29.1 of Meilisearch](https://github.com/meilisearch/meilisearch/releases/tag/v0.26.0).
447+
This package only guarantees the compatibility with the [version v0.29.0 of Meilisearch](https://github.com/meilisearch/meilisearch/releases/tag/v0.29.0).
448448

449449
**Node / NPM versions**:
450450

connectors/meilisearch/index.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,9 @@ module.exports = async ({ storeConnector, collectionConnector }) => {
7474
getIndexes: async function () {
7575
try {
7676
const client = MeiliSearch({ apiKey, host })
77-
const version = await client.getVersion()
78-
console.log({ version })
7977

80-
const indexes = await client.getIndexes()
81-
console.log({ indexes })
82-
return indexes.results || []
78+
const { results } = await client.getIndexes()
79+
return results
8380
} catch (e) {
8481
console.error(e)
8582
return []
@@ -320,6 +317,7 @@ module.exports = async ({ storeConnector, collectionConnector }) => {
320317
getCollectionsIndexedInMeiliSearch: async function (collections) {
321318
const indexes = await this.getIndexes()
322319
const indexUids = indexes.map(index => index.uid)
320+
323321
return collections.filter(collection =>
324322
indexUids.includes(collectionConnector.getIndexName(collection))
325323
)

cypress/integration/ui_spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ const removeCollectionsFromMeiliSearch = async () => {
1313
const client = new MeiliSearch({ apiKey, host })
1414
const collections = ['restaurant', 'category', 'project', 'reviews']
1515
const { results } = await client.getIndexes()
16-
const indexes = results || []
17-
const allUids = indexes.map(index => index.uid)
16+
17+
const allUids = results.map(index => index.uid)
1818
const collectionInMs = collections.filter(col => allUids.includes(col))
1919
for (const index of collectionInMs) {
2020
await client.deleteIndex(index)

0 commit comments

Comments
 (0)