Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-61543

SEARCH n1ql queries are not defaulted to match_none:{} if not specified

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.6.2
    • 7.6.2
    • fts
    • None
    • Untriaged
    • 0
    • Unknown

    Description

      Query 1:

      SELECT c.CarFROM store sJOIN car c ON c.Car = "Bentley" AND "Bentley" IN s.AvailableCarsandSEARCH(c, {    "knn": [{        "field": "color_rgb_vector",        "vector": [0,255,255],         "k": 3    }]}) 

      Error:

      [
        {
          "code": 5000,
          "msg": "n1fty: failed to parse query to search request - cause: BuildQueryFromBytes, err: unknown query type"
        }
      ] 

       

      Query 2:

      SELECT c.CarFROM store sJOIN car c ON c.Car = "Bentley" AND "Bentley" IN s.AvailableCarsandSEARCH(c, {    "query": {        "match_none": {}    },    "knn": [{        "field": "color_rgb_vector",        "vector": [0,255,255],         "k": 3    }]})

      Response :

      [  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  },  {    "Car": "Bentley"  }

       

      Attachments

        1. Screenshot 2024-04-19 at 4.11.36 PM.png
          109 kB
          Abhi Dangeti
        2. Screenshot 2024-04-18 at 1.22.00 PM.png
          109 kB
          Abhi Dangeti
        3. image-2024-05-14-21-36-56-752.png
          126 kB
          Sarthak Dua

        Issue Links

          For Gerrit Dashboard: MB-61543
          # Subject Branch Project Status CR V

          Activity

            People

              sarthak.dua Sarthak Dua
              sarthak.dua Sarthak Dua
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty