I need to be able to search for dates and numbers in arrays
I have sets of results which contain dates and I need to be able to search from within them. For example:
{
experience: [
{ name: "Abc", startDate: ISODate("2019-01-01T00:00:00.000Z"), startDate: ISODate("2020-01-01T00:00:00.000Z") },
{ name: "Xyz", startDate: ISODate("2018-01-01T00:00:00.000Z"), startDate: ISODate("2019-01-01T00:00:00.000Z") }
]
}
So I need to be able to do a near
search across experience.startDate
values, for example.
The Date mapping documentation (https://docs.atlas.mongodb.com/reference/atlas-search/index-definitions/#date) says:
A date cannot be indexed if it is part of an array.
And while the number documentation doesn't mention the same restriction by experimentation I have found it has the same resriction (strings dont however). Essentially this feature request is to remove this restriction for dates and numbers.

Work on this feature has begun. Let us know if you have any questions.
-
Sukhmeet commented
+1 for Boolean support.
-
Manuel commented
I found the problem to exist also for Boolean values inside an array object. I need it for filters during $search.