SearchBuilders { public static WildcardConditionBuilder wildcard(String field, String value) { return new WildcardConditionBuilder(field, value); } private  SearchBuilders(); static SearchBuilder search(); static SearchBuilder filter(ConditionBuilder<?, ?>... filters); static SearchBuilder query(ConditionBuilder<?, ?>... queries); static SearchBuilder sort(SortFieldBuilder... sortFields); static SearchBuilder refresh(boolean refresh); static BooleanConditionBuilder bool(); static AllConditionBuilder all(); static FuzzyConditionBuilder fuzzy(String field, String value); static LuceneConditionBuilder lucene(String query); static MatchConditionBuilder match(String field, Object value); static ContainsConditionBuilder contains(String field, Object... values); static NoneConditionBuilder none(); static PhraseConditionBuilder phrase(String field, String value); static PrefixConditionBuilder prefix(String field, String value); static RangeConditionBuilder range(String field); static RegexpConditionBuilder regexp(String field, String value); static WildcardConditionBuilder wildcard(String field, String value); static GeoBBoxConditionBuilder geoBBox(String field,
                                                  double minLongitude,
                                                  double maxLongitude,
                                                  double minLatitude,
                                                  double maxLatitude); static GeoDistanceConditionBuilder geoDistance(String field,
                                                          double longitude,
                                                          double latitude,
                                                          String maxDistance); static GeoShapeConditionBuilder geoShape(String field, GeoShape shape); static GeoShapeConditionBuilder geoShape(String field, String shape); static DateRangeConditionBuilder dateRange(String field); static SimpleSortFieldBuilder field(String field); static GeoDistanceSortFieldBuilder geoDistance(String mapper, double latitude, double longitude); static BitemporalConditionBuilder bitemporal(String field);  }
@Test public void testWildcard() throws IOException { WildcardConditionBuilder builder = wildcard("field", "value"); assertNotNull("Condition builder is not built", builder); WildcardCondition condition = builder.build(); assertEquals("Condition field is not set", "field", condition.field); assertEquals("Condition value is not set", "value", condition.value); }