Regular expressions no longer work in the 'Quick search' bar #6016

Closed
opened 2025-12-29 19:35:45 +01:00 by adam · 2 comments
Owner

Originally created by @Mizarv on GitHub (Jan 28, 2022).

NetBox version

3.1.5

Python version

3.7

Steps to Reproduce

  1. Open https://demo.netbox.dev/dcim/devices/
  2. Enter 'PP:B117|PP:B118' into the Quick search bar

Expected Behavior

Devices PP:B117 and PP:B118 should be displayed

Observed Behavior

No devices are displayed

Originally created by @Mizarv on GitHub (Jan 28, 2022). ### NetBox version 3.1.5 ### Python version 3.7 ### Steps to Reproduce 1. Open https://demo.netbox.dev/dcim/devices/ 2. Enter 'PP:B117|PP:B118' into the Quick search bar ### Expected Behavior Devices PP:B117 and PP:B118 should be displayed ### Observed Behavior No devices are displayed
adam added the type: bug label 2025-12-29 19:35:45 +01:00
adam closed this issue 2025-12-29 19:35:45 +01:00
Author
Owner

@kkthxbye-code commented on GitHub (Jan 28, 2022):

To provide some context:

I have seen others mention this before. The quick search bar was changed in 3.1.2 in the following PR https://github.com/netbox-community/netbox/pull/8073

The old quick search searched in only the loaded page, but it searched in all fields, with partial matches and regex support. The new way uses the q filter of the object that is being searched to look up all possible matches in the database. In most cases this searches a few fields with no support for partial matches (not sure if this is the case for all objects).

Obviously the old way was broken from a usability standpoint (only searching in the loaded page), sometimes making users increase their pagination setting, causing slow page loads. I could support a feature request for making the quick search better, but it would probably be blocked by the following feature request: https://github.com/netbox-community/netbox/issues/7016

@kkthxbye-code commented on GitHub (Jan 28, 2022): To provide some context: I have seen others mention this before. The quick search bar was changed in 3.1.2 in the following PR https://github.com/netbox-community/netbox/pull/8073 The old quick search searched in only the loaded page, but it searched in all fields, with partial matches and regex support. The new way uses the q filter of the object that is being searched to look up all possible matches in the database. In most cases this searches a few fields with no support for partial matches (not sure if this is the case for all objects). Obviously the old way was broken from a usability standpoint (only searching in the loaded page), sometimes making users increase their pagination setting, causing slow page loads. I could support a feature request for making the quick search better, but it would probably be blocked by the following feature request: https://github.com/netbox-community/netbox/issues/7016
Author
Owner

@jeremystretch commented on GitHub (Jan 28, 2022):

#7604 may also be relevant

@jeremystretch commented on GitHub (Jan 28, 2022): #7604 may also be relevant
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6016