Closed tukiminya closed 2 years ago
Hey @kr-tukimi, The only place where we use length
is in these lines
// Index data to Meilisearch
const enqueuedUpdates = await index.addDocumentsInBatches(
transformedData,
batchSize
)
if (enqueuedUpdates.length === 0) {
throw getErrorMsg(
'Nothing has been indexed to Meilisearch. Make sure your documents are transformed into an array of objects'
)
}
This means something must have gone wrong during indexation and the addDocumentsInBatches
did not throw the error properly. Do you have access to your Meili logs? If yes can you take a look to find maybe some /documents
routes that are not in 204?
If everything seems normal, could you fetch your tasks using this route and find the onces that are adding the documents and copy paste them here?
Hello @bidoubiwa,
Sorry, I don't know where the Meilisearch logs are... Could you please tell me the path?
I was getting this error in the Docker console:
[2022-07-11T11:28:51Z INFO actix_web::middleware::logger] 172.17.0.1 "DELETE /indexes/test HTTP/1.1" 202 114 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.003346
The index seems to have been deleted after the build failed.
Here is the result of fetching the task: (The reason there are two errors is because I tried twice)
{
"results": [
{
"uid": 1,
"indexUid": "test",
"status": "failed",
"type": "indexDeletion",
"details": {
"deletedDocuments": 0
},
"error": {
"message": "Index `test` not found.",
"code": "index_not_found",
"type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#index_not_found"
},
"duration": "PT0.009537100S",
"enqueuedAt": "2022-07-11T11:28:51.9235144Z",
"startedAt": "2022-07-11T11:28:51.9265978Z",
"finishedAt": "2022-07-11T11:28:51.9361349Z"
},
{
"uid": 0,
"indexUid": "test",
"status": "failed",
"type": "indexDeletion",
"details": {
"deletedDocuments": 0
},
"error": {
"message": "Index `test` not found.",
"code": "index_not_found",
"type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#index_not_found"
},
"duration": "PT0.044219200S",
"enqueuedAt": "2022-07-11T11:16:42.3955833Z",
"startedAt": "2022-07-11T11:16:42.4054709Z",
"finishedAt": "2022-07-11T11:16:42.4496901Z"
}
]
}
Hey @kr-tukimi Which version of Meilisearch are you using? v0.27.0 or v0.28.0 ?
Hi @bidoubiwa I was using v0.27.0 when I opened this issue.
I can see that the index you provided in your config file is indexUid: 'testIndex',
but the one in the task is "message": "Index test not found.",
Is this because you changed the name? Or is it part of the bug?
Are you still using v0.27.0 for the moment ?
As for the index ID, I originally used a different ID, but when I submitted the issue, I overwrote it with another one, and it is a blur of the notation. Sorry about that...
I upgraded the version from v0.27.0 to v.0.28.0 and tried to build again, but the error occurs in a place unrelated to Meilisearch. I will report back with results once the error is resolved.
Closing this, if it is still an issue feel free to re-open
I tried to do an Indexes using
gatsby-plugin-meilisearch
with ayarn build
, but I got the following error Anyone else with the same error?Error
package.json:
gatsby-config.js