You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2019/10/01 09:44:14 UTC

[GitHub] [couchdb-nano] thatshailesh opened a new issue #184: Error: Invalid operator: $regex

thatshailesh opened a new issue #184: Error: Invalid operator: $regex
URL: https://github.com/apache/couchdb-nano/issues/184
 
 
   <!--- Provide a general summary of the issue in the Title above -->
   Facing issue while doing something like
   ```
   await test.find(
           { 
               selector: { name: {"$regex": /cat/}}
           }
       )
   ```
   ## Expected Behavior
   <!--- If you're describing a bug, tell us what should happen -->
   it should return names containing `cat`
   <!--- If you're suggesting a change/improvement, tell us how it should work -->
   
   ## Current Behavior
   <!--- If describing a bug, tell us what happens instead of the expected behavior -->
   <!--- If suggesting a change/improvement, explain the difference from current behavior -->
   Current error stack
   ```
    Error: Invalid operator: $regex
       at Request._callback (/node_modules/nano/lib/nano.js:154:15)
       at Request.self.callback (node_modules/request/request.js:185:22)
       at Request.emit (events.js:198:13)
       at Request.<anonymous> (/node_modules/request/request.js:1161:10)
       at Request.emit (events.js:198:13)
       at IncomingMessage.<anonymous> (/node_modules/request/request.js:1083:12)
       at Object.onceWrapper (events.js:286:20)
       at IncomingMessage.emit (events.js:203:15)
       at endReadableNT (_stream_readable.js:1129:12)
   ```
   ## Possible Solution
   <!--- Not obligatory, but suggest a fix/reason for the bug, -->
   <!--- or ideas how to implement the addition or change -->
   
   ## Steps to Reproduce (for bugs)
   <!--- Provide a link to a live example, or an unambiguous set of steps to -->
   <!--- reproduce this bug. Include code to reproduce, if relevant -->
   
   1.Just use $regex, it will throw error
   
   ## Context
   <!--- How has this issue affected you? What are you trying to accomplish? -->
   <!--- Providing context helps us come up with a solution that is most useful in the real world -->
   
   ## Your Environment
   <!--- Include as many relevant details about the environment you experienced the bug in -->
   * Version used: 8.0.1
   * Browser Name and version: Chrome
   * Operating System and version (desktop or mobile): OSX
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services