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

Able to create xattrs vector index in 7.6.0 mix cluster mode

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • 7.6.2
    • 7.6.2
    • fts
    • Enterprise Edition 7.6.2 build 3716 and
      Enterprise Edition 7.6.0 build 2182
    • Untriaged
    • 0
    • Unknown

    Description

      So basically I created a cluster with 2 nodes with each node configurations as follows

      • Node 1 (7.6.2 build 3716) running services {kv, fts}
      • Node 2 (7.6.0 build 2182) running services {kv,fts}

      Now the cluster compat version is 7.6.0

      As expected, the search index creation page UI when logged in Node 2 which runs 7.6.0 build 2182 has no options to either create a xattrs index or create a base64 type index.

      But when logged in Node 1 which runs 7.6.2 build 3716 the UI basically has the features to create a xattrs index as well as base64 options are available.


      But when tried to create a xattr index, the UI shows an error stating "xattr fields and properties not supported in this cluster".

      But as a workaround, I tried creating a xattr index via cli (curl command). 
      Since Node 1 runs the 7.6.2 version, I sent curl cmd to create a xattr index which fails as expected with the error message:

      {"error":"rest_create_index: error creating index: , err: manager_api: CreateIndex, Prepare failed, err: PrepareIndex, err: xattr fields and properties not supported in this cluster","request":{"name":"index_default_vector_new_1","params":{"doc_config":{"docid_prefix_delim":"","docid_regexp":"","mode":"scope.collection.type_field","type_field":"type"},"mapping":{"analysis":{},"default_analyzer":"standard","default_datetime_parser":"dateTimeOptional","default_field":"_all","default_mapping":{"dynamic":true,"enabled":false},"default_type":"_default","docvalues_dynamic":false,"index_dynamic":true,"store_dynamic":false,"type_field":"_type","types":{"_default._default":{"dynamic":false,"enabled":true,"properties":{"_$xattrs":{"dynamic":false,"enabled":true,"properties":{"vector_data":{"dynamic":false,"enabled":true,"fields":[{"dims":128,"index":true,"name":"vector_data","similarity":"l2_norm","type":"vector","vector_index_optimized_for":"recall"}]}}}}}}},"store":{"indexType":"scorch","segmentVersion":16}},"planParams":{"indexPartitions":1,"maxPartitionsPerPIndex":1024},"sourceName":"default","sourceParams":{},"sourceType":"gocbcore","type":"fulltext-index"},"status":"fail"} 

      But, when I send the same curl request to the Node 2 which runs 7.6.0 version, the index creation is successful.

      curl request:

      curl -XPUT -H "Content-Type: application/json" -u Administrator:password http://172.23.105.83:8094/api/index/index_default_vector_new_1 -d '{
        "type": "fulltext-index",
        "name": "index_default_vector_new_1",
        "sourceType": "gocbcore",
        "sourceName": "default",
        "planParams": {
          "maxPartitionsPerPIndex": 1024,
          "indexPartitions": 1
        },
        "params": {
          "doc_config": {
            "docid_prefix_delim": "",
            "docid_regexp": "",
            "mode": "scope.collection.type_field",
            "type_field": "type"
          },
          "mapping": {
            "analysis": {},
            "default_analyzer": "standard",
            "default_datetime_parser": "dateTimeOptional",
            "default_field": "_all",
            "default_mapping":{
              "dynamic": true,
              "enabled": false
            },
            "default_type": "_default",
            "docvalues_dynamic": false,
            "index_dynamic": true,
            "store_dynamic": false,
            "type_field": "_type",
            "types": {
              "_default._default": {
                "dynamic": false,
                "enabled": true,
                "properties": {
                  "_$xattrs": {
                    "dynamic": false,
                    "enabled": true,
                    "properties": {
                      "vector_data": {
                        "dynamic": false,
                        "enabled": true,
                        "fields": [
                          {
                            "dims": 128,
                            "index": true,
                            "name": "vector_data",
                            "similarity": "l2_norm",
                            "type": "vector",
                            "vector_index_optimized_for": "recall"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "store": {
            "indexType": "scorch",
            "segmentVersion": 16
          }
        },
        "sourceParams": {}
      }' 

      result:

      {"status":"ok","name":"index_default_vector_new_1","uuid":"16c8793090c7a359"} 

      But when ran queries against it, it neither gives any results nor it fails.

       

      curl -XPOST -H "Content-Type: application/json" -u Administrator:password   http://172.23.104.177:8094/api/index/index_default_vector_new_1/query    -d \'{\n    "query": {\n      "match_none":{}\n    },\n    "size": 6,\n    "knn": [\n      {\n        "field": "vector_data",\n        "k": 6,\n        "vector":[1,3,11,110,62,22,4,0,43,21,22,18,6,28,64,9,11,1,0,0,1,40,101,21,20,2,4,2,2,9,18,35,1,1,7,25,108,116,63,2,0,0,11,74,40,101,116,3,33,1,1,11,14,18,116,116,68,12,5,4,2,2,9,102,17,3,10,18,8,15,67,63,15,0,14,116,80,0,2,22,96,37,28,88,43,1,4,18,116,51,5,11,32,14,8,23,44,17,12,9,0,0,19,37,85,18,16,104,22,6,2,26,12,58,67,82,25,12,2,2,25,18,8,2,19,42,48,11]\n      }\n    ],\n    "from": 0\n  }\'\n  ', returncode=0, stdout=b'{"status":{"total":1,"failed":0,"successful":1},"hits":[],"total_hits":0,"cost":0,"max_score":0,"took":63563,"facets":null}\n') 

      Is this is a bug or expected behaviour ? 

       

      Attachments

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

        Activity

          People

            abhinav Abhi Dangeti
            nishanth.vm Nishanth VM
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty