opensfcc / sfcc-docs

SFCC Docs Engine for sfccdocs.com

Home Page:https://sfccdocs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Search Suggestions display Class description rather than Method description

sholsinger opened this issue · comments

Issue Checklist:

What happened?

While testing #8 I noticed that the descriptions shown in the typeahead search are the class descriptions instead of the methods which are being presented.

Screenshot 2023-09-20 at 4 34 38 PM

Expected outcome is that the method's description (if available) would be displayed instead of the class description.

Which Browser(s) were you using?

Impacts All

Which Operating System(s) were you using?

Impacts All

Steps to produce this issue.

  1. Navigate to https://sfccdocs.com/
  2. Type: setTracking

This one is not really possible due to how the indexing works. The search results that do have a full index can find the match, but not descriptions about those matches.

@sholsinger reopening this as I think I figured out a solution. Not exactly what you are asking for, but way more helpful than not. Turns out I can grab the first few lines from the section that the resulting match was found in ( does mean I have to store that in the index, but if it's just the first line, it's not too bad.

Here's what it ends up looking like. Let me know if this is good enough for you for this ticket :)

This new data is the second line of each result, the first line is the page description. In some instances the result is for the entire page and not for a section, so for those instances, there won't be a second line in the search results.

Screenshot 2023-11-01 at 5 36 40 AM

You're awesome!

This was deployed in release 0.6.0