When a document field type doesn't match the index field type, it seems to be indexed as "blank" and won't match anything. Many data types are readily convertible between type representations. It would be great if Atlas Search could do that for us and would open up richer functionality by allowing us to use operators/analyzers/etc. on types that don't normally support them.
My particular use case is to allow searching & sorting on numbers stored as strings. When creating indexes and sorting with "normal" queries, it is possible to sort numbers stored as strings by their numerical ordering rather than alphabetical by using `{ collation: { locale: "en_US", numericOrdering: true } }` on the index definition and applying `query.collation(Collation.of(Locale.US).numericOrdering(true))` to the query itself. I was hoping to do this with Atlas Search Sort as well, but it isn't possible.
Examples:
string `"1000.00"` = number `1000.00`
boolean `true` = number `1`
boolean `true` = string `"true"`
etc.
See: https://support.mongodb.com/case/01169737