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

Error: Unrecognized logical operator: $text #10

Open
jasongrishkoff opened this issue Feb 11, 2021 · 2 comments
Open

Error: Unrecognized logical operator: $text #10

jasongrishkoff opened this issue Feb 11, 2021 · 2 comments

Comments

@jasongrishkoff
Copy link

jasongrishkoff commented Feb 11, 2021

Here's the error:

33jma
2021-02-11 19:40:47+02:00Exception while invoking method 'getResetPasswordEmail' Error: Unrecognized logical operator: $text33jma
2021-02-11 19:40:47+02:00 at packages/minimongo/common.js:579:1533jma
2021-02-11 19:40:47+02:00 at Array.map (<anonymous>)33jma
2021-02-11 19:40:47+02:00 at compileDocumentSelector (packages/minimongo/common.js:572:48)33jma
2021-02-11 19:40:47+02:00 at packages/minimongo/common.js:560:1233jma
2021-02-11 19:40:47+02:00 at Array.map (<anonymous>)33jma
2021-02-11 19:40:47+02:00 at compileArrayOfDocumentSelectors (packages/minimongo/common.js:555:20)33jma
2021-02-11 19:40:47+02:00 at Object.$and (packages/minimongo/common.js:260:7)33jma
2021-02-11 19:40:47+02:00 at packages/minimongo/common.js:583:1433jma
2021-02-11 19:40:47+02:00 at Array.map (<anonymous>)33jma
2021-02-11 19:40:47+02:00 at compileDocumentSelector (packages/minimongo/common.js:572:48)33jma
2021-02-11 19:40:47+02:00 at Matcher._compileSelector (packages/minimongo/matcher.js:116:12)33jma
2021-02-11 19:40:47+02:00 at new Matcher (packages/minimongo/matcher.js:52:29)33jma
2021-02-11 19:40:47+02:00 at hook.findOne (packages/zegenie:redis-oplog/lib/mongo/extendMongoCollection.js:154:27)33jma
2021-02-11 19:40:47+02:00 at MethodInvocation.getResetPasswordEmail (server/methods/users.jsx:534:37)33jma
2021-02-11 19:40:47+02:00 at MethodInvocation.methodMap.<computed> (packages/mdg:meteor-apm-agent/lib/hijack/wrap_session.js:161:30)33jma
2021-02-11 19:40:47+02:00 at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1771:12)33jma
2021-02-11 19:40:47+02:00 at packages/ddp-server/livedata_server.js:719:1933jma
2021-02-11 19:40:47+02:00 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)33jma
2021-02-11 19:40:47+02:00 at packages/ddp-server/livedata_server.js:717:4633jma
2021-02-11 19:40:47+02:00 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)33jma
2021-02-11 19:40:47+02:00 at packages/ddp-server/livedata_server.js:715:4633jma
2021-02-11 19:40:47+02:00 at new Promise (<anonymous>)33jma
2021-02-11 19:40:47+02:00 at Session.method (packages/ddp-server/livedata_server.js:689:23)33jma
2021-02-11 19:40:47+02:00 at packages/mdg:meteor-apm-agent/lib/hijack/wrap_session.js:52:3833jma
2021-02-11 19:40:47+02:00 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)33jma
2021-02-11 19:40:47+02:00 at Session.sessionProto.protocol_handlers.method (packages/mdg:meteor-apm-agent/lib/hijack/wrap_session.js:51:44)33jma
2021-02-11 19:40:47+02:00 at packages/ddp-server/livedata_server.js:559:43

And here's the code firing that error:

Meteor.users.findOne({
  $and:[
    {$text:{$search:string}},
    {$or:[
      {'username':{$regex:value, $options: 'i'}},
      {'profile.name':{$regex:value, $options: 'i'}},
      {'registered_emails.address':{$regex:value, $options: 'i'}},
     ]}
  ]
})
@ramezrafla
Copy link
Owner

It seems Mini-Mongo also does not support $text. I never personally used it so didn't face it.
I think the way around it since MDG will unlikely do any further development on it is to have a check before any finds for fields we cannot support and revert to the DB

@jasongrishkoff
Copy link
Author

This might help -- had the same issue with redis-oplog: cult-of-coders/redis-oplog#229

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants