milvus-io / milvus-sdk-cpp

C++ SDK for Milvus 2.0
Apache License 2.0
35 stars 21 forks source link

Possible Index Describe BUG #258

Open luisfmnunes opened 7 months ago

luisfmnunes commented 7 months ago

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?