Search Insights widget displays the Request and Response JSON in 'pretty' format when Elasticsearch is the search engine
Main
QA
Main
QA
Description
Attachments
2
demands
is related to
Activity
Show:

Brian Lee March 23, 2022 at 1:04 PM
PASSED testing following the steps in the description. The following functional test also pass after these changes:
Elasticsearch7#AssertSearchInsightsExplain
Blueprints#ApplyBlueprintJSONToSearchViaLLSO
Tested on:
Tomcat 9.0.56 + MySQL 5.7
Portal master SHA: efd508a807841fc9ae7723e2af8582f83a82c7a9

Tibor Lipusz March 23, 2022 at 4:47 AM
I can just second to what Kevin wrote in his review:
I definitely do like the how the textarea appears first so immediate results appear before codemirror steps in so there isn't a page shift.
Nice work, !

Kevin Tan March 17, 2022 at 12:53 PM

Tibor Lipusz February 14, 2019 at 2:30 AM
Another improvement could be to add a "Copy-to-clipboard" button to the widget.
Completed
Details
Assignee
Brian LeeBrian Lee(Deactivated)Reporter
Tibor LipuszTibor LipuszEpic/Theme
Engineering Assignee
Olivia YuOlivia Yu(Deactivated)Git Pull Request
https://github.com/liferay-search/liferay-portal/pull/355 https://github.com/brianchandotcom/liferay-portal/pull/114915Development End Date
Mar 16, 2022, 5:01 PMDevelopment Start Date
Mar 11, 2022, 12:36 PMFrontend Developer(s) Assigned
Olivia YuQA Engineer(s) Assigned
Brian LeeStory Points
1Components
Fix versions
Priority
Medium
Details
Details
Assignee

Reporter

Epic/Theme
Engineering Assignee

Git Pull Request
https://github.com/liferay-search/liferay-portal/pull/355 https://github.com/brianchandotcom/liferay-portal/pull/114915
Development End Date
Mar 16, 2022, 5:01 PM
Development Start Date
Mar 11, 2022, 12:36 PM
Frontend Developer(s) Assigned

QA Engineer(s) Assigned

Story Points
1
Components
Fix versions
Priority
Zendesk Support
Linked Tickets
Zendesk Support
Linked Tickets
Zendesk Support

Linked Tickets
Created February 14, 2019 at 2:14 AM
Updated March 21, 2024 at 2:03 PM
Resolved March 23, 2022 at 1:05 PM
Problem
When the search engine is Elasticsearch, the output is a JSON and it is displayed without formatting (see the screenshot attached)
Start portal
Go the default 'search' page http://localhost:8080/web/guest/search
Add the Search Insights widget to the page
Execute a random search
Negative Consequences
Readability is limited, forces the admin to copy-paste and format the text manually.
Acceptance Criteria
Pretty-print the JSON output for the Request and the Response in the Search Insights widget. It applies to the Elasticsearch engine only, the Solr query string looks different, not a JSON.
"Copy to clipboard" button added to both Request and Response sections
Impact
Improved readability. No need to format the text manually.
Docs
https://learn.liferay.com/dxp/latest/en/using-search/search-pages-and-widgets/search-insights.html