mikemccand commented on a change in pull request #2022:
URL: https://github.com/apache/lucene-solr/pull/2022#discussion_r519873455
##########
File path: lucene/core/src/java/org/apache/lucene/index/VectorValues.java
##########
@@ -74,6 +74,18 @@ public BytesRef binaryValue() throws IOException {
throw new UnsupportedOperationException();
}
+ /**
+ * Return the k nearest neighbor documents as determined by comparison of
their vector values
+ * for this field, to the given vector, by the field's search strategy. If
the search strategy is
+ * reversed, lower values indicate nearer vectors, otherwise higher scores
indicate nearer
+ * vectors. Unlike relevance scores, vector scores may be negative.
+ * @param target the vector-valued query
+ * @param k the number of docs to return
+ * @param fanout control the accuracy/speed tradeoff - larger values give
better recall at higher cost
Review comment:
> Don't Codecs get created automatically using no-args constructors and
service autodiscovery?
They do at read (search) time! But at write time, you can pass parameters
that alter how the Codec does its work, as long as the resulting index is then
readable at search time with no-args constructors.
I vaguely remember talking about having ways for Codec at read-time to also
take options, but I'm not sure that was ever fully designed / pushed ...
@s1monw may remember?
> But I'm reluctant to expose hnsw-specific hyperparameters in VectorField,
which we want to support other algorithms as well.
> Might be a good use case for generic IndexedField.attributes?
Yeah, maybe? I agree it is not obvious where the API should live and how it
then finds its way into the ANN data structure construction when writing each
segment.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]