arup-chauhan opened a new pull request, #15708:
URL: https://github.com/apache/lucene/pull/15708

   This PR introduces an optional query bit-size hint for 
`KnnSearchStrategy.Hnsw` as a first incremental step toward #15614.
   
     I intentionally limited the scope to search-strategy API plumbing and 
tests to keep risk low.
     Default behavior remains unchanged: the new hint is metadata-only in this 
PR and does not alter scoring yet.
   
     ## Changes
   
     - Added optional `queryBitSizeHint` to `KnnSearchStrategy.Hnsw`.
     - Kept backward compatibility by preserving the existing constructor and 
adding an overload:
       - `Hnsw(int filteredSearchThreshold)`
       - `Hnsw(int filteredSearchThreshold, Integer queryBitSizeHint)`
     - Added validation for the hint (`> 0` when non-null).
     - Added getter: `queryBitSizeHint()`.
     - Updated `equals` / `hashCode` for `Hnsw` to include the new hint.
     - Updated `KnnSearchStrategy.Patience` constructors to support hint 
passthrough.
     - Updated `HnswQueueSaturationCollector#getSearchStrategy()` to preserve 
and forward the hint when wrapping strategies.
     - Added new tests in `TestKnnSearchStrategy` to cover:
       - default/no-hint behavior
       - constructor with hint
       - hint validation
       - `equals`/`hashCode` behavior
       - hint preservation across seeded/patience wrapping paths
   
     ## Validation
   
     - `./gradlew -p lucene/core compileJava`
     - `./gradlew -p lucene/core test --tests TestKnnSearchStrategy`
     - `./gradlew -p lucene/core check`
   
     Only tweak I made: removed “(after formatting fix)” since it passes now.


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