chaitali-rajhans opened a new pull request, #3830:
URL: https://github.com/apache/solr/pull/3830

   https://issues.apache.org/jira/browse/SOLR-17927
   
   This PR adds support for legacy HNSW parameters (hnswMaxConnections and 
hnswBeamWidth) in Solr while transitioning to the new parameter names (hnswM 
and hnswEfConstruction) starting from Solr 10.
   Added WARN-level log messages when legacy parameters are used in a 
DenseVectorField definition.
   
   Since we're renaming hnswMaxConnections and hnswBeamWidth to getHnswM and 
getHnswEfConstruction respectively from Solr 10 If user is using the deprecated 
legacy field name in schema, A WARN message will be shown to user. 
   
   Example schema fieldType Defination:
   <fieldType name="knn_vector" class="solr.DenseVectorField" 
hnswMaxConnections="10" knnAlgorithm="hnsw" vectorDimension="4" 
similarityFunction="cosine" hnswBeamWidth="40"/>
   
   Logs:
   WARN: Deprecated parameter 'hnswMaxConnections' detected in fieldType '{}'. 
Use 'hnswM' instead.
   WARN: Deprecated parameter 'hnswBeamWidth' detected in fieldType '{}'. Use 
'hnswEfConstruction' instead.
   
   This ensures a smooth transition for users upgrading to Solr 10 by:
   - Preserving compatibility with existing schemas using the old parameter 
names.
   - Guiding users to adopt the new parameter names via clear WARN messages.
   
   #Test
   - Defined two types of DenseVectorField in a collection schema: one using 
legacy parameters and one using new parameters.
   - Indexed documents using both legacy and new field definitions.
   - Validated logs for deprecated parameters and confirmed there were no 
indexing issues.
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [ X ] I have reviewed the guidelines for [How to 
Contribute](https://github.com/apache/solr/blob/main/CONTRIBUTING.md) and my 
code conforms to the standards described there to the best of my ability.
   - [ X ] I have updated existing Jira issue and added the issue ID to my pull 
request title.
   - [ ] 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, not available for 
branches on forks living under an organisation)
   - [ X ] I have developed this patch against the `main` branch.
   - [ X ] I have run `./gradlew check`.
   - [ X ] I have added tests for my changes.
   - [ ] I have added documentation for the [Reference 
Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
   - [ ] I have added a [changelog 
entry](https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc) for my 
change
   


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