Skip to content

Resolve "Improve result snippet text"

Hiru Fernando requested to merge 131-improve-result-snippet-text into elasticsearch

What does this MR do and why?

Describe why, not just what. Include links to relevant issues or discussions.

This MR goes through the array of html snippets returned by search query, sorts them by the longest to shortest snippet, and the code grabs the longest one (first item in the sorted array) and returns that to the search results component.

Screenshots, screen recordings, or links to review app

These are strongly recommended to assist reviewers and reduce the time to merge your change.

After searching "git":

BEFORE AFTER
image.png image.png

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/technical-writing-group/gitlab-docs-hugo/-/blob/main/doc/setup.md.
  2. Search any term in the search bar, go to search results and make sure there's no awkwardly short snippet for any search result displayed.

Merge request acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Closes #131 (closed)

Edited by Hiru Fernando

Merge request reports

Loading