Skip to content
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

Set default globalsearch lookuptype #17138

Open
PieterL75 opened this issue Aug 13, 2024 · 9 comments
Open

Set default globalsearch lookuptype #17138

PieterL75 opened this issue Aug 13, 2024 · 9 comments
Labels
netbox status: under review Further discussion is needed to determine this issue's scope and/or implementation type: feature Introduction of new functionality to the application

Comments

@PieterL75
Copy link
Contributor

NetBox version

v4.0.8

Feature type

Data model extension

Proposed functionality

the default globalsearch lookuptype is set to partial match.
a user should be able to select its own preference for the default value.
another option, is that the last used lookuptype is saved for the user.

Use case

as a user I prefer to have the 'regex' as a default search option. currently, I have to search, change the lookuptype, search again.

Database changes

An extra selector field is required on the user profile.

External dependencies

No response

@PieterL75 PieterL75 added status: needs triage This issue is awaiting triage by a maintainer type: feature Introduction of new functionality to the application labels Aug 13, 2024
@jeremystretch
Copy link
Member

This seems like it would result in a lot of confusion and frustration. Initializing the form with a predictable value every time is more user-friendly.

@jeremystretch jeremystretch removed their assignment Aug 13, 2024
@jeremystretch jeremystretch added status: under review Further discussion is needed to determine this issue's scope and/or implementation and removed status: needs triage This issue is awaiting triage by a maintainer labels Aug 13, 2024
@PieterL75
Copy link
Contributor Author

I don't see how this can cause confusion. The setting should be retained per user. Each user than has the experience he choose.
I always change the search to regex, as looking for devices is easier like that (ex: server\d*.customername)

@jeremystretch
Copy link
Member

I don't see how this can cause confusion.

  1. User changes the search type to "exact" and searches for something.
  2. User does something else.
  3. User returns and search for something entirely unrelated, but gets no results.
  4. User is confused because results were expected.
  5. User realizes the "exact" filter was still applied from an unrelated search, which was not intended.

@PieterL75
Copy link
Contributor Author

That is not the behavior I propose. (But indeed an optional behavior, so let's ignore that one)

The FR is too allow the user to set the default lookup type for him. This will give him a consistent experience.

@jeremystretch
Copy link
Member

It's the same problem though, really. Once a default has been set for some temporary purpose, it will likely be forgotten.

@PieterL75
Copy link
Contributor Author

I can't imagine one sets the default and forget about it. It's the main used feature of NetBox. All I do is search, change the lookup, search again...

Maybe get some more voices and poll on slack?

@jeremystretch jeremystretch added the netbox label Nov 1, 2024 — with Linear
@tobikris
Copy link

What do you think of the following compromise?

  • No setting is added for this.
  • The URL to the search with regex matching selected is "exposed" to be able to create browser bookmarks.

I think this limits user confusion to the bare minimum as you need to click on your own bookmark and then ignore what is selected in the form.

@lgerhold
Copy link

I completely agree with the concerns raised in this issue. The current default setting for global search in NetBox is "partial match," which often leads to less relevant results, especially when searching for exact site names. Having to manually switch the lookup type to "exact match" for precise results is indeed cumbersome.

Implementing a feature that allows users to set their preferred default search behavior, or at least remembers the last used lookup type, would significantly enhance the user experience. This adjustment would streamline workflows by reducing repetitive actions and ensuring that search results align more closely with user expectations.

This enhancement aligns with previous discussions and issues where the need for more intuitive and user-friendly search functionalities has been highlighted.

@fggec
Copy link

fggec commented Feb 19, 2025

I see both sides of that discussion. It would be nice to set the default search behavior for myself. On the other side i understand that for most standard users this could be confusing.

My approach would be: If we can not have this feature requested maybe it is possible to change the partial match behavior to set the match which is nearest to the query (often the exact match) is shown on first position. (sorting by relevance)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
netbox status: under review Further discussion is needed to determine this issue's scope and/or implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

5 participants