linslee75 opened a new pull request, #4700: URL: https://github.com/apache/solr/pull/4700
https://issues.apache.org/jira/browse/SOLR-18329 # Description DenseVectorField currently rejects existence queries with BAD_REQUEST. Lucene has supported vector-field existence checks since 9.1 via FieldExistsQuery, so Solr should allow the usual existence syntax on dense vector fields. Discuss: - https://lists.apache.org/thread/5rgllrwmxr99k3wwrssbwy0p8nlh3rmx - https://lists.apache.org/thread/x0x61yh07zzqo73cbct2hdzkybrlgr3m # Solution - Override DenseVectorField.getExistenceQuery() to return FieldExistsQuery - Treat unbounded ranges (`[* TO *]`) as existence queries - Keep rejecting bounded range queries - Document existence query support in the dense vector search ref guide - Add changelog entry AI coding assistants were used while preparing this change. # Tests - Updated DenseVectorFieldTest to verify: - `vector:*` - `-vector:*` - `vector:[* TO *]` - Confirmed bounded range queries still return BAD_REQUEST - Ran: - `./gradlew :solr:core:test --tests org.apache.solr.schema.DenseVectorFieldTest.query_existenceSearch_shouldMatchDocumentsWithVector --tests org.apache.solr.schema.DenseVectorFieldTest.query_rangeSearch_shouldThrowException` - `./gradlew :solr:core:check -x test` # Checklist Please review the following and check all that apply: - [x] I have reviewed the guidelines for [How to Contribute](https://solr.apache.org/guide/solr/latest/deployment-guide/how-to-contribute.html) and this [code review sheet](https://cwiki.apache.org/confluence/display/solr/Code+Review+Checklist) - [x] I have created a Jira issue and added the issue ID to this 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) - [x] I have developed this patch against the `main` branch - [ ] I have run `./gradlew check` - [x] I have added tests for my changes - [x] I have added documentation for the [Reference Guide](https://solr.apache.org/guide/solr/latest/deployment-guide/how-to-contribute.html#reference-guide) - [x] I have added a `changelog` entry -- 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]
