1
votes

I have a use case for needing to index documents that live in different locations (Content Server, file share, SharePoint Online) so i can use this index for a search feature in a web app. The plan was to consider using elasticsearch because of it's fast search apis and fast indexing capabilities.

My question is what is a good way to access the SharePoint online search index for a particular site or document library? Idea is to have a job that would read the SP index and add it to the elasticsearch index.

1

1 Answers

0
votes

Since ElasticSearch will potentially create their own search index, you don't necessarily want/need to give it SharePoint's already created index - unless it makes sense for your purposes. The question really comes down to authentication: Will your ElasticSearch and/or end users be authenticated to SharePoint?

If so, then you can potentially let ElasticSearch connect directly to SharePoint's Rest API's, MS Graph API's, and/or SharePoint's Search API's. If not, then I would suggest building API 'wrappers' that use Azure AD app-only access to authenticate on behalf of ElasticSearch and end users. Then, you can 'serve up' the relevant API data from any of the previously mentioned API's, regardless of the consumers permissions.