jstests/core/index_filter_on_hidden_index.js
// Ensure the filters for the given query shape exist.
Ensure the filters for the given query shape exist.
Ensure the filters for the given query shape exist .
function ensureFilterExistsByQueryShape(queryShape) {
    const res = assert.commandWorked(coll.runCommand('planCacheListFilters'));
    assert(res.hasOwnProperty('filters'), 'filters missing from planCacheListFilters result');
    const filter = res.filters.find(function(obj) {
        return tojson(obj.query) === tojson(queryShape.query) &&
            tojson(obj.projection) === tojson(queryShape.projection) &&
            tojson(obj.sort) === tojson(queryShape.sort);
    });
    assert(filter, `Index filter not found for query shape ${tojson(queryShape)}`);
}
function ensureFilterExistsByQueryShape ( queryShape ) { const res = assert . commandWorked ( coll . runCommand ( 'planCacheListFilters' ) ) ; assert ( res . hasOwnProperty ( 'filters' ) , 'filters missing from planCacheListFilters result' ) ; const filter = res . filters . find ( function ( obj ) { return tojson ( obj . query ) === tojson ( queryShape . query ) && tojson ( obj . projection ) === tojson ( queryShape . projection ) && tojson ( obj . sort ) === tojson ( queryShape . sort ) ; } ) ; assert ( filter , ` ${ tojson ( queryShape ) } ` ) ; }
Ensure the filters for the given query shape exist.
Ensure the filters for the given query shape exist .