Skip to content

Commit

Permalink
Merge pull request #145 from ESGF/facet_check
Browse files Browse the repository at this point in the history
Check if the facet list is empty after confirming it is not null
  • Loading branch information
nathanlcarlson authored Aug 19, 2020
2 parents bb3b2b1 + e0088c2 commit 8649f77
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public String buildSelectQueryString() throws MalformedURLException, Unsupported
if (qs.isEmpty()) qs.add(URLEncoder.encode("*:*", "UTF-8"));

// &facet.field=...&facet.field=...
if (this.facets!=null) {
if (this.facets!=null && this.facets.size()!=0) {
ff.append("&facet=true");
for (final String facet : this.facets) {
ff.append("&facet.field=").append( URLEncoder.encode(facet, UTF8 ));
Expand Down

0 comments on commit 8649f77

Please sign in to comment.