Remove Stage name check on aggregate pipelines (#7237)
* add search for atlas search index * added test for search in pipeline * removed stage name check in pipeline * removed spec for invalid query invalid key * updated changelog Co-authored-by: Diamond Lewis <findlewis@gmail.com>
This commit is contained in:
@@ -74,4 +74,15 @@ describe('AggregateRouter', () => {
|
||||
expect(e.message).toBe('Pipeline stages should only have one key found group, match');
|
||||
}
|
||||
});
|
||||
|
||||
it('get search pipeline from Pipeline Operator (Array)', () => {
|
||||
const body = {
|
||||
pipeline: {
|
||||
search: {},
|
||||
},
|
||||
};
|
||||
const expected = [{ $search: {} }];
|
||||
const result = AggregateRouter.getPipeline(body);
|
||||
expect(result).toEqual(expected);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user