What I know so far is, that you can search over multiple indices:
SearchRequest searchRequest = new SearchRequest(INDEX, INDEX2)
but I think that "index pattern names" are not supported, so you have to write a logic on your own. But you can give Index_2019_1 and Index_2019_2 the same type when creating them e.g. "Index_2019" and than you can try searching over index types. That could work, hopefully.
SearchRequest searchRequest = new SearchRequest(TYPE);
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.