Azure / azure-cosmosdb-java

Java Async SDK for SQL API of Azure Cosmos DB
MIT License
54 stars 61 forks source link

Getting "order by String must enable indexing with Range and max Precision" . Unable to edit the Indexing in Portal.azure.com #255

Closed SyedMoin16 closed 5 years ago

SyedMoin16 commented 5 years ago

Describe the bug I'm trying to fetch details using findAllByOrderByNameAsc method in Document DB repository

To Reproduce use this function findAllByOrderByNameAsc

Expected behavior Should return data as this query does "select * from c order by c.name asc"

Actual behavior throwing "order by String must enable indexing with Range and max Precision"

Environment summary SDK Version:Spring Tool Suite Version: 3.9.6.RELEASE Java JDK version:1.8.0_181 OS Version :MacOSX Azure-cosmosdb maven version: 2.6.0

Additional context Tried to manually index it through code by adding precision and range still no luck. Please help

christopheranderson commented 5 years ago

Sounds like this is an issue you're facing via https://github.com/microsoft/spring-data-cosmosdb

In this case, it sounds like it's an issue with enabling indexing, not an SDK bug - which is out of scope for this repo. Please open a support ticket or email AskCosmosDB@microsoft.com to get help with updating your indexing policy.