azure-sdk-for-java icon indicating copy to clipboard operation
azure-sdk-for-java copied to clipboard

[FEATURE REQ] @CosmosIndexingPolicy in spring-data-cosmos should support composite, range, and spatial indexes

Open Blackbaud-EricSlater opened this issue 4 years ago • 6 comments

Is your feature request related to a problem? Please describe. spring-data-cosmos @CosmosIndexingPolicy does not support specifying composite indexes, spatial indexes, or range indexes

Describe the solution you'd like Extend the @CosmosIndexingPolicy annotation to support all of the above.

Specifically a compositeIndexes field should be added to support specifying json like this...

"compositeIndexes":[  
            [  
                {  
                    "path":"/name",
                    "order":"ascending"
                },
                {  
                    "path":"/age",
                    "order":"descending"
                }
            ]
        ]

A spatialIndexes field should be added to support specifying json like this...

    "spatialIndexes": [
        {
            "path": "/path/to/geojson/property/?",
            "types": [
                "Point",
                "Polygon",
                "MultiPolygon",
                "LineString"
            ]
        }
    ]

The includedPaths field should be extended to support range indexes like this...

          {
               "path": "/path/to/included/property/?",
               "indexes": [
                   {
                       "kind": "Range",
                       "dataType": "Number"
                   },
                   {
                       "kind": "Range",
                       "dataType": "String"
                   }
               ]
           }

Describe alternatives you've considered The sdk itself doesnt provide any alternative. The underlying lib azure-cosmos does seem to provide classes that support specifying range and spatial indexes, though i dont see support for composite indexes.

Additional context Add any other context or screenshots about the feature request here.

Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • [x] Description Added
  • [x] Expected solution specified

Blackbaud-EricSlater avatar Nov 12 '20 20:11 Blackbaud-EricSlater

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @kushagraThapar, @anfeldma-ms

ghost avatar Nov 12 '20 20:11 ghost

@mbhaskar - please take a look at this.

kushagraThapar avatar Nov 13 '20 03:11 kushagraThapar

Hi, Is there any update when this will be fixed in azure-spring-data-cosmos sdk? Thanks!

@MortezaDamavandpeyma-TomTom - Isn't this already supported?

kushagraThapar avatar Oct 07 '21 16:10 kushagraThapar

@Blackbaud-EricSlater - we should close this issue if all of the above has been supported, to avoid confusion.

kushagraThapar avatar Oct 07 '21 16:10 kushagraThapar

only composite indexes support has been added. spatial and range index support has not as far as i know

Blackbaud-EricSlater avatar Oct 07 '21 18:10 Blackbaud-EricSlater

We will review adding of spatial and range index support in upcoming semester planning (October).

TheovanKraay avatar Aug 16 '23 18:08 TheovanKraay

Hi @Blackbaud-EricSlater, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.

github-actions[bot] avatar Apr 08 '24 18:04 github-actions[bot]