CacheKeyFilter.Wrapper wrapper = (CacheKeyFilter.Wrapper) filter;
assertThat(new BytesRef(wrapper.cacheKey().bytes()).utf8ToString(), equalTo("key"));
assertThat(wrapper.wrappedFilter(), instanceOf(RegexpFilter.class));
RegexpFilter regexpFilter = (RegexpFilter) wrapper.wrappedFilter();
assertThat(regexpFilter.field(), equalTo("name.first"));
assertThat(regexpFilter.regexp(), equalTo("s.*y"));
assertThat(regexpFilter.flags(), equalTo(INTERSECTION.value() | COMPLEMENT.value() | EMPTY.value()));
}
@Test
public void testRegexpBoostQuery() throws IOException {