rcpeken opened a new pull request, #16735:
URL: https://github.com/apache/lucene/pull/16735

   ### Description
   
   Part of #16725. Adds `Float16VectorSimilarityQuery`, the fp16 counterpart of
   `FloatVectorSimilarityQuery` / `ByteVectorSimilarityQuery`, so similarity
   threshold search works on fields indexed with `KnnFloat16VectorField`.
   
   The class mirrors `FloatVectorSimilarityQuery` on top of the fp16 APIs added 
in
   #16383 (`Float16VectorValues`, `LeafReader#getFloat16VectorValues`, the
   `short[]` `searchNearestVectors` overload, `VectorUtil#checkFiniteFloat16`).
   `toString` converts the first target component with `Float.float16ToFloat` so
   it prints a readable value rather than the raw bits.
   
   One deliberate difference: only the `Adaptive` variant is provided. In the
   float and byte queries, `Explicit` is `@Deprecated` and exists to stay
   equivalent to the Lucene 10.4 constructors; fp16 has no such legacy callers, 
so
   adding a new API that is deprecated from day one didn't seem useful. The 
class
   keeps the same `sealed` shape, so `Explicit` can be added later if reviewers
   prefer parity.
   
   ### Tests
   
   `TestFloat16VectorSimilarityQuery` plugs fp16 types into the shared
   `BaseVectorSimilarityQueryTestCase`. Ran it with `-Ptests.iters=20`, and with
   `-Dtests.monster=true` so `testApproximate` also exercises the HNSW path; all
   pass. `tidy` and `ecjLint` are clean.
   
   The CHANGES entry references the tracking issue; happy to switch it to this
   PR's number.


-- 
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]

Reply via email to