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

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          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