Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-2727

Like operator does not work in MongoDB translator

    XMLWordPrintable

    Details

      Description

      The issue is similar to http://stackoverflow.com/questions/5608584/how-to-query-mongodb-with-like-using-the-java-api

      for query like

      select * from city where city like 'ACM%'
      

      Current query expression generated which is correct for javascript environment is

      $match:{ "city" : "/^ACM/"}
      $project:{ "_m0" : "$_id" , "_m1" : "$city" , "_m2" : "$state" , "_m3" : "$pop"}
      

      but when executing from java, java driver wants like

      $match:{ "city" : { "$regex" : "^ACM"}}
      $project:{ "_m0" : "$_id" , "_m1" : "$city" , "_m2" : "$state" , "_m3" : "$pop"}
      

        Attachments

          Activity

            People

            Assignee:
            rareddy_mk-kafka Ramesh Reddy
            Reporter:
            rareddy_mk-kafka Ramesh Reddy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: