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

Flex query returning results for an invalid keyspace.

    XMLWordPrintable

Details

    • Bug
    • Resolution: User Error
    • Major
    • 7.6.0
    • 7.6.0
    • fts
    • Couchbase server Enterprise Edition 7.6.0 build 1978

    Description

      1. Created a 4 node cluster.

      2. Created a bucket 'SEARCH__vector_bucket_SIFTSMALL' and loaded the siftsmall dataset into the bucket.

      3. Created a vector index called 'vectIndex' on the 'vector_data' field.

      4. Ran the following N1QL query with wrong index name

      select * from `SEARCH__vector_collection_SIFTSMALL` 
      where SEARCH(sift_index,
      {
          "query": {
              "match_none": {}
          },
          "knn": [{
              "field": "vector_data",
              "vector": [16.0,34.0,46.0,3.0,1.0,6.0,27.0,44.0,0.0,9.0,77.0,32.0,37.0,83.0,41.0,3.0,19.0,14.0,15.0,17.0,18.0,34.0,22.0,22.0,12.0,23.0,52.0,12.0,0.0,0.0,0.0,1.0,8.0,22.0,15.0,16.0,16.0,35.0,92.0,94.0,1.0,3.0,9.0,13.0,22.0,120.0,120.0,12.0,120.0,15.0,5.0,0.0,0.0,39.0,74.0,120.0,115.0,24.0,14.0,7.0,2.0,7.0,4.0,34.0,1.0,18.0,36.0,120.0,41.0,10.0,2.0,0.0,1.0,8.0,93.0,120.0,35.0,21.0,7.0,0.0,120.0,104.0,57.0,7.0,0.0,1.0,2.0,20.0,120.0,51.0,2.0,13.0,18.0,12.0,3.0,20.0,7.0,6.0,9.0,18.0,18.0,24.0,19.0,4.0,5.0,12.0,114.0,71.0,13.0,2.0,0.0,2.0,60.0,30.0,81.0,54.0,0.0,0.0,0.0,13.0,44.0,10.0,1.0,3.0,7.0,15.0,20.0,38.0],
              "k": 3
          }]
      }); 

      5. The query returned results even though 'sift_index' does not exist

      [
        {
          "SEARCH__vector_collection_SIFTSMALL": {
            "id": "03df3f8c-c2f9-488d-907b-88693c51e76d",
            "sname": "edu",
            "sno": 3505,
            "vector_data": [
              3,
              18,
              3,
              2,
              27,
              100,
              17,
              0,
              4,
              73,
              81,
              13,
              13,
              12,
              10,
              10,
              2,
              10,
              116,
              39,
              4,
              7,
              14,
              16,
              66,
              19,
              36,
              11,
              2,
              6,
              8,
              11,
              94,
              86,
              3,
              0,
              1,
              37,
              10,
              23,
              106,
              132,
              132,
              12,
              0,
              0,
              0,
              6,
              0,
              12,
              132,
              111,
              0,
              0,
              0,
              0,
              9,
              20,
              132,
              74,
              4,
              1,
              0,
              0,
              132,
              54,
              25,
              0,
              0,
              2,
              1,
              39,
              132,
              29,
              6,
              4,
              0,
              0,
              4,
              66,
              9,
              4,
              38,
              38,
              14,
              0,
              6,
              17,
              1,
              1,
              22,
              44,
              39,
              1,
              0,
              4,
              41,
              25,
              10,
              0,
              0,
              0,
              0,
              32,
              96,
              8,
              0,
              0,
              0,
              0,
              18,
              132,
              12,
              0,
              0,
              0,
              9,
              3,
              19,
              98,
              0,
              0,
              0,
              4,
              43,
              7,
              3,
              6
            ]
          }
        },
        {
          "SEARCH__vector_collection_SIFTSMALL": {
            "id": "e6ce3c5f-2f41-4b02-bcd6-4873b77e8e77",
            "sname": "hws",
            "sno": 6025,
            "vector_data": [
              31,
              23,
              0,
              0,
              0,
              14,
              6,
              2,
              34,
              123,
              77,
              15,
              0,
              0,
              0,
              0,
              0,
              25,
              123,
              87,
              1,
              0,
              0,
              0,
              0,
              18,
              42,
              49,
              3,
              0,
              0,
              0,
              123,
              25,
              6,
              0,
              0,
              1,
              3,
              16,
              123,
              103,
              40,
              21,
              7,
              2,
              5,
              63,
              6,
              9,
              50,
              123,
              89,
              12,
              6,
              6,
              0,
              2,
              27,
              64,
              13,
              1,
              1,
              0,
              40,
              100,
              55,
              0,
              0,
              0,
              2,
              4,
              123,
              42,
              8,
              0,
              2,
              13,
              68,
              106,
              4,
              0,
              0,
              7,
              42,
              112,
              123,
              18,
              3,
              0,
              3,
              17,
              9,
              35,
              50,
              51,
              2,
              18,
              11,
              0,
              0,
              21,
              41,
              3,
              4,
              4,
              1,
              0,
              0,
              32,
              123,
              12,
              0,
              0,
              0,
              0,
              0,
              72,
              123,
              2,
              3,
              0,
              0,
              0,
              0,
              20,
              43,
              58
            ]
          }
        },
        {
          "SEARCH__vector_collection_SIFTSMALL": {
            "id": "2c9e17a7-30fe-46e9-8d78-4b5169137ca3",
            "sname": "arb",
            "sno": 1146,
            "vector_data": [
              63,
              34,
              0,
              0,
              0,
              3,
              9,
              30,
              98,
              73,
              6,
              1,
              1,
              0,
              7,
              27,
              10,
              11,
              43,
              43,
              27,
              15,
              7,
              8,
              0,
              0,
              24,
              63,
              38,
              6,
              4,
              0,
              127,
              41,
              2,
              0,
              2,
              10,
              9,
              36,
              127,
              115,
              22,
              0,
              0,
              0,
              4,
              23,
              6,
              31,
              43,
              29,
              63,
              24,
              10,
              4,
              0,
              0,
              4,
              40,
              85,
              27,
              9,
              1,
              111,
              13,
              6,
              3,
              0,
              0,
              3,
              122,
              80,
              8,
              0,
              0,
              0,
              11,
              127,
              127,
              3,
              2,
              0,
              1,
              16,
              127,
              127,
              17,
              20,
              10,
              5,
              5,
              11,
              117,
              82,
              24,
              18,
              25,
              3,
              2,
              0,
              3,
              6,
              21,
              31,
              52,
              4,
              3,
              19,
              15,
              33,
              58,
              10,
              12,
              8,
              13,
              68,
              99,
              72,
              13,
              59,
              26,
              7,
              1,
              0,
              10,
              20,
              48
            ]
          }
        }
      ] 

      Attachments

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

        Activity

          People

            mohsin.ahmed Mohsin Ahmed
            mohsin.ahmed Mohsin Ahmed
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty