Filtering images

Sort, filter, and query your data

Custom filters

Most of the filters are self-explanatory, but users who have “Project Manager” permissions will also have the ability to apply “Custom Filters” (i.e., submit MongoDB queries directly to the database and see the results). Feel free to copy, modify, and paste the custom filters below, but be sure to replace all text in <angle_brackets> with real values.

Known limitation

Custom Filters can NOT be saved in Views

Timestamps in queries

If you include timestamps in your custom queries, be mindful that those timestamps are interpreted by the database as being in UTC+0, NOT your local timezone. So, if you live in California and are including a timestamp of "2023-01-01", be aware that in your timezone, that same moment in time is actually 4:00 PM on December 31st, 2022.

If you're interested in submitting time-constrained queries relative to your timezone (or any timezone that's not UTC+0), be sure to calculate what that time would actually be in UTC+0 and include that in your ISO 8601 Date string in your query.

For example, if you lived in California and want to get all images validated between 2023-01-01 and 2023-01-20 in your timezone, your start date would be"2023-01-01T08:00:00.000Z" and your end date would be "2023-01-21T07:59:59.999Z". It's worth pointing out here that to include all images validated on the last day of the date range (1/20), the end date will be in 1/21 in UTC.

Useful queries

Query all images with labels validated by a specific user:

{ 'objects.labels.validation.userId': <users_email_address> }

Query all images labeled by anyone between two dates:

// NOTE: all date strings are interpreted in UTC+0
// be sure to adjust them accordingly if you'd like to query relative
// to a different timezone (see note above for more info)

{
    'objects.labels.validation.validationDate': {
        $gt: ISODate("2022-04-01"),
        $lt: ISODate("2022-04-30")
    }
}

Query all images with labels validated by a specific user between a range of dates:

// NOTE: all date strings are interpreted in UTC+0
// be sure to adjust them accordingly if you'd like to query relative
// to a different timezone (see note above for more info)

{
    'objects.labels': {
        $elemMatch: {
            $and: [{
	        'validation.userId': <users_email_address>
            }, {
                'validation.validationDate': {
                    $gt: ISODate("2022-04-01"),
                    $lt: ISODate("2022-04-30")
                }
            }]
        }
    }
}

Last updated