markvincze / sabledocs

Simple static documentation generator for Protobuf and gRPC contracts.
MIT License
45 stars 12 forks source link

Search bar can't find message names #39

Closed soleilankerbaril closed 7 months ago

soleilankerbaril commented 7 months ago

When searching for a message name, no results are found

Here is the existing message: image

Here is the search input: image

Here is the search result: image

markvincze commented 7 months ago

Thanks for creating the issue with a detailed example!

I remember Lunr search was a bit tricky to configure correctly, and I tried testing it thoroughly at the time, but something might've changed since then, I'll investigate why the message name is not working as the search term.

markvincze commented 7 months ago

@soleilankerbaril , this seems to be related to case sensitivity.

To confirm: if you search for lowercase "contextsconfig", do you get the search result then?

markvincze commented 7 months ago

@soleilankerbaril Attempted to fix in #43, it's released as a prerelease version: https://pypi.org/project/sabledocs/0.11.541.dev0/, if you could give it a try to see if it fixes the issue, that'd be appreciated!

soleilankerbaril commented 7 months ago

Hi, Thanks for the quick fix. I confirm that it wasn't a case-sensitive issue, since it did not work with upper case or lower case.

The fix works perfect, thank you. I am now able to search for messages, and it is not case-sensitive as bonus 😉

PS: Love the work you did with this doc generator.

markvincze commented 7 months ago

@soleilankerbaril Right, there was another issue, that the full type name was not split per . during the indexing, so if you had a type Person in package foo.bar, then only searching for "foo.bar.person" was working, "person" was not, probably you were hitting this issue as well 🙂. That's also fixed now.

Thanks, I'm glad that you like it! I'll merge the PR so the fix will be released in the next stable version.

soleilankerbaril commented 7 months ago

If there are some features that I have ideas for, where would be the right place for me to write them (kinda new to using GitHub and all)

markvincze commented 7 months ago

@soleilankerbaril Feel free to create issues for them, and we can discuss in the issue.

soleilankerbaril commented 7 months ago

Cool, thanks. Should I close this issue or are you going to close it with when the next stable version comes out?

markvincze commented 7 months ago

@soleilankerbaril The fix was released to stable, closing this now.