Is there way to customize a pageprovider to use a pre-built elasticsearch query?

In our setup there is Nuxeo with ElasticSearch. We have already added some custom pageproviders which are configured to use ElasticSearch and they work fine. With those we can also save search definitions (Saved Searches) and get results based on the saved search.

The issue is that in some scenarios we need to execute a very specific ElasticSearch query to find our documents. For these queries we currently use Nuxeo's Elasticsearch Passthrough API.

This is not optimal in our setup, and we would prefer using a pageprovider for those queries aswell. One thing we are investigating is that is there a way to create a page provider so that we could store a pre-built elasticsearch query (as a string) inside it? Then we could easily store those queries inside Nuxeo and later execute them like other saved searches. Do you know if there is some easy way to achieve this? If it currently cannot be done directly with existing implementations or extensions, we will also consider coding a custom pageprovider implementation for this. For this we would probably need some tips. (e.g. which class to extend?)

0 votes

0 answers

195 views

ANSWER