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
Improve handling of camelCase and snake_case when searching documentation #412
Comments
I'll say I'm a big snake_case fan, but I'm happy to merge a PR for this if it's straightforward to implement. :) |
Hi, we had the exact same issue with pydoctor (for search indexing and also for better line wrapping). We ended-up indexing the splited the name as well. Here's the code that splits camelCase or snake_case name identifiers: Tests can be found here: https://github.com/twisted/pydoctor/blob/0f2c5caee2f3b41ccc2943181086af5e00c0309d/pydoctor/test/test_epydoc2stan.py#L1508-L1544 Fell free to use this ;-) |
Problem Description
When I am searching for the documentation for a function, say
fooBarFunction()
, I will often typefoo bar function
into the search box in order to save time. When I do this, the function will often be significantly lower in the results list, even if what I have typed is an exact match (excluding the way words are split).Proposal
Searching for a function using multiple words should prioritise functions with that exact name, even if the function uses a different capitalisation convention to the search query.
Additional context
The correct result is 7th in the list
If I have time, I'll be happy to work on a PR for this.
The text was updated successfully, but these errors were encountered: