How to pass SP in Azure Search Data Source

333 Views Asked by At

I have 2 documents in a partition of document db. How can I combine these 2 documents and prepare one document which I can send as a Data Source for Azure Search Service.

I found a way by stored procedure we can combine 2 documents. Now I am facing a difficult scenario. Can we use a stored procedure in the query part of Azure search Data Source?

1

There are 1 best solutions below

1
On

I am looking for a solution to read all the documents by partition key.. is it possible by stored procedure.

Of course,it is possible to call the stored procedure by partition key. In fact, the partition key is necessary. You could refer to my previous case for more details:Azure Cosmos DB asking for partition key for store procedure.

Based on my researching, stored procedure can't be invoked in azure search data source.You could only configure sql database,cosmos db, blob storage ,table storage etc. So, I suggest you using Azure Function Http Trigger to call your stored procedure with sdk then save the combined document into new collection or save it as json file into blob storage corresponding to your Azure Search index.