[SERVER-20345] Support additional queries with $type=number partial indexes Created: 10/Sep/15  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Index Maintenance, Querying
Affects Version/s: 3.1.7
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Backlog - Query Optimization
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-29445 Support additional queries with parti... Backlog
is related to SERVER-18819 Allow $type to support type values as... Closed
is related to SERVER-19243 Allow $type to support "number" as ty... Closed
Assigned Teams:
Query Optimization
Participants:
Case:

 Description   

As of 3.1.7, a partialFilterExpression of {field: {$type: 'number'}} only supports the following queries:

{field: {$type: 'number'}}
{field: {$type: 'number'}, anotherField: ...}

An improvement could be made to answer the following class of queries:

// Comparison operations involving numbers
{field: 10}
{field: {$lt: 20}}
{field: {$in: [30, 40, 50]}}
// $type queries for double, int, and long.
{field: {$type: 'int'}}
{field: {$type: 1}}


Generated at Thu Feb 08 03:53:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.