A scalable, fully managed NoSQL database for JSON documents with fast queries and automatic indexing
Hello Julius,
M30 supports DiskANN, so you shouldn’t need to enable cosmosSearch manually. The index definition looks valid, but the query uses query; the current syntax expects the embedding under vector.
Try:
db.items.aggregate([
{
$search: {
cosmosSearch: {
path: "textEmbeddings",
vector: [0.1, 0.2 /* full 1536-value vector */],
k: 1,
lSearch: 40
}
}
}
])
Also confirm that the query contains exactly 1,536 numeric values, matching the index dimensions, and check the index status with db.items.getIndexes().
If the corrected query still returns “cosmosSearch query is not enabled for this cluster,” the feature may not have been provisioned correctly on that specific cluster. At that point, recreate the M30 cluster or open an Azure support request with the cluster resource ID and region, because this would be a service-side enablement issue rather than something exposed as a portal setting. Microsoft’s current documentation confirms DiskANN and cosmosSearch support on M30 and higher tiers.
Please "Accept the answer" if this information helped you. This will help us and others in the community as well.