Azure web app's blob storage updated with new files. How do I refresh the CognitiveSearch index used in the app to reflect the new data?

Sean Swanson 5 Reputation points
2023-08-10T20:29:14.0033333+00:00

Hello,

I recently deployed a web app through Azure's AIStudio interface. After initially adding files via the UI to set up a custom training index, I added more files to that blob through the Azure Dashboard.

Now, I need guidance on updating the index that the web app was deployed with so that it's aware of the new files.

Alternatively, if I were to create a new index, how can I integrate that into my web app without having to create a new one?

Best regards,
Sean

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.
1,274 questions
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,913 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,350 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,128 questions
{count} vote

2 answers

Sort by: Most helpful
  1. Thiago Custodio 196 Reputation points
    2023-08-11T14:52:04.4333333+00:00

    You can either write an Azure Function which will get triggered whenever a new blob is created/updated or try to use default Azure Cognitive Indexer.

    The idea is to extract the content of the blob and push to your existing index. After that, changes will be available and your dashboard will display the latest changes.

    You can find more information about the Azure Cognitive Indexer in here:

    https://learn.microsoft.com/en-us/azure/search/search-indexer-overview

    Azure functions with Blob Trigger in here:

    https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob-trigger?tabs=python-v2%2Cin-process&pivots=programming-language-csharp#example

    and here's a sample of how to add data to an existing Azure Cognitive Search index:

    https://learn.microsoft.com/en-us/azure/search/search-indexer-tutorial#in-programcs

    1 person found this answer helpful.

  2. ajkuma 27,941 Reputation points Microsoft Employee
    2023-08-14T18:25:49.7133333+00:00

    @Sean Swanson, Following-up on this, you need to create a Index data from Azure Blob Storage with a schedule and point to the OpenAI existing created index. By following the steps outlined in the doc, you may leverage the indexers (add new) from the Portal or use API or SDK to accomplish this task.

    1 person found this answer helpful.
    0 comments No comments

Your answer

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