Add Document To Azure Search

David Rector asked on May 13, 2019 21:28

I have a handful of pages I'm indexing for azure search. I want to add custom documents that I create (from data that comes from a third party) to the index. How do I do that?

Recent Answers


Mike Wills answered on May 14, 2019 01:31

Hi David,

Are these custom documents entirely custom, such that they have no representation in Kentico at all? If so, do they need to be in the same index as the Kentico pages? If not, you could create a separate index with these documents using the Azure Search .NET SDK.

If these pages are represented in Kentico, but most the data comes from the third party, you could use the CreatingDocument event to get the data from the third party and add it to the Azure Search document.

Or, if these documents are not represented in Kentico, but you need them to be in the same index as Kentico pages, you could use the CreatingOrUpdatingIndex event as an opportunity to add these third-party documents. In that case, remember that this event can be fired multiple times while creating an index.

See: CreatingOrUpdatingIndex

Mike

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.