Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find APIs through docs search bar #2710

Closed
Tracked by #2843
skorfmann opened this issue May 30, 2023 · 6 comments
Closed
Tracked by #2843

Cannot find APIs through docs search bar #2710

skorfmann opened this issue May 30, 2023 · 6 comments
Assignees
Labels
🐛 bug Something isn't working 📚 documentation Improvements or additions to documentation

Comments

@skorfmann
Copy link
Contributor

I tried this:

Trying to find docs for the Wing stdlib on the docs page. e.g. trying to find String#lowercase.

This happened:

The search for methods / types of the stdlib leads to zero results on docs

e.g. lowercase is present, but not discoverable / findable.

Screenshot 2023-05-30 at 17 18 30

I expected this:

  • being able to find docs about stdlib and available functions

Is there a workaround?

Component

SDK, IDE Extension

Wing Version

0.17.32

Wing Console Version

0.17.32

Node.js Version

v18.16.0

Platform(s)

MacOS

Anything else?

No response

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.
@skorfmann skorfmann added the 🐛 bug Something isn't working label May 30, 2023
@monadabot monadabot added this to Wing May 30, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New - not properly defined in Wing May 30, 2023
@Chriscbr Chriscbr added the 📚 documentation Improvements or additions to documentation label May 30, 2023
@Chriscbr Chriscbr changed the title Docs: Stdlib is not documented Cannot find APIs through docs search bar Jun 15, 2023
@Chriscbr
Copy link
Contributor

I can reproduce this (I searched for "lowercase" and didn't find the API page listed). after playing with the search a bit I think there may be an issue where the "API reference" page is not being indexed. I wonder if it's due to the page size?

@ainvoner ainvoner self-assigned this Jun 18, 2023
@ainvoner
Copy link
Contributor

ainvoner commented Jun 18, 2023

Algolia crawler returns Extractors returned too many records error for the API reference page.
we can reduce the number of records at the content level of the extractor using aggregatecontent

another solution would be to split the massive Api reference page into sub pages

@Chriscbr
Copy link
Contributor

Chriscbr commented Jun 20, 2023

@ainvoner I see. I'll look into splitting the API reference into subpages as part of the docs work. I'm not sure if this would work as an intermediate solution but if there is a way to tell the extractor to skip low-level headings (H4, H5, H6) then that might be good enough. Related: algolia/docsearch#1658

@ainvoner
Copy link
Contributor

@Chriscbr yes, there is an easy way to configure the crawler. However, by doing it we are losing search capabilities.
Another downside is that the api reference page is going to have much more records in the future.
In my opinion the best solution would be to split the api reference page.

@ainvoner ainvoner moved this from 🆕 New - not properly defined to 🏗 In progress in Wing Jun 21, 2023
@ainvoner ainvoner moved this from 🏗 In progress to 🤝 Backlog - handoff to owners in Wing Jun 26, 2023
mergify bot pushed a commit that referenced this issue Jun 27, 2023
Split up the API reference so each module in the standard library (`cloud`, `http`, `util`, etc.) has its own dedicated page. Besides making it easier to view, hopefully will make it easier for headings in these pages to get indexed and (crossing our fingers 🤞) will address #2710.

<img width="230" alt="Screenshot 2023-06-27 at 6 30 04 PM" src="https://github.com/winglang/wing/assets/5008987/89316047-df92-437a-9bff-aec2fa5c0655">

It's not quite perfect (if there is a link to a resource in another subpage, the link just won't do anything) but it's a step in the right direction.

## Checklist

- [ ] Title matches [Winglang's style guide](https://docs.winglang.io/contributing/pull_requests#how-are-pull-request-titles-formatted)
- [ ] Description explains motivation and solution
- [ ] Tests added (always)
- [ ] Docs updated (only required for features)
- [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing

*By submitting this pull request, I confirm that my contribution is made under the terms of the [Monada Contribution License](https://docs.winglang.io/terms-and-policies/contribution-license.html)*.
@Chriscbr
Copy link
Contributor

Chriscbr commented Jun 28, 2023

So, it looks like #3113 improved the situation a little bit, since now e.g. searching for "redis" does show me results for the API reference of redis:

Screenshot 2023-06-28 at 2 28 00 PM

And these search results for "bucket" are pretty good:
Screenshot 2023-06-28 at 2 30 30 PM

But "lowercase" still returns nothing useful. The next idea I'll try is reducing the number of headings we are generating.

@ainvoner
Copy link
Contributor

@tsuf239 thanks!
we can now resolve it

@ainvoner ainvoner moved this from 🤝 Backlog - handoff to owners to ✅ Done in Wing Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 📚 documentation Improvements or additions to documentation
Projects
Archived in project
Development

No branches or pull requests

3 participants