eliaporciani opened a new pull request, #1435:
URL: https://github.com/apache/solr/pull/1435

   https://issues.apache.org/jira/browse/SOLR-16674
   
   # Description
   
   Lucene has introduced the BYTE encoding for dense vector fields.
   The values have to be in the range (-128, +127). 
   
   # Solution
   
   Add a parameter to DenseVectorField for choosing the encoding.
   vectorEncoding:
   * FLOAT32 (default)
   * BYTE
   
   If the byte encoding is chosen, a float array is transformed into a byte 
array (rounding the values and checking that the values are within the 
boundaries). This byte array is used for both the index and stored fields.
   
   The knnQParser is not influenced by the new encoding.
   
   # Tests
   
   Added tests in DenseVectorFieldTest and KnnQParserTest:
   * Test indexing and queries with BYTE encoding.
   * Test correct exceptions are raised in case of errors
   * Test stored fields are stored in the correct format
   * Test atomic updates work with BYTE encoding
   
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [x] I have reviewed the guidelines for [How to 
Contribute](https://wiki.apache.org/solr/HowToContribute) and my code conforms 
to the standards described there to the best of my ability.
   - [x] I have created a Jira issue and added the issue ID to my pull request 
title.
   - [x] I have given Solr maintainers 
[access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork)
 to contribute to my PR branch. (optional but recommended)
   - [x] I have developed this patch against the `main` branch.
   - [x] I have run `./gradlew check`.
   - [x] I have added tests for my changes.
   - [x] I have added documentation for the [Reference 
Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
   


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