Quick Search only search some fields in 3.1.2 #5831

Closed
opened 2025-12-29 19:33:15 +01:00 by adam · 3 comments
Owner

Originally created by @bluikko on GitHub (Dec 23, 2021).

NetBox version

v3.1.2

Python version

3.8

Steps to Reproduce

  1. Go to Devices list.
  2. Type in Quick Search field a model of the device (Type) or a Serial Number.
  3. No results are listed.

The release notes list no changes for such a large change in functionality to Quick Search behavior so I can only say that this must be a bug.

Expected Behavior

Quick Search would give results based on a match on any field like before in 3.1.1.

Observed Behavior

The Quick Search seems to only search the Name field, at least when viewing Devices list. Up to 3.1.1 it could filter the list with device Type or Serial Number, which was very handy.

Just using the browser search functionality is one option but when there are multiple matches - for example when searching devices of a certain Type / model, the Quick Search used to handily list all the matches - instead of jumping around the page with browser search.

Originally created by @bluikko on GitHub (Dec 23, 2021). ### NetBox version v3.1.2 ### Python version 3.8 ### Steps to Reproduce 1. Go to Devices list. 2. Type in Quick Search field a model of the device (Type) or a Serial Number. 3. No results are listed. The release notes list no changes for such a large change in functionality to Quick Search behavior so I can only say that this must be a bug. ### Expected Behavior Quick Search would give results based on a match on any field like before in 3.1.1. ### Observed Behavior The Quick Search seems to only search the Name field, at least when viewing Devices list. Up to 3.1.1 it could filter the list with device Type or Serial Number, which was very handy. Just using the browser search functionality is one option but when there are multiple matches - for example when searching devices of a certain Type / model, the Quick Search used to handily list all the matches - instead of jumping around the page with browser search.
adam closed this issue 2025-12-29 19:33:16 +01:00
Author
Owner

@bluikko commented on GitHub (Dec 23, 2021):

And immediately after submitting this, typing a serial to Quick Search suddenly did give me results. Hmmpf. I did try that before and got nothing, even after waiting for several seconds. But searching by a Type, say 3750 for Cisco 3750 switches still results in nothing.

So my OP must be wrong about only searching the Name field, seems at least Serial is also searched?

Edit: seems Inventory items' Serial Numbers are also included in the Quick Search of Devices. So I wish Type would be searched also, maybe Platform as well. Also Comments field is searched, which as a long text field might be much slower than the Type field.

@bluikko commented on GitHub (Dec 23, 2021): And immediately after submitting this, typing a serial to Quick Search suddenly *did* give me results. Hmmpf. I did try that before and got nothing, even after waiting for several seconds. But searching by a Type, say `3750` for Cisco 3750 switches still results in nothing. So my OP must be wrong about only searching the Name field, seems at least Serial is also searched? Edit: seems Inventory items' Serial Numbers are also included in the Quick Search of Devices. So I wish Type would be searched also, maybe Platform as well. Also Comments field is searched, which as a long text field might be much slower than the Type field.
Author
Owner

@jeremystretch commented on GitHub (Dec 23, 2021):

The quick search widget now uses the ?q= general purpose query filter for all objects. This allows it to match on various attributes and to return results not already included within the table. (Previously, it was limited to filtering on values displayed within the current page of the table.) This is by design and provides much improved functionality.

You can find the fields queried by the device filter specifically here. Please open a separate FR if you'd like to propose extending this specific filter to include additional fields.

@jeremystretch commented on GitHub (Dec 23, 2021): The quick search widget now uses the `?q=` general purpose query filter for all objects. This allows it to match on various attributes and to return results not already included within the table. (Previously, it was limited to filtering on values displayed within the current page of the table.) This is by design and provides much improved functionality. You can find the fields queried by the device filter specifically [here](https://github.com/netbox-community/netbox/blob/cab9733b6082a7d42a048fd4420441a86f5e823f/netbox/dcim/filtersets.py#L771-L780). Please open a separate FR if you'd like to propose extending this specific filter to include additional fields.
Author
Owner

@bluikko commented on GitHub (Dec 24, 2021):

I do wonder if that could be made configurable in the configuration file or user profile in some reasonable way. Then administrators/individual users could tune it to their needs and NetBox developers would never face another FR about it.

I wish major changes like this would be included in the release notes.

Thank you for the pointer to the source, it will be useful.

@bluikko commented on GitHub (Dec 24, 2021): I do wonder if that could be made configurable in the configuration file or user profile in some reasonable way. Then administrators/individual users could tune it to their needs and NetBox developers would never face another FR about it. I wish major changes like this would be included in the release notes. Thank you for the pointer to the source, it will be useful.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5831