Description
I'd like to do a query where the sort parameter to find allows me to sort on a meta field for $text search:
results = COMBINED.find( |
{'$text': {'$search': 'whatever'}}, |
limit=limit, |
fields={'score': {'$meta': 'textScore'}}, |
sort=[('score', {'$meta': 'textScore'})] |
)
|
The projection works but having the sort produces the following error: "TypeError: second item in each key pair must be 1, -1, '2d', 'geoHaystack', or another valid MongoDB index specifier."
Attachments
Issue Links
- is depended on by
-
DRIVERS-137 Project and sort by $meta.
-
- Closed
-