benwtrent commented on code in PR #15271:
URL: https://github.com/apache/lucene/pull/15271#discussion_r2395670299
##########
lucene/core/src/java/org/apache/lucene/codecs/lucene104/Lucene104ScalarQuantizedVectorsFormat.java:
##########
@@ -186,16 +203,35 @@ public Lucene104ScalarQuantizedVectorsFormat() {
this(ScalarEncoding.UNSIGNED_BYTE);
}
- /** Creates a new instance with the chosen encoding. */
+ /** Creates a new instance with the chosen symmetric quantization encoding.
*/
public Lucene104ScalarQuantizedVectorsFormat(ScalarEncoding encoding) {
+ this(encoding, encoding);
+ }
+
+ /** Creates a new instance with the chosen asymmetric quantization encoding.
*/
+ public Lucene104ScalarQuantizedVectorsFormat(
+ ScalarEncoding encoding, ScalarEncoding queryEncoding) {
super(NAME);
this.encoding = encoding;
+ this.queryEncoding = queryEncoding;
+ // until we have optimized scorers for various other asymmetric encodings,
maybe we only allow 1
Review Comment:
> Should ScalarEncoding enumerate both the query and index vector coding? It
would turn this error into a compile-time error.
I switched to this, it cleaned some stuff up. Did slightly complicate as now
we must specify "doc" vs. "query" in various things in the format, but this
isn't nearly as bad as I thought it would be.
--
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]