SolrQueryBuilder { public final <U extends SchemaField<T>> SolrQueryBuilder<T> setFieldList(Collection<U> fields) { for (SchemaField field : fields) { flBuilder.add(field.name()); } return this; }  SolrQueryBuilder<T> addFilterFieldByTerm(U field, Collection<String> values); SolrQueryBuilder<T> addFilterFieldByTerm(U field, String value); SolrQueryBuilder<T> addFilterFieldByRangeMin(U field, double min); SolrQueryBuilder<T> addFilterFieldByRangeMax(U field, double max); SolrQueryBuilder<T> addFilterFieldByRangeMinMax(U field,
                                                                                      double min,
                                                                                      double max); SolrQueryBuilder<T> addQueryFieldByTerm(U field, Collection<String> values); SolrQueryBuilder<T> addQueryFieldByTerm(U field, String value); final SolrQueryBuilder<T> setFieldList(Collection<U> fields); final SolrQueryBuilder<T> setFieldList(U field); final SolrQueryBuilder<T> setFacetField(U field); final SolrQueryBuilder<T> setSubFacetList(Collection<U> fields); SolrQueryBuilder<T> sortBy(U field, SolrQuery.ORDER order); SolrQueryBuilder<T> setRows(int rows); SolrQuery build(); static final int SOLR_MAX_ROWS; static final int DEFAULT_ROWS; }
@Test void testSetFieldList() { assertThat( new SolrQueryBuilder<>().setFieldList(ImmutableSet.of(FIELD1, FIELD2)).build().getFields().split(",")) .containsExactlyInAnyOrder(FIELD1.name(), FIELD2.name()); }