[SERVER-29587] Create $_internalSchemaMinItems and $_internalSchemaMaxItems MatchExpressions Created: 12/Jun/17  Updated: 30/Oct/23  Resolved: 08/Jul/17

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 3.5.10

Type: Task Priority: Major - P3
Reporter: Kyle Suarez Assignee: Nicholas Zolnierz
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Query 2017-07-10, Query 2017-07-31
Participants:

 Description   
Proposed Syntax

$_internalSchemaMinItems will be a new MatchExpression. It accepts a nonnegative integer <size> and matches an array whose length is at least that number:

{ <field>: { $_internalSchemaMinItems: <size> } }

$_internalSchemaMaxItems is similar, but matches arrays whose length is no larger than <size>.

{ <field>: { $_internalSchemaMaxItems: <size> } }

This will allow us to implement the JSON Schema "minItems" and "maxItems" keywords.



 Comments   
Comment by Githook User [ 07/Jul/17 ]

Author:

{u'username': u'nzolnierzmdb', u'name': u'Nick Zolnierz', u'email': u'nicholas.zolnierz@mongodb.com'}

Message: SERVER-29587: Partition MatchExpression types into categories, fixes an
issue with previous commit where

{min/max}

Items was categorized as a
leaf.
Branch: master
https://github.com/mongodb/mongo/commit/23f44557852e61349fd28505ec6b953e22024d8b

Comment by Nicholas Zolnierz [ 29/Jun/17 ]

Reopening this ticket as an issue was found when applying renames to an expression, these additional expressions should be treated as array matching expressions.

Comment by Githook User [ 27/Jun/17 ]

Author:

{u'username': u'nzolnierzmdb', u'name': u'Nick Zolnierz', u'email': u'nicholas.zolnierz@mongodb.com'}

Message: SERVER-29587: Create $_internalSchemaMinItems and $_internalSchemaMaxItems MatchExpressions
Branch: master
https://github.com/mongodb/mongo/commit/8aa235f5b5eb82223cee67433df4cb78e19d10c5

Comment by Githook User [ 27/Jun/17 ]

Author:

{u'username': u'visualzhou', u'name': u'Siyuan Zhou', u'email': u'siyuan.zhou@mongodb.com'}

Message: Revert "SERVER-29587: Create $_internalSchemaMinItems and $_internalSchemaMaxItems MatchExpressions"

This reverts commit a92eb118cc8500a9c4286e8ef28cb26ea3f4e238.
Branch: master
https://github.com/mongodb/mongo/commit/beaeaa196e8b1d3e36dfccd55cfded8ddf95a205

Comment by Githook User [ 27/Jun/17 ]

Author:

{u'username': u'nzolnierzmdb', u'name': u'Nick Zolnierz', u'email': u'nicholas.zolnierz@mongodb.com'}

Message: SERVER-29587: Create $_internalSchemaMinItems and $_internalSchemaMaxItems MatchExpressions
Branch: master
https://github.com/mongodb/mongo/commit/a92eb118cc8500a9c4286e8ef28cb26ea3f4e238

Generated at Thu Feb 08 04:21:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.