alessandrobenedetti commented on code in PR #4698:
URL: https://github.com/apache/solr/pull/4698#discussion_r3922899690
##########
solr/core/src/java/org/apache/solr/schema/ScalarQuantizedDenseVectorField.java:
##########
@@ -123,18 +124,28 @@ public void init(IndexSchema schema, Map<String, String>
args) {
super.init(schema, args);
- if (FLAT_ALGORITHM.equals(getKnnAlgorithm())) {
+ if (VectorEncoding.BYTE.equals(getVectorEncoding())
+ && FLAT_ALGORITHM.equals(getKnnAlgorithm())) {
throw new SolrException(
SolrException.ErrorCode.BAD_REQUEST,
- "knnAlgorithm 'flat' is not supported for
ScalarQuantizedDenseVectorField");
+ "vectorEncoding 'BYTE' is not supported for
ScalarQuantizedDenseVectorField"
+ + " with knnAlgorithm 'flat'");
}
}
+ // Unlike DenseVectorField, the scalar-quantized flat format supports KNN
queries.
+ @Override
Review Comment:
It was more of a soft preference and thinking out loud, it's ok to have the
'void' check, but what about my comment above to make the check also covering
the 'BYTE' encoding?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]