milvus-sdk-cpp icon indicating copy to clipboard operation
milvus-sdk-cpp copied to clipboard

Possible Index Describe BUG

Open luisfmnunes opened this issue 1 year ago • 0 comments

I have a Collection whose schema has an INT64 id field named template_id and a FLOAT VECTOR field named template_data

When I use milvus::client::DescribeIndex(collection_name, "template_data", index_desc) it retrieves the IndexDesc object, but the index_desc.IndexName() method is returning the FieldName, not the IndexName.

if(hasCollection){
        std::cout << "Collection '" << collection_name << "' in Milvus DB\n";

        milvus::CollectionStat stats;
        status = client->GetCollectionStatistics(collection_name, stats);
        CheckStatus("Failed to Fetch Collection's Statistics: ", status);

        std::cout << "Collection Rows: " << stats.RowCount() << "\n";

        milvus::IndexDesc index_desc;
        status = client->DescribeIndex(collection_name, "template_data", index_desc);
        CheckStatus("Failed to retrieve Index Description: ", status);

        std::cout << index_desc.IndexName() << ": " << index_desc.FieldName() << "\n";
}

The following output is obtained: image

Is this the expected output? If it is, why have two differente methods (FieldName and IndexName) for the same purpose?

luisfmnunes avatar Jan 31 '24 14:01 luisfmnunes