Java - build query due to the many fields

Could you provide a full recreation script as described in About the Elasticsearch category. It will help to better understand what you want to do exactly. Please, try to keep the example as simple as possible (like one or two fields should be enough).