Hi there, I have an index configured as:
{
"analyzer": "lucene.standard",
"searchAnalyzer": "lucene.standard",
"mappings": {
"dynamic": false,
"fields": {
"alternate_names": {
"type": "string"
},
"platform": {
"dynamic": false,
"fields": {
"_id": {
"representation": "int32",
"type": "number"
},
"alias": {
"type": "string"
},
"name": {
"type": "string"
}
},
"type": "document"
},
"reviewed": {
"type": "boolean"
},
"title": {
"type": "string"
}
}
}
}
The index was working as expected before the addition of the platform
nested document.
And here’s a sample document from the collection:
{
"_id": 1868,
"coop": "No",
"platform": {
"_id": 1,
"alias": "PC",
"name": "PC"
},
"publishers": [
{
"_id": 113,
"keyword": "Accolade, Inc."
}
],
"title": "Test Drive II: The Duel",
"reviewed": true,
"references": 1,
"slug": "pc/test-drive-ii-the-duel",
}
Running a sample search to filter by platform is not working however:
[
{
$search: {
index: "name_idx",
equals: {
path: "platform._id",
value: 1
}
}
}
]
Not sure if I understand why this query is not working.
On the same subject, when creating the pipeline to search for the platform._id
do I need to add one must
entry for each platform selected by the user, or is there a in
like operator?
Thank you