0

I'm storing the data for my in Azure Document DB. In order to allow search over the description field of my data, I've connected my document DB repository with Azure Search, as explained here: https://learn.microsoft.com/en-us/azure/documentdb/documentdb-search-indexer

I also need to filter the results of the search via several parameters. I find myself adding more an more fields to my Azure Search indexers, up to the point where I'm almost duplicating my database entities to the Azure search entities.

The question - If I need to search over my data and decide to use Azure search, is there any benefit to keeping the data in Document DB, or will it be better to model it again using only Azure Search?

PartlyCloudy
  • 711
  • 5
  • 14
  • You're comparing apples and oranges. Azure Search isn't built to be a database, nor is it for replacing your database indexes. Serves a very different purpose when it comes to search (e.g. full-text search). I can't imagine how you'd model a database in Azure Search, how you'd scale, how you'd do advanced queries, run stored procedures, etc. – David Makogon Jan 01 '17 at 15:48

1 Answers1

0

Document DB provides consistency guarantees that Azure Search does not. In general we don't recommend using Azure Search as a primary store. See my answer to this other SO question for specific caveats: Can Azure Search be used as a primary database for some data?

Community
  • 1
  • 1
Bruce Johnston
  • 8,344
  • 3
  • 32
  • 42
  • Hi Bruce, thanks for the link, I wasn't aware of many of these points. When using the combination of Azure Search and DocDB, is there a way to simplify the fact that I need to have two data models for my data? (That is, one for DocDB and a lighter one for Azure search). I will need to filter and sort based on several fields in my document. – PartlyCloudy Jan 01 '17 at 21:13
  • @Eran Gat There isn't right now, but making schema management in Azure Search simpler and more flexible is top of mind for me these days. – Bruce Johnston Jan 02 '17 at 01:59