Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
A few items:
- Out of the box Search API Solr Devel doesn't show the Solr responses/debugQuery on screen.
- The logged requests have no timestamp or context which helps link them with their original requests.
- The information logged into the temporary://drupal_debug.txt file has a lot of the extra HTML format applied to it (if the Devel logger plugin is not the "default" one.
- Many Solr queries are "pings" that end up cluttering the screen.(Example: navigate to /admin/config which apprently triggers a lot of eventual calls to Solr).
Proposed resolution
- Show responses on-screen.
- Add a datetime to each message, plus measure and show the Solr response time.
- Force the information written to temporary://drupal_debug.txt to use the default logger (which avoids a lot of HTML cruft)
- Avoid logging all "admin/*" Solr requests.
Incoming patch.
Comment | File | Size | Author |
---|---|---|---|
#6 | screenshot_20210202-153716.png | 210.23 KB | janusman |
#6 | search_api_solr-3195477-6.patch | 4.43 KB | janusman |
#2 | search_api_solr-3195477.patch | 4.38 KB | janusman |
Comments
Comment #2
janusman CreditAttribution: janusman at Acquia commentedPatch for review.
Comment #3
janusman CreditAttribution: janusman at Acquia commentedAlso: filed a PR in https://github.com/mkalkbrenner/search_api_solr/pull/66
Comment #4
mkalkbrennerThe patch looks good. It just requires some small adjustments:
The counter should be included here to build a relationship to the response.
The counter should be included here to build a relationship to the request.
Json:decode should not be used here!
It is possible to request a different response format from Solr.
Comment #5
janusman CreditAttribution: janusman at Acquia commentedThanks for the feedback! Will post changes soon.
Comment #6
janusman CreditAttribution: janusman at Acquia commentedNew patch.
Added counter to debug dump. Removed use of Json::decode().
Updated PR at https://github.com/mkalkbrenner/search_api_solr/pull/66/commits/f518963d... (checks are running).
Glad I removed the Json::decode() bit, because I discovered the vardumper output would quite inconveniently cut off display of the explain output (which is now visible by looking at the raw Json).
Added screenshot of how this looks when using the Symfony VarDumper option set in /admin/config/development/devel
Comment #7
mkalkbrennerComment #9
mkalkbrenner