none
How to sync search indexer when imported data source updates in Azure search? RRS feed

  • Question

  • Hi All,

    I want to implement azure search using document db in cosmosdb. If frequent changes occurs (new record is added or updated ) in cosmosdb, then Will Search indexer updates automatically? If automatically updates then what should be schedule program to update search indexer as frequent changes in cosmosdb may impacts the search indexer and may slow down the read/search operation as reindexing occurs frequently.

    Thanks and regards

    Stick


    • Edited by Asif.Stick Saturday, March 23, 2019 9:52 AM
    Saturday, March 23, 2019 9:35 AM

All replies

  • Hi Asif,

    Please refer this article. By default, all items in an Azure Cosmos container are automatically indexed, but you can turn off the automatic indexing.

    Hope this helps.

    Monday, March 25, 2019 5:34 AM
    Moderator
  • Hi Dashleen,

    Thanks for replying, Can you please suggest what would be best approach to sync search index from data source when ever new data is added in data source. Schedule program or programmatically to update  search index.

    Is there any impact if frequent changes in occur in data source and re-indexing the search index.

    Thanks

    Stick.

    Monday, March 25, 2019 6:03 PM
  • Hi Asif,

    This sounds like you want more of a real time update of content in Azure Search as data is added to Cosmos DB. You should consider leveraging the CosmosDB change feed for this purpose. You can link this to Azure Functions so that changes in Cosmos DB triggers a function which would take this feed of changes and applies it to Azure Search using the Azure Search PUSH api.  In general, the Azure Search indexer is not well suited for cases where you need to have more real time updates of content as it is a scheduled process.

    As to your specific question, if there are a lot of changes happening, the indexing into Azure Search will have an impact on the performance of the search queries since all of the resources are shared, however Azure Search can index large amounts of content pretty efficiently so it may not be that much of an issue.  For this reason, it is important to leverage a change tracking mechanism in Azure Search indexer, so that it only requests the data that has been changed, rather than getting all of the data.  The only real answer to perf questions like this is to test the workload to make sure the performance meets their needs and adjust the search service tier to meet the requirements. 

    Thursday, March 28, 2019 2:34 AM
    Moderator