Search { public Search validate(Schema schema) { filter.forEach(condition -> condition.query(schema)); query.forEach(condition -> condition.query(schema)); sort.forEach(field -> field.sortField(schema)); return this; } Search(List<Condition> filter,
                  List<Condition> query,
                  List<SortField> sort,
                  IndexPagingState paging,
                  Boolean refresh); boolean requiresPostProcessing(); boolean requiresFullScan(); boolean usesRelevance(); boolean usesSorting(); boolean isEmpty(); Query query(Schema schema, Query range); Query postProcessingQuery(Schema schema); boolean refresh(); List<org.apache.lucene.search.SortField> sortFields(Schema schema); IndexPagingState paging(); Set<String> postProcessingFields(); Search validate(Schema schema); @Override String toString(); final List<Condition> filter; final List<Condition> query; }
@Test public void testValidate() { Schema schema = schema().mapper("f", stringMapper()).build(); search().filter(MATCH) .query(MATCH) .sort(FIELD) .build() .validate(schema); }