Skip to content

SOLR-17715: Remove "qt" param path support in SolrJ#4397

Open
r4mercur wants to merge 11 commits intoapache:mainfrom
r4mercur:SOLR-17715-r4mercur
Open

SOLR-17715: Remove "qt" param path support in SolrJ#4397
r4mercur wants to merge 11 commits intoapache:mainfrom
r4mercur:SOLR-17715-r4mercur

Conversation

@r4mercur
Copy link
Copy Markdown

@r4mercur r4mercur commented May 4, 2026

https://issues.apache.org/jira/browse/SOLR-17715

Related pull requests before: #3441
For transparency i used claude code and github copilot for recommendations.

Description

Please provide a short description of the changes you're making with this pull request.

Solution

Proposed solution changes in QueryRequest.java file.

  1. getPath() override is removed
  2. QueryRequest() no-argument sets /select as default to super() method
  3. QueryRequests() with SolrParams and with Params and Method extract the qt in the constructor like recommended by dsmiley.
  4. 2 new constructors with path and params & one with path, params and method.
  5. two helper methods

Tests

Test cases which are added:
in class QueryRequestTest.java

  1. testQtWithSlashBecomesPath: qt=/custom no qt in params
  2. testQtWithoutSlashDefaultsToSelect: qt=custom no path = /select path
  3. testDefaultPathToSelect: no qt param = default path /select

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide
  • I have added a changelog entry for my change

@r4mercur r4mercur marked this pull request as draft May 4, 2026 18:50
@r4mercur r4mercur changed the title SOLR-17715: Remove qt parameter from the final parameters sent to server SOLR-17715: Remove "qt" param path support in SolrJ May 4, 2026
@dsmiley dsmiley marked this pull request as ready for review May 6, 2026 03:54
@dsmiley dsmiley self-requested a review May 6, 2026 03:54
Copy link
Copy Markdown
Contributor

@dsmiley dsmiley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; thanks!
I was gonna mention deprecating the other constructors but no... they are fine. After all, it's common to rely on a /select default.
I do think the no-arg constructor is weird/useless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants