0

I'm trying to setup the soft delete feature on Azure Search with a Cosmos DB Graph database as my data source.

Azure Search needs a column in the database to track deletes so I've added a property to all my vertices called 'isDeleted' with a true / false value. However Search still can not use this column as it is stored in the properties collection in the graph db rather than a simple name / value pair.

eg. It is stored like this in the properties object:

"properties": {
        "isDeleted": [
            {
                "id": "95458dcd-02f2-4c2c-a2d3-7515026b74c2",
                "value": false
            }
        ]
    }

I can't see any way of changing how Cosmos stores the properties have you got any suggestions how I can set this up?

michael_hook
  • 1,936
  • 14
  • 10

1 Answers1

1

To the best of my knowledge, Azure Search doesn't support Cosmos DB Graph API. The supported API "flavors" are documented here. That article also links to the UserVoice request for Graph API.

Eugene Shvets
  • 4,561
  • 13
  • 19
  • I have a search index setup through the Azure UI pointed at a Cosmos DB Graph database and it is indexing the data, so from that perspective it is working. I guess it is using the SQL API internally to extract the data. The results in the index are not optimally formatted but the data is there. The main limitation so far is the lack of soft delete. I see the graph support has been mooted for several years and it has a lot more votes than the other options. Do you have any knowledge of the Azure Search road map concerning which features are planned to be introduced? – michael_hook Apr 10 '19 at 08:00
  • Unfortunately I don't, but hopefully one of the team members will chime in on this. – Eugene Shvets Apr 11 '19 at 06:30
  • @michael_hook - I'm an engineer on the Azure Search team. We don’t have any plans for the immediate future (next couple months) to support an indexer that connects your Cosmos DB Graph database to Azure Search. As mentioned on the UserVoice link this topic is under review though. Please feel free to email azuresearch_contact@microsoft.com and we can further discuss your Cosmos DB Graph scenario – Corom - MSFT Apr 15 '19 at 17:33