QueryUtils { public static String buildConjunctiveClause(String fieldName, Collection<String> values){ Joiner conjunctiveJoiner = Joiner.on(" OR ").skipNulls(); return fieldName + ":(" + conjunctiveJoiner.join(values) + ")"; }  static String conjoinSolrQueries(String q1, String q2); static String buildConjunctiveClause(String fieldName,
                                              Collection<String> values); static String buildQuery(Collection<String> sourceTypes,
                                  Collection<String> types);  }
@Test public void testSolrClause(){ List<String> extractorRunIds = Lists.newArrayList("x##0", "x##1", "x##2"); String solrClause = QueryUtils.buildConjunctiveClause("extractorRunIds", extractorRunIds); String ans = "extractorRunIds:(x##0 OR x##1 OR x##2)"; assertEquals(ans, solrClause); }