I am using meilisearch meilisearch:v1.4.0
as the fulltext search engine, today when I invoke the the index api, shows error like this:
│ node:internal/process/promises:279
│ triggerUncaughtException(err, true /* fromPromise */);
│ ^
│
│ MeiliSearchApiError: Stale file handle (os error 116)
│ at /home/node/app/node_modules/meilisearch/dist/bundles/meilisearch.cjs.js:366:19
│ at Generator.next (<anonymous>)
│ at fulfilled (/home/node/app/node_modules/meilisearch/dist/bundles/meilisearch.cjs.js:298:58)
│ at processTicksAndRejections (node:internal/process/task_queues:96:5) {
│ code: 'internal',
│ type: 'internal',
│ link: 'https://docs.meilisearch.com/errors#internal',
│ httpStatus: 500
│ }
this is the nodejs(v18.x) client code "meilisearch": "^0.35.0"
look like:
const { MeiliSearch } = require('meilisearch')
var log4js = require('log4js')
var logger = log4js.getLogger()
logger.level = 'warn'
const updateFullsearch = async (file) => {
try {
const masterKey = process.env.MEILI_MASTER_KEY
let option = {
primaryKey: 'file_id'
}
const client = new MeiliSearch({
host: 'http://meilisearch.reddwarf-toolbox.svc.cluster.local:7700',
apiKey: masterKey
})
let clientIdx = client.index('files')
clientIdx.addDocuments([file], option)
.then((res) => {})
clientIdx.updateFilterableAttributes(['name', 'project_id'])
} catch (err) {
logger.error('Failed to sync file index', err)
}
}
module.exports = {
updateFullsearch
}
Am I missing something? does anyone facing the similiar issue?