{"record":{"id":"78e117ed896a3785","repo":"apache/seatunnel","slug":"desc-index-error","errorCode":"DESC_INDEX_ERROR","errorMessage":"DESC_INDEX_ERROR","messagePattern":"DESC_INDEX_ERROR","errorType":"error_code","errorClass":"MilvusConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-milvus/src/main/java/org/apache/seatunnel/connectors/seatunnel/milvus/utils/MilvusConvertUtils.java","lineNumber":178,"sourceCode":"                            .name(CommonOptions.METADATA.getName())\n                            .dataType(STRING_TYPE)\n                            .options(options)\n                            .build();\n            columns.add(dynamicColumn);\n        }\n\n        // primary key\n        PrimaryKey primaryKey = buildPrimaryKey(schema.getFieldsList());\n\n        // index\n        R<DescribeIndexResponse> describeIndexResponseR =\n                client.describeIndex(\n                        DescribeIndexParam.newBuilder()\n                                .withDatabaseName(database)\n                                .withCollectionName(collection)\n                                .build());\n        if (describeIndexResponseR.getStatus() != R.Status.Success.getCode()) {\n            throw new MilvusConnectorException(MilvusConnectionErrorCode.DESC_INDEX_ERROR);\n        }\n        DescribeIndexResponse indexResponse = describeIndexResponseR.getData();\n        List<ConstraintKey.ConstraintKeyColumn> vectorIndexes = buildVectorIndexes(indexResponse);\n\n        // build tableSchema\n        TableSchema tableSchema =\n                TableSchema.builder()\n                        .columns(columns)\n                        .primaryKey(primaryKey)\n                        .constraintKey(\n                                ConstraintKey.of(\n                                        ConstraintKey.ConstraintType.VECTOR_INDEX_KEY,\n                                        \"vector_index\",\n                                        vectorIndexes))\n                        .build();\n\n        // build tableId\n        String CATALOG_NAME = \"Milvus\";","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-milvus/src/main/java/org/apache/seatunnel/connectors/seatunnel/milvus/utils/MilvusConvertUtils.java#L160-L196","documentation":"MilvusConvertUtils.getCatalogTable throws DESC_INDEX_ERROR when the Milvus describeIndex RPC returns a non-success status. The connector uses index metadata to populate vector index constraint information on the CatalogTable; failing to fetch it aborts table conversion. Note the error carries no message — the raw status code is all you get here.","triggerScenarios":"client.describeIndex(DescribeIndexParam with databaseName/collectionName) returns status != R.Status.Success while getCatalogTable builds the table schema — e.g. collection has no index at all or is not accessible.","commonSituations":"Querying a brand-new collection created without any vector index, describing an empty/placeholder collection, or a Milvus version where describeIndex on an index-less collection returns an error status rather than an empty list.","solutions":["Create the expected vector index on the collection (e.g. IVF/HNSW index on the vector field) before running the job","Verify the collection exists and is fully built (not mid-load) in Milvus","Check Milvus user permissions for describeIndex","If the collection legitimately has no index, create a minimal index or upgrade the connector/Milvus version that tolerates missing indexes"],"exampleFix":"// before: collection with no vector index\ncollection.create(); // no index created\n// after: build the index before catalog discovery\ncollection.createIndex(CreateIndexParam.newBuilder()\n    .withFieldName(\"embedding\")\n    .withIndexType(IndexType.HNSW)\n    .withMetricType(MetricType.L2)\n    .build());","handlingStrategy":"validation","validationCode":"R<DescribeIndexResponse> r = client.describeIndex(DescribeIndexParam.newBuilder()\n    .withDatabaseName(db).withCollectionName(coll).build());\nif (r.getStatus() != R.Status.Success.getCode())\n    throw new IllegalStateException(\"Index not describable on \" + db + \".\" + coll + \" — create one first\");","typeGuard":null,"tryCatchPattern":"try {\n  catalog.getTable(tablePath);\n} catch (MilvusConnectorException e) {\n  if (e.getErrorCode() == MilvusConnectionErrorCode.DESC_INDEX_ERROR) {\n    logger.error(\"describeIndex failed on collection (often: no index exists)\");\n    // create a vector index, then retry\n  } else { throw e; }\n}","preventionTips":["Always build a vector index on vector fields right after creating the collection","Wait for collection load/index build to complete before running catalog reads","Check permissions for index metadata access"],"tags":["milvus","catalog","index","rpc-error"],"backgroundTag":"api-error-response","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}