From 0a36d6da26f15b451503b0966a970ba045a0c157 Mon Sep 17 00:00:00 2001 From: Adrien Grand Date: Wed, 8 Jan 2014 12:17:55 +0100 Subject: [PATCH] Fix compilation under javac 1.6. --- .../elasticsearch/search/highlight/HighlighterSearchTests.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/elasticsearch/search/highlight/HighlighterSearchTests.java b/src/test/java/org/elasticsearch/search/highlight/HighlighterSearchTests.java index 942461b9a27..0db7ad87836 100644 --- a/src/test/java/org/elasticsearch/search/highlight/HighlighterSearchTests.java +++ b/src/test/java/org/elasticsearch/search/highlight/HighlighterSearchTests.java @@ -38,6 +38,7 @@ import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.search.highlight.HighlightBuilder.Field; import org.elasticsearch.test.ElasticsearchIntegrationTest; import org.hamcrest.Matcher; +import org.hamcrest.Matchers; import org.junit.Test; import java.io.IOException; @@ -2554,7 +2555,7 @@ public class HighlighterSearchTests extends ElasticsearchIntegrationTest { private

void phraseBoostTestCaseForClauses(String highlighterType, float boost, QueryBuilder terms, P phrase) { - Matcher highlightedMatcher = either(containsString("highlight words together")).or( + Matcher highlightedMatcher = Matchers.either(containsString("highlight words together")).or( containsString("highlight words together")); SearchRequestBuilder search = client().prepareSearch("test").setHighlighterRequireFieldMatch(true) .setHighlighterOrder("score").setHighlighterType(highlighterType)