From 3029b5b90b2c316906786b2a9e6f0cee97280338 Mon Sep 17 00:00:00 2001 From: MaxKsyunz Date: Fri, 22 Jul 2022 23:25:41 -0700 Subject: [PATCH] Fix checkstyle Signed-off-by: MaxKsyunz --- .../script/filter/lucene/relevance/MultiFieldQuery.java | 2 +- .../script/filter/lucene/relevance/MultiMatchQuery.java | 2 +- .../script/filter/lucene/relevance/RelevanceQuery.java | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/relevance/MultiFieldQuery.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/relevance/MultiFieldQuery.java index 2746de1175..a736414628 100644 --- a/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/relevance/MultiFieldQuery.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/relevance/MultiFieldQuery.java @@ -33,5 +33,5 @@ public T createQueryBuilder(NamedArgumentExpression fields, NamedArgumentExpress return createBuilder(fieldsAndWeights, query); } - abstract protected T createBuilder(ImmutableMap fields, String query); + protected abstract T createBuilder(ImmutableMap fields, String query); } diff --git a/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/relevance/MultiMatchQuery.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/relevance/MultiMatchQuery.java index 7e119b36da..bbf3077d29 100644 --- a/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/relevance/MultiMatchQuery.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/relevance/MultiMatchQuery.java @@ -40,7 +40,7 @@ public MultiMatchQuery() { } @Override - protected MultiMatchQueryBuilder createBuilder(ImmutableMap fields, String query) { + protected MultiMatchQueryBuilder createBuilder(ImmutableMap fields, String query) { return QueryBuilders.multiMatchQuery(query).fields(fields); } } diff --git a/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/relevance/RelevanceQuery.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/relevance/RelevanceQuery.java index fe78863951..8acaaa7f74 100644 --- a/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/relevance/RelevanceQuery.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/relevance/RelevanceQuery.java @@ -65,14 +65,16 @@ public QueryBuilder build(FunctionExpression func) { return queryBuilder; } - abstract protected T createQueryBuilder(NamedArgumentExpression field, NamedArgumentExpression query); + protected abstract T createQueryBuilder(NamedArgumentExpression field, + NamedArgumentExpression query); + /** * Convenience interface for a function that updates a QueryBuilder * based on ExprValue. + * * @param Concrete query builder */ - public interface QueryBuilderStep extends + protected interface QueryBuilderStep extends BiFunction { - } }