Map<String, String> params = new HashMap<>();
if (searchRequest.getQuery() != null) {
params.put("q", searchRequest.getQuery());
}
if (searchRequest.getFields() != null) {
<BUG>if (FIELDS == null) {
setElasticsearchBehavior();
}</BUG>
params.put(FIELDS, String.join(",", (CharSequence[]) searchRequest.getFields()));
}

Map<String, String> params = new HashMap<>();
if (searchRequest.getQuery() != null) {
params.put("q", searchRequest.getQuery());
}
if (searchRequest.getFields() != null) {
params.put(FIELDS, String.join(",", (CharSequence[]) searchRequest.getFields()));
}
