mitmproxy / mitmproxy/pdoc

Improve handling of camelCase and snake_case when searching documentation

Open
#412 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
2.5k
Forks
228
PR merge metrics
No merged PRs in 30d

Description

Problem Description

When I am searching for the documentation for a function, say fooBarFunction(), I will often type foo 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
image

If I have time, I'll be happy to work on a PR for this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files or tests, so begin by reproducing the documentation search with a multiword query for a camelCase or snake_case function and trace the ranking behavior. Done means an exact function name ranks ahead of less-specific results despite differences in word splitting or capitalization; add focused coverage wherever the search behavior is tested.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, search
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.