opensfcc / sfcc-docs

SFCC Docs Engine for sfccdocs.com
https://sfccdocs.com
MIT License
13 stars 2 forks source link

Search Suggestions display Class description rather than Method description #21

Closed sholsinger closed 12 months ago

sholsinger commented 1 year ago

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
manifestinteractive commented 1 year ago

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.

manifestinteractive commented 1 year ago

@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

sholsinger commented 1 year ago

You're awesome!

manifestinteractive commented 12 months ago

This was deployed in release 0.6.0