My Java knowledge is limited to read-only, but could you tell me more about what you mean by "a contribution for common cases is welcomed!"?
I'm happy to write docs or a use case or a JIRA ticket if that is worthwhile? > On 23 Jun 2025, at 12:41, Mikhail Khludnev <m...@apache.org> wrote: > > Turns out that params are loaded into req.toLog here [1] that's happened > before stream body is parsed and json is inserted as json param at [2] > As a quick custom fix you may develop a component which will put > req.params.json into req.toLog. > > Also, a contribution for common cases is welcomed! > > [1] > https://github.com/apache/solr/blob/e17078a98a8ebea1a28853d02527f4dc81da4d6b/solr/core/src/java/org/apache/solr/core/SolrCore.java#L2916 > [2] > https://github.com/apache/solr/blob/b76a29d17c874806e3b6516810772e2238e93098/solr/core/src/java/org/apache/solr/handler/RequestHandlerBase.java#L235 > > On Mon, Jun 23, 2025 at 11:32 AM Andrew Hankinson > <andrew.hankinson@rism.digital> wrote: > >> Sorry -- I also meant to mention that I set `logParamsList=json` but that >> didn't work because I think it's looking for a "&json=... GET parameter. >> >>> On 23 Jun 2025, at 10:14, Mikhail Khludnev <m...@apache.org> wrote: >>> >>> Hi, >>> It seems like it works by design. see >>> >> https://github.com/apache/solr/blob/e17078a98a8ebea1a28853d02527f4dc81da4d6b/solr/core/src/java/org/apache/solr/core/SolrCore.java#L2932 >>> It logs only query string params if logParamsList is absent, and >>> perhaps you'll get all json request logged if set logParamsList=json see >>> >> https://github.com/apache/solr/blob/e17078a98a8ebea1a28853d02527f4dc81da4d6b/solr/core/src/java/org/apache/solr/request/json/RequestUtil.java#L182 >>> but I'm not sure whether it works as you need. >>> >>> On Mon, Jun 23, 2025 at 10:07 AM Andrew Hankinson >>> <andrew.hankinson@rism.digital> wrote: >>> >>>> Hello, >>>> >>>> I am on Solr 9.8.1 in standalone mode, and I'm trying to debug a number >> of >>>> slow queries. >>>> >>>> We've implemented almost all of our searches using the JSON Request API, >>>> >> https://solr.apache.org/guide/solr/latest/query-guide/json-request-api.html >>>> >>>> However, in the logs, and in the slow query logs, the JSON Request API >>>> search parameters do not appear: >>>> >>>> 2025-06-23 06:40:36.284 WARN (qtp1844334363-624-null-177821) [c: s: r: >>>> x:core_name t:null-177821] o.a.s.c.S.SlowRequest slow: webapp=/solr >>>> path=/select params={} hits=0 status=0 QTime=16914 >>>> >>>> You can imagine this makes it difficult to tell what is causing the >>>> problem! >>>> >>>> I've looked around and couldn't really find anything. I'm hesitant to >> use >>>> the "logParamsList" query parameter since I would have to 'opt-in' to >> quite >>>> a big list of query parameters. I've also tried enabling the "temporary" >>>> logging, but I think there's a bug with enabling these in standalone >> mode? >>>> I get an error "Parameter nodes only supported in Cloud mode". >>>> >>>> Is there a secret incantation that would help here? >>>> >>>> Thanks, >>>> -Andrew >>> >>> >>> >>> -- >>> Sincerely yours >>> Mikhail Khludnev >> >> > > -- > Sincerely yours > Mikhail Khludnev