Realtime Index Updates in Azure AI Search

Bernard Brown 100 Reputation points
2024-03-04T13:47:23.18+00:00

Hi,

We would like to use Azure AI Search in our project, but we're seeing that there is a limitation that may prevent us from using it.

In our application the user can add/update items. After the addition/update, they can perform a search on the items. When they do perform the search, the changes they've made are not picked up in the search. We can see the additions/updates in the database, but not in the index.

After doing some research, I found that lowest time I can set the schedule to for the indexer is 5 minutes. I also have track changes set on my datasources, but that doesn't appear to have any effect that would produce the expected result.

Is there something that I can do to get these additions and updates picked up in real-time in the index i.e. as soon as they are added to the database?

Thanks

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
{count} votes

Answer accepted by question author
  1. Grmacjon-MSFT 19,491 Reputation points Moderator
    2024-03-07T04:23:35.9433333+00:00

    Hi @Bernard Brown , since real-time data synchronization isn’t possible with an indexer you may want to explore a ‘push model’ that simultaneously updates data in both Azure AI Search and your external data source. Basically, you can use the Azure Search REST API or SDK to directly push document changes (adds, updates, deletes) from your application to the search index. This method offers the closest to real-time updates that you're looking to accomplish for your use case.

    Here are two helpful Azure docs that can help you get started:

    Best,

    Grace

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Suwarna S Kale 4,506 Reputation points
    2024-03-10T00:46:50.2866667+00:00

    An indexer in Azure AI Search is a crawler that extracts textual data from cloud data sources and populates a search index using field-to-field mappings between source data and the search index. By default, indexers run on a recurring data refresh schedule, which can be as frequent as every five minutes.

    While true real-time indexing isn’t possible with an indexer, you can achieve near real-time updates using the following strategies:

    • Push Model: Instead of relying solely on the indexer’s pull model, consider pushing updated rows directly to the index when changes occur in your database.
    • Custom Script or Code: Implement a custom script or code that detects changes in your database and triggers an update to the search index immediately.
    • Azure Functions or Logic Apps: Use Azure Functions or Logic Apps to monitor changes in your data source and invoke the indexer when updates occur.

    If your search service supports availability zones, replicas are automatically provisioned in different physical data centers for extra resiliency. Consider adding multiple replicas to handle higher indexing and query workloads. Availability zones ensure that even if one zone experiences an outage, your search service remains available.

    While true real-time indexing isn’t achievable with indexers alone, near real-time solutions can significantly reduce the delay between data changes and index updates. Explore the options mentioned above to tailor your approach based on your project’s requirements! https://learn.microsoft.com/en-us/azure/search/search-reliability

    Feel free to post if you have any further questions. If this answer helped, please accept the answer :-)

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.