Skip to content

Ideas for search bar improvments #822

@tristanlatr

Description

@tristanlatr
  • Give better ranking when an object matches multiple clauses, I think this is already done by lunr. But some queries will generate unexpected result ordering. Like ensure parsed will not yield ensure_parsed_docstring as the first result in the list.
  • astutils. should list all members of the pydoctor.astutils module (translated to astutils.* *.astutils.* in lunr syntax) This has been addressed in Search bar improvments and Help page #823
  • Add wildcard in between dots so users can use only the first letters of module names, liket.w.t.tag might be translated to t*.w*.t*.tag* *.t*.w*.t*.tag* in lunr syntax
  • Change the default logic operator in between clauses: Currently all clauses are ORed together, so the number of results will increase every time users enter a new clause. Which is not a great user experience IMO. We could ANd the clauses by default and add a button to change the search logic.
  • Another way of fixing the issue above is to ANd the clauses together if no clauses have an explicit presence, so foo bar would become +foo +bar and +foo bar would stay the same. As a side effect this will make impossible to define query with only optional terms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions