Skip to content

Commit

Permalink
Revert back method overrides in MappedFieldType
Browse files Browse the repository at this point in the history
Signed-off-by: Rishabh Maurya <[email protected]>
  • Loading branch information
rishabhmaurya committed Dec 5, 2023
1 parent b23f938 commit 9eee5bc
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -354,36 +354,36 @@ public Query existsQuery(QueryShardContext context) {
}

public Query phraseQuery(TokenStream stream, int slop, boolean enablePositionIncrements) throws IOException {
return phraseQuery(stream, slop, enablePositionIncrements, null);
}

public Query phraseQuery(TokenStream stream, int slop, boolean enablePositionIncrements, QueryShardContext context) throws IOException {
throw new IllegalArgumentException(
"Can only use phrase queries on text fields - not on [" + name + "] which is of type [" + typeName() + "]"
);
}

public Query multiPhraseQuery(TokenStream stream, int slop, boolean enablePositionIncrements) throws IOException {
return multiPhraseQuery(stream, slop, enablePositionIncrements, null);
public Query phraseQuery(TokenStream stream, int slop, boolean enablePositionIncrements, QueryShardContext context) throws IOException {
return phraseQuery(stream, slop, enablePositionIncrements);
}

public Query multiPhraseQuery(TokenStream stream, int slop, boolean enablePositionIncrements, QueryShardContext context)
throws IOException {
public Query multiPhraseQuery(TokenStream stream, int slop, boolean enablePositionIncrements) throws IOException {
throw new IllegalArgumentException(
"Can only use phrase queries on text fields - not on [" + name + "] which is of type [" + typeName() + "]"
);
}

public Query phrasePrefixQuery(TokenStream stream, int slop, int maxExpansions) throws IOException {
return phrasePrefixQuery(stream, slop, maxExpansions, null);
public Query multiPhraseQuery(TokenStream stream, int slop, boolean enablePositionIncrements, QueryShardContext context)
throws IOException {
return multiPhraseQuery(stream, slop, enablePositionIncrements);
}

public Query phrasePrefixQuery(TokenStream stream, int slop, int maxExpansions, QueryShardContext context) throws IOException {
public Query phrasePrefixQuery(TokenStream stream, int slop, int maxExpansions) throws IOException {
throw new IllegalArgumentException(
"Can only use phrase prefix queries on text fields - not on [" + name + "] which is of type [" + typeName() + "]"
);
}

public Query phrasePrefixQuery(TokenStream stream, int slop, int maxExpansions, QueryShardContext context) throws IOException {
return phrasePrefixQuery(stream, slop, maxExpansions);
}

public SpanQuery spanPrefixQuery(String value, SpanMultiTermQueryWrapper.SpanRewriteMethod method, QueryShardContext context) {
throw new IllegalArgumentException(
"Can only use span prefix queries on text fields - not on [" + name + "] which is of type [" + typeName() + "]"
Expand Down

0 comments on commit 9eee5bc

Please sign in to comment.