Configuration of the max window size in Elasticsearch
See HSEARCH-3554: https://github.com/hibernate/hibernate-search/pull/1942/
We need to know the maximum window size in order to set a default limit in search queries. Currently we use 10000, the default in Elasticsearch, but this is something that can be customized. It would be nice if we could allow the user to set it through configuration properties.
Also, when the maximum window size is not set, the user may not be aware that it even exists. So we should probably issue a warning when a query relies on the maximum window size, and we notice there are more results. See https://github.com/hibernate/hibernate-search/pull/1942#issuecomment-479493485
See also the max_result_window setting at https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html
Make sure to retrieve the configuration property when the backend starts, i.e. in org.hibernate.search.backend.elasticsearch.impl.ElasticsearchLinkImpl#onStart.