Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Support for {'$meta': 'textScore'} in sort for mongo 2.6 #71

Open
dkliminsky opened this issue Jul 15, 2014 · 0 comments
Open

Support for {'$meta': 'textScore'} in sort for mongo 2.6 #71

dkliminsky opened this issue Jul 15, 2014 · 0 comments

Comments

@dkliminsky
Copy link

something:

index = SON()
for (key, value) in index_list:
    if not isinstance(key, basestring):
        raise TypeError("first item in each key pair must be a string")
    if value not in [ASCENDING, DESCENDING, GEO2D, {'$meta': 'textScore'}]:
        raise TypeError("second item in each key pair must be ASCENDING, "
                        "DESCENDING, or GEO2D")
    index[key] = value
return index
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant