You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "nick-boss-tech (via GitHub)" <gi...@apache.org> on 2026/10/02 20:31:37 UTC

[PR] SOLR-13202: Return 400 instead of 500 for join queries missing from/to parameters [solr]

nick-boss-tech opened a new pull request, #5012:
URL: https://github.com/apache/solr/pull/5012

   🤖 *AI text below* 🤖 *(posted on behalf of Nick Shanin)*
   
   https://issues.apache.org/jira/browse/SOLR-13202
   
   A join query without the required `from` or `to` parameter used to fail with a 500 (a NullPointerException further down) instead of a client error. `JoinQParserPlugin` and `ScoreJoinQParserPlugin` now check for a missing `from` or `to` up front and throw a `SolrException` with BAD_REQUEST and a message naming the missing parameter.
   
   `TestJoin.testJoinMissingFromToReturns400` covers missing `from` and missing `to` for the join parser across the default, dvWithScore and topLevelDV methods, asserting a 400 each time.
   
   Validation on the final tree: Error Prone compile clean, `TestJoin` passes, `tidy` applied with no changes, `:solr:core:check -x test` green.
   
   Changelog: `changelog/unreleased/SOLR-13202.yml` (type fixed).
   
   ### AI assistance
   AI agents assisted with research, implementation, review, and drafting. Nick Shanin directed the work and takes responsibility for this contribution.
   


-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] SOLR-13202: Return 400 instead of 500 for join queries missing from/to parameters [solr]

Posted by "mkhludnev (via GitHub)" <gi...@apache.org>.
mkhludnev merged PR #5012:
URL: https://github.com/apache/solr/pull/5012


-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] SOLR-13202: Return 400 instead of 500 for join queries missing from/to parameters [solr]

Posted by "mkhludnev (via GitHub)" <gi...@apache.org>.
mkhludnev commented on PR #5012:
URL: https://github.com/apache/solr/pull/5012#issuecomment-6053006791

   But this patch won't merged at 9.x as is, but I think AI is able to resolve the missing file. I'll keep this for 10.x. 


-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] SOLR-13202: Return 400 instead of 500 for join queries missing from/to parameters [solr]

Posted by "mkhludnev (via GitHub)" <gi...@apache.org>.
mkhludnev commented on PR #5012:
URL: https://github.com/apache/solr/pull/5012#issuecomment-6010303634

   Perfect! Would you mind also add AuxIndexJoinQParserPlugin and GlobalOrdinalsJoinQParserPlugin in scope? 


-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] SOLR-13202: Return 400 instead of 500 for join queries missing from/to parameters [solr]

Posted by "sigram (via GitHub)" <gi...@apache.org>.
sigram commented on PR #5012:
URL: https://github.com/apache/solr/pull/5012#issuecomment-6053939295

   @mkhludnev OTOH since it's a bug fix and we're still in preparation for 10.1 RC2 this could still make it into 10.1 if you think it's safe.


-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] SOLR-13202: Return 400 instead of 500 for join queries missing from/to parameters [solr]

Posted by "mkhludnev (via GitHub)" <gi...@apache.org>.
mkhludnev commented on PR #5012:
URL: https://github.com/apache/solr/pull/5012#issuecomment-6052954016

   set milestone to 9.x. Thanks, David.
   


-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] SOLR-13202: Return 400 instead of 500 for join queries missing from/to parameters [solr]

Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on PR #5012:
URL: https://github.com/apache/solr/pull/5012#issuecomment-6051819353

   Side note @mkhludnev : see my email RE milestones and a future 9.x.  I leave it to you to either resolve the JIRA and leave the Milestone be, or to change the Milestone to 9.x (I will backport + resolve it if you do that).


-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] SOLR-13202: Return 400 instead of 500 for join queries missing from/to parameters [solr]

Posted by "nick-boss-tech (via GitHub)" <gi...@apache.org>.
nick-boss-tech commented on PR #5012:
URL: https://github.com/apache/solr/pull/5012#issuecomment-6018272231

   🤖 *AI text below* 🤖 *(posted on behalf of Nick Shanin)*
   
   Thanks, both are covered now, pushed in c0aec3a7ae0.
   
   For `AuxIndexJoinQParserPlugin`: it did reject a missing `from` or `to`, but with one combined SyntaxError naming both params at once. It now calls the same `ScoreJoinQParserPlugin.requireFromAndTo` helper as the other join parsers, so the 400 names the specific missing parameter. `TestAuxIndexJoinQParserPlugin.testMissingLocalParams` now covers missing `from` and missing `to` separately.
   
   For `GlobalOrdinalsJoinQParserPlugin`: that parser has no `from`/`to` params; its required inputs are `joinField`, `which`, and the from query, and those were already validated with 400s naming the input. The one case `testValidationErrors` did not cover was the missing from query, so I added that case. If you would rather see those checks converted to the same helper style anyway, I can do that as well.
   
   Gate: tidy, Error Prone compile, and `:solr:core:check -x test` pass; TestAuxIndexJoinQParserPlugin 4/4, TestGlobalOrdinalsJoinQParser 6/6, TestJoin 5/5, CrossCollectionJoinQueryTest 10/10.


-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org