Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown operator $search: having troubles using Filters.texts methods #120

Open
rickie95 opened this issue Feb 28, 2020 · 1 comment
Open
Labels
help wanted Issues that need assistance from volunteers or PRs that need help to proceed.

Comments

@rickie95
Copy link

Hi, I'm trying to retrieve some Documents from a collection using .countDocuments() and find() when using Filters.text():
myCollection.find(Filters.text("foo")); and

myCollection.countDocuments(
    new Document("text", 
            new Document("$search", "Foo")
                    .append("$caseSensitive", false)
    )); 

com.mongodb.MongoCommandException: Command failed with error 2 (BadValue): 'unknown operator: $search' on server media-match.com:35795. The full response is {"$err": "unknown operator: $search", "errmsg": "unknown operator: $search", "code": 2, "codeName": "BadValue", "ok": 0}

Seems like the fake implementation of the Server doesn't support the $search operator.

With Filters.eq() I have the expected behavior but I would like to recover text with a case insensitive search.

Am I missing something?

@bwaldvogel
Copy link
Owner

$search is not implemented (yet). I would appreciate any PR that adds some support.

@bwaldvogel bwaldvogel added the help wanted Issues that need assistance from volunteers or PRs that need help to proceed. label Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issues that need assistance from volunteers or PRs that need help to proceed.
Projects
None yet
Development

No branches or pull requests

2 participants