Skip to content

SOLR-18332: Replace CloudSolrStream 'qt' usage - #4816

Merged
gerlowskija merged 7 commits into
apache:mainfrom
gerlowskija:cloud_solr_stream_qt_replacement
Aug 28, 2026
Merged

SOLR-18332: Replace CloudSolrStream 'qt' usage#4816
gerlowskija merged 7 commits into
apache:mainfrom
gerlowskija:cloud_solr_stream_qt_replacement

Conversation

@gerlowskija

Copy link
Copy Markdown
Contributor

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

Description

The 'qt' parameter and several related methods in SolrJ are deprecated.
This deprecation may not stick, but it's still worth minimizing use of this
feature as much as possible.

One place where 'qt' is still used frequently is in CloudSolrStream (and
related "expression" strings.

Solution

This PR addresses this similarly to the recent #4747 : by giving
CloudSolrStream and friends a constructor parameter that allows users
to specify the path at creation-time instead of relying on "qt".

CloudSolrStream is also an "Expressible", meaning that it maps to our
user-facing streaming-expression syntax. So this PR also adds
"path" as a parameter name in that syntax.

(I used Claude to help me investigate and write some of this PR; especially
the test updates.)

Tests

Various streaming tests have been updated to use the new "path"
streaming expression parameter name. A test-case has been added with
the explicit purpose of testing the non-preferred "qt" syntax that was
supported prior to this PR. Existing tests continue to pass.

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

@gerlowskija gerlowskija changed the title Cloud solr stream qt replacement SOLR-18332: Replace CloudSolrStream 'qt' usage Aug 26, 2026
@gerlowskija
gerlowskija marked this pull request as ready for review August 26, 2026 10:49
@epugh

epugh commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating ref guide

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think I fixed this in main already, it came in three days ago when I added new tests...

@dsmiley dsmiley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice

SolrResponse rsp;
try {
rsp = new QueryRequest(q).process(ccc.getSolrCloudManager().getSolrClient());
rsp = new QueryRequest("/stream", q).process(ccc.getSolrCloudManager().getSolrClient());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

not a QueryRequest appropriate request/usage

@gerlowskija
gerlowskija merged commit 96cf082 into apache:main Aug 28, 2026
4 of 6 checks passed
@gerlowskija
gerlowskija deleted the cloud_solr_stream_qt_replacement branch August 28, 2026 11:23
@gerlowskija gerlowskija added this to the 10.x milestone Aug 28, 2026
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.

3 participants