4747import static org .elasticsearch .test .hamcrest .ElasticsearchAssertions .assertAcked ;
4848import static org .elasticsearch .test .hamcrest .ElasticsearchAssertions .assertNoFailuresAndResponse ;
4949
50-
5150public class PatternedTextVsMatchOnlyTextTests extends ESIntegTestCase {
5251 private static final Logger logger = LogManager .getLogger (PatternedTextVsMatchOnlyTextTests .class );
5352
5453 @ Override
5554 protected Settings nodeSettings (int nodeOrdinal , Settings otherSettings ) {
5655 return Settings .builder ()
57- .put (super .nodeSettings (nodeOrdinal , otherSettings ))
58- .put (LicenseSettings .SELF_GENERATED_LICENSE_TYPE .getKey (), "trial" )
59- .build ();
56+ .put (super .nodeSettings (nodeOrdinal , otherSettings ))
57+ .put (LicenseSettings .SELF_GENERATED_LICENSE_TYPE .getKey (), "trial" )
58+ .build ();
6059 }
6160
6261 @ Override
@@ -68,23 +67,22 @@ protected Collection<Class<? extends Plugin>> nodePlugins() {
6867 private static final String MATCH_ONLY_TEXT_FIELD = "field_match_only_text" ;
6968 private static final String PATTERNED_TEXT_FIELD = "field_patterned_text" ;
7069 private static final String MAPPING = """
71- {
72- "properties": {
73- "@timestamp": { "type": "date" },
74- "field_match_only_text": { "type": "match_only_text" },
75- "field_patterned_text": { "type": "patterned_text" }
76- }
77- }
78- """ ;
70+ {
71+ "properties": {
72+ "@timestamp": { "type": "date" },
73+ "field_match_only_text": { "type": "match_only_text" },
74+ "field_patterned_text": { "type": "patterned_text" }
75+ }
76+ }
77+ """ ;
7978
8079 @ Before
8180 public void setup () {
8281 assumeTrue ("Only when patterned_text feature flag is enabled" , PatternedTextFieldMapper .PATTERNED_TEXT_MAPPER .isEnabled ());
8382 }
8483
8584 public void testQueries () throws IOException {
86- var createRequest = new CreateIndexRequest (INDEX )
87- .mapping (MAPPING );
85+ var createRequest = new CreateIndexRequest (INDEX ).mapping (MAPPING );
8886
8987 assertAcked (admin ().indices ().create (createRequest ));
9088
@@ -110,7 +108,12 @@ public void testQueries() throws IOException {
110108 }
111109 }
112110
113- private void assertQueryResults (List <QueryBuilder > patternedTextQueries , List <QueryBuilder > matchOnlyTextQueries , int numDocs , String queryType ) {
111+ private void assertQueryResults (
112+ List <QueryBuilder > patternedTextQueries ,
113+ List <QueryBuilder > matchOnlyTextQueries ,
114+ int numDocs ,
115+ String queryType
116+ ) {
114117 var numQueriesWithResults = new AtomicInteger (0 );
115118 var numQueriesTotal = new AtomicInteger (0 );
116119 for (int i = 0 ; i < patternedTextQueries .size (); ++i ) {
0 commit comments