Skip to content

Commit

Permalink
Move helper to bottom
Browse files Browse the repository at this point in the history
Signed-off-by: John Mazanec <[email protected]>
  • Loading branch information
jmazanec15 committed Jul 13, 2024
1 parent 268c90e commit 33b7438
Showing 1 changed file with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,19 +122,6 @@ public static KNNQueryBuilder fromXContent(XContentParser parser) throws IOExcep
return builder.build();
}

private static void throwParsingExceptionOnMultipleFields(
XContentLocation contentLocation,
String processedFieldName,
String currentFieldName
) {
if (processedFieldName != null) {
throw new ParsingException(
contentLocation,
"[" + NAME + "] query doesn't support multiple fields, found [" + processedFieldName + "] and [" + currentFieldName + "]"
);
}
}

/**
* Convert KNNQueryBuilder to XContent
*
Expand Down Expand Up @@ -202,4 +189,17 @@ private static float[] objectsToFloats(List<Object> objs) {
}
return vec;
}

private static void throwParsingExceptionOnMultipleFields(
XContentLocation contentLocation,
String processedFieldName,
String currentFieldName
) {
if (processedFieldName != null) {
throw new ParsingException(
contentLocation,
"[" + NAME + "] query doesn't support multiple fields, found [" + processedFieldName + "] and [" + currentFieldName + "]"
);
}
}
}

0 comments on commit 33b7438

Please sign in to comment.