Add search operators #10007

Closed
opened 2025-12-29 21:25:32 +01:00 by adam · 5 comments
Owner

Originally created by @Shourai on GitHub (Jul 24, 2024).

NetBox version

v4.0.7

Feature type

New functionality

Proposed functionality

Add the possibility to use search operators.

The global search on the main page is often used and it brings you to the search page where you have the option to drill down using the object type field and lookup field..
However, if you have a large database and you want to search for something specific you have to select those options every time.

Adding search operators like

vlan: 
rack:
device:
...

would improve the user experience for searching.

For example I need to lookup vlan 100, with the search operator I would type vlan: 100 in the global search field and the search automatically
selects the object type vlan.

It would somehow have to translate it into /search/?q=100&obj_types=ipam.vlan

Additionally if regex is used it would also select regex as lookup field.
E.g.
vlan: ^100$
This would filter for only vlan 100 and not vlan 1000.

Use case

This addition would improve the user experience when searching for specific object types.

Database changes

No response

External dependencies

No response

Originally created by @Shourai on GitHub (Jul 24, 2024). ### NetBox version v4.0.7 ### Feature type New functionality ### Proposed functionality Add the possibility to use search operators. The global search on the main page is often used and it brings you to the search page where you have the option to drill down using the object type field and lookup field.. However, if you have a large database and you want to search for something specific you have to select those options every time. Adding search operators like ``` vlan: rack: device: ... ``` would improve the user experience for searching. For example I need to lookup `vlan 100`, with the search operator I would type `vlan: 100` in the global search field and the search automatically selects the object type `vlan`. It would somehow have to translate it into `/search/?q=100&obj_types=ipam.vlan` Additionally if regex is used it would also select regex as lookup field. E.g. `vlan: ^100$` This would filter for only vlan 100 and not vlan 1000. ### Use case This addition would improve the user experience when searching for specific object types. ### Database changes _No response_ ### External dependencies _No response_
adam added the type: featurepending closurestatus: revisions needed labels 2025-12-29 21:25:32 +01:00
adam closed this issue 2025-12-29 21:25:33 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jul 26, 2024):

It sounds like you have the start of an idea, but this needs to be fleshed out much more before it can be considered for implementation. Would you like to take some time exploring how the global search engine currently works, and devising a (high level) potential implementation to support your proposal?

@jeremystretch commented on GitHub (Jul 26, 2024): It sounds like you have the start of an idea, but this needs to be fleshed out much more before it can be considered for implementation. Would you like to take some time exploring how the global search engine currently works, and devising a (high level) potential implementation to support your proposal?
Author
Owner

@Shourai commented on GitHub (Jul 29, 2024):

I will look into it and see what I can do, although I have no experience with Django.

@Shourai commented on GitHub (Jul 29, 2024): I will look into it and see what I can do, although I have no experience with Django.
Author
Owner

@github-actions[bot] commented on GitHub (Aug 6, 2024):

This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.

@github-actions[bot] commented on GitHub (Aug 6, 2024): This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.
Author
Owner

@PieterL75 commented on GitHub (Aug 13, 2024):

I had a similar proposal https://github.com/netbox-community/netbox/issues/12959
Hope this gets implemented

@PieterL75 commented on GitHub (Aug 13, 2024): I had a similar proposal https://github.com/netbox-community/netbox/issues/12959 Hope this gets implemented
Author
Owner

@jeremystretch commented on GitHub (Aug 13, 2024):

Closing this out as no further detail has been provided.

@jeremystretch commented on GitHub (Aug 13, 2024): Closing this out as no further detail has been provided.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10007