ElasticSearch Indexing Confluence pages
Elasticsearch deprecated river.
Elasticsearch has a solution built over it called workplace search which could connect to confluence for ingesting data.
Ideally, you might need to do it by the Confluent API via a script to Elasticsearch. You might also need to use the "ingest-attachment" plugin if you need to parse PDF content.