You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Eric Pugh (Jira)" <ji...@apache.org> on 2025/06/24 19:34:00 UTC
[jira] [Comment Edited] (SOLR-17794) Logging JSON Request API parameters
[ https://issues.apache.org/jira/browse/SOLR-17794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17985944#comment-17985944 ]
Eric Pugh edited comment on SOLR-17794 at 6/24/25 7:33 PM:
-----------------------------------------------------------
I am dubious about logging complex JSON data structures into a traditional log file... It works with classic Solr queries because they are single line in nature...
If you are debugging complex queries, maybe we need to be capturing them and treating them quite differently? Maybe instead of the output being the log file, we need to have some other location, a slow_queries.jsonl file? Or another solr index.. Or even, just make it super easy to send them elsewhere?
This work was meant to be about capturing user query, not the JSON request, but something more like what was spiked out in https://github.com/apache/solr/pull/2452
was (Author: epugh):
I am dubious about logging complex JSON data structures into a traditional log file... It works with classic Solr queries because they are single line in nature...
If you are debugging complex queries, maybe we need to be capturing them and treating them quite differently? Maybe instead of the output being the log file, we need to have some other location, a slow_queries.jsonl file? Or another solr index.. Or even, just make it super easy to send them elsewhere?
This work was meant to be about capturing user query, not the JSON request, but something more like like [https://github.com/apache/solr/pull/2452|https://github.com/apache/solr/pull/2452...]
> Logging JSON Request API parameters
> -----------------------------------
>
> Key: SOLR-17794
> URL: https://issues.apache.org/jira/browse/SOLR-17794
> Project: Solr
> Issue Type: Bug
> Components: JSON Request API, logging
> Affects Versions: 9.8.1
> Environment: Solr 9.8.1, Ubuntu 22.04
> Reporter: Andrew Hankinson
> Priority: Major
> Labels: pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
> When using the JSON Request API, there seems to be no way to enable logging of the request parameters. This was discussed recently on the Solr users list.
> Unlike the "old" request API that uses the GET parameters for queries, the JSON Request API uses query parameters passed in the body of a POST command. This means that the log messages that use the JSON Request API, despite having search queries executed with the request, produces log messages like this:
> {code:java}
> 2025-06-23 07:05:48.036 INFO (qtp1844334363-56-null-95) [c: s: r: x:core_name t:null-95] o.a.s.c.S.Request webapp=/solr path=/select params={} hits=99 status=0 QTime=2400 {code}
> That is, the "params" element is always empty.
> Furthermore, even if this isn't desirable as the default behaviour, there seems to be no way to turn it on in. This makes debugging slow queries quite difficult, since it cannot be reproduced.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org