Hey guys, I’ve got following problem:
I have documents: {title → string, key_words: array, organisation → string, article → string).
my atlas search index (name is ‘only_text’) is:
{
"mappings": {
"dynamic": false,
"fields": {
"key_words": {
"analyzer": "lucene.standard",
"type": "string"
},
"organisation": {
"analyzer": "lucene.standard",
"type": "string"
},
"title": {
"analyzer": "lucene.standard",
"type": "string"
}
}
}
}
my NodejS query is:
await dbo.collection('jobs').aggregate([
{
'$search': {
index: 'only_text',
text: {
"query": "referent",
"path": "title"
}
}
},
]).toArray((err, result) => {
if (err) throw err;
res.status(200).json(result)
})
on my first query, its VERY slow, up to 12 seconds… My database only consists of 250 documents… what do I wrong? Thanks