Skip to content

SOLR-18332: More 'qt' removal, rd 4 - #4731

Open
gerlowskija wants to merge 7 commits into
apache:mainfrom
gerlowskija:qt-removal-rd-4
Open

SOLR-18332: More 'qt' removal, rd 4#4731
gerlowskija wants to merge 7 commits into
apache:mainfrom
gerlowskija:qt-removal-rd-4

Conversation

@gerlowskija

@gerlowskija gerlowskija commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

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.

Many tests rely on it unnecessarily; this PR is one in a number of batches
slowly removing these usages. This batch in particular is focused on
removing QT usage in solr-core tests, particularly those for the "suggest"
and "spellcheck" features along with a number of lingering '/get' tests and
usages.

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.

Many tests rely on it unnecessarily; this PR is one in a number of batches
slowly removing these usages. This one focuses on solr-core tests that
dispatch through the req()/assertQ/assertJQ/assertQEx helpers; passing the
handler explicitly instead of embedding it as a 'qt' request param.
Replaces a number of 'qt' usages with the new reqWithPath helper
function, this time focusing mainly on suggest and spellcheck related
tests in solr-core.

@epugh epugh 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.

LGTM. Less "oh wow, that is so nice to read: then the earlier rounds, but I guess to be expected!

Extends the reqWithPath conversion to the real-time-get, recovery, and
versions test files, replacing req("qt", "/get", ...) with
reqWithPath("/get", ...) so these tests no longer rely on the
deprecated qt parameter to select the handler.
Continues the reqWithPath conversion into the update-processor tests
(AtomicUpdatesTest, NestedAtomicUpdateTest, TestDocBasedVersionConstraints,
TestInPlaceUpdatesStandalone, TestUpdate), the /get-based schema tests
(BooleanFieldTest, TestPointFields, TestPseudoReturnFields), and a mix of
other req()+assertQ call sites (AlternateDirectoryTest, RequestHandlersTest,
SegmentsInfoRequestHandlerTest, LukeRequestHandlerTest, MinimalSchemaTest,
DisMaxRequestHandlerTest, PhrasesIdentificationComponentTest,
ResponseLogComponentTest) that relied on the deprecated qt parameter to
select a handler.
@gerlowskija

Copy link
Copy Markdown
Contributor Author

(Check and tests pass locally for me, just as a reminder for when I aim to merge this eventually)

"multi boost query",
req(
reqWithPath(
qt,

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 wonder if the parameter qt can be renamed to path? Just from readnig the diff, I think this is now a variable holding the specific path?

"q", "foo:bar",
"omitHeader", "false"),
reqWithPath(
handler, // this should be fairly innocuous for any type of query

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 wonder if using the Solr specific term handler still makes sense, or we should just say path?

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