Skip to content

Search history pollution with search.searchOnType enabled #86288

Closed

Description

With current implementation of search history it's a bit hard to find previous "proper" searches when search.searchOnType is true.

When used with regular expressions which are not as fast to type as regular text it allows to quickly see RE errors or preliminary results but also saves each a lot of version with only 1-3 changed characters to history. Without better options to navigate field history except Up/Down it makes hard to find history entry for intentional searches (in my case it was about 20 intermediate results to spot proper search).

Current solutions are:

  1. Disable search.searchOnType and then only "submitted" searches will be in history.
  2. Increase search.searchOnTypeDebouncePeriod to 2s and hope that I can type all capturing groups and lookaheads fast enough, but it might be faster just to hit Enter

As for me - ideal solution will be an option to treat searches triggered by search.searchOnType as early preview of possible matches and add history entry only after user intentionally hits Enter.

Is it something that can be implemented and considered by the team?

/cc Jackson Kearl (@JacksonKearl)

Activity

  1. added
    search
    on Dec 4, 2019
  2. JacksonKearl commented on Dec 4, 2019

    @JacksonKearl
    Contributor

    I think it would make sense to add to history either on enter, or on a "large" (2 seconds maybe) debounce.

  3. added
    bug
    on Dec 4, 2019
  4. IllusionMH commented on Dec 12, 2019

    @IllusionMH
    ContributorAuthor

    Looks like same problem appears in "files to include/exclude" fields (even more spam entries) so I created PR #86785 that will debounce saving history entries for these fields too.

    And the another related question:
    Will you consider merging PR that will add Setting to completely disable history entries on type and will require explicit Enter press (off by default) or it's unnecessary complexity (which might be source of confusion) that wont be merged?
    It will basically turn "search on type" into some kind of Search preview mode - ideal for me, but would understand if it's not good for general auditory.

  5. JacksonKearl commented on Dec 12, 2019

    @JacksonKearl
    Contributor

    Andrii Dieiev (@IllusionMH) Thanks for the PR, I've merged it. As for the setting, if you propose a good name and description text I think it's reasonable.

  6. locked and limited conversation to collaborators on Jan 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugsearchverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions