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

create vector index on xattr fails ErrTraining: Number of qualifying/valid vectors 0

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • Unknown

    Description

      With data in xattrs field I am not able to create vector index:

       cbq> CREATE INDEX vector_index_L2_SQUARED IF NOT EXISTS ON default(size, brand, vec VECTOR) WITH {'dimension': 128, 'train_list': 10000, 'description': 'IVF,PQ8x8', 'similarity': 'L2_SQUARED', 'scan_nprobes': 3};
      {
          "requestID": "82bcce32-9185-4e0a-ba68-c4f355a7a768",
          "signature": null,
          "results": [
          ],
          "errors": [
              {
                  "code": 5000,
                  "msg": "GSI CreateIndex() - cause: 0:ErrTraining: Number of qualifying/valid vectors 0 are less than the number of vectors 256 required for training 256 centroids \n\n",
                  "reason": {
                      "_level": "exception",
                      "caller": "secondary_index:683",
                      "cause": {
                          "error": "0:ErrTraining: Number of qualifying/valid vectors 0 are less than the number of vectors 256 required for training 256 centroids",
                          "source": "CreateIndex()"
                      },
                      "code": 4350,
                      "key": "indexing.error",
                      "message": "GSI error"
                  }
              }
          ],
          "status": "fatal",
          "metrics": {
              "elapsedTime": "1.5323284s",
              "executionTime": "1.532217776s",
              "resultCount": 0,
              "resultSize": 0,
              "serviceLoad": 6,
              "errorCount": 1
          }
      }

       

      you can see vector data here:

      cbq> SELECT meta().xattrs.vec[:5] from default limit 5;
       
       
       
       
      {
          "requestID": "f6a912b4-5849-4aff-ad03-ec2903303a59",
          "signature": {
              "$1": "array"
          },
          "results": [
          {
              "$1": [
                  0,
                  0,
                  4,
                  8,
                  12
              ]
          },
          {
              "$1": [
                  61,
                  31,
                  12,
                  1,
                  3
              ]
          },
          {
              "$1": [
                  7,
                  19,
                  20,
                  1,
                  0
              ]
          },
          {
              "$1": [
                  66,
                  38,
                  9,
                  1,
                  10
              ]
          },
          {
              "$1": [
                  15,
                  7,
                  0,
                  0,
                  0
              ]
          } 

      Attachments

        Issue Links

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

          Activity

            People

              dhananjay.kshirsagar Dhananjay Kshirsagar
              pierre.regazzoni Pierre Regazzoni
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty