cpoerschke commented on code in PR #2809: URL: https://github.com/apache/solr/pull/2809#discussion_r1825636244
########## solr/core/src/java/org/apache/solr/schema/DenseVectorField.java: ########## @@ -358,6 +358,24 @@ public ValueSource getValueSource(SchemaField field, QParser parser) { SolrException.ErrorCode.BAD_REQUEST, "Vector encoding not supported for function queries."); } + public Query getKnnVectorQuery( + String fieldName, byte[] vectorToSearch, int topK, Query filterQuery) { + + DenseVectorParser vectorBuilder = + getVectorBuilder(vectorToSearch, DenseVectorParser.BuilderPhase.QUERY); + + return new KnnByteVectorQuery(fieldName, vectorToSearch, topK, filterQuery); + } + + public Query getKnnVectorQuery( + String fieldName, float[] vectorToSearch, int topK, Query filterQuery) { + + DenseVectorParser vectorBuilder = + getVectorBuilder(vectorToSearch, DenseVectorParser.BuilderPhase.QUERY); + Review Comment: ```suggestion ``` -- 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org