You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "adityamparikh (via GitHub)" <gi...@apache.org> on 2026/08/19 12:00:00 UTC

Re: [PR] feat(search): replace sort clause maps with a typed SortClause record [solr-mcp]

adityamparikh commented on PR #164:
URL: https://github.com/apache/solr-mcp/pull/164#issuecomment-5341802634

   Rebased onto `main` (`a84033b`). This one needed real conflict resolution plus a compile fix, so flagging what changed beyond history:
   
   **1. `SolrQuery` moved package (this branch did not compile without it).** SolrJ 10 relocated `SolrQuery` from `org.apache.solr.client.solrj` to `org.apache.solr.client.solrj.request`. This branch was written against SolrJ 9, so `SortClause.java` and `SortClauseTest.java` both had the old import and failed `compileJava` outright after the rebase. Fixed in both.
   
   **2. Reconciled with #176's map validation.** `main` added `SearchService.toSortClause(Map)` plus `SORT_ITEM`/`SORT_ORDER` constants, which is the same problem this PR solves with a type. I removed the map path (constants + private helper) and kept the record, since carrying both would leave two validators for one parameter. Everything else #166 added to `SearchService` — the remediation-hint constants, the `@Nullable` parameters, the eDisMax local-params text from #161 — is preserved.
   
   **3. Updated two test call sites that did not exist when this PR was written.** `SearchServiceIntegrationTest` and `SearchServiceTest` gained `SearchService.SORT_ITEM`/`SORT_ORDER` usages via #166/#176. Git merged them cleanly because they are on different lines; only javac caught them. Both now construct `new SortClause(field, order)`.
   
   **4. `SolrNativeHints`:** kept `main`'s removal of `FieldStats` (#180) and added `SortClause` — tool *parameter* records are Jackson-bound reflectively, so they need the same treatment as response records.
   
   Verified: `./gradlew build` green on JDK 25.


-- 
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