Open 991jo opened 9 months ago
I do not think this is possible to implement. The value in question is an interger field vs the object representation (suffixed with AS
). The search cache adds the actual value rather than the string representation of the object, so a user must search for the value as 64496
only. You could however try to use the ends with
type instead of partial match
to workaround this issue.
We could enable this by extending SearchIndex
to allow passing instance attributes in addition to fields, and adding a name
property on ASN
that returns e.g. "AS1234"
. Then, the string "AS1234" would be cached alongside the integer 1234.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.
Marking this as blocked by #15413
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.
NetBox version
v3.6.4
Feature type
Change to existing functionality
Proposed functionality
The current global and the ASN quick search should return results independent of whether a user searches for "AS64496" or "64496". Currently only the later returns results.
Use case
This should reduce errors and increase the search hit rate for ASNs. Many other systems return ASNs as "AS64496" and the user simply copies that and finds no results in NetBox. NetBox itself even formats the ASN Objects in the global search as "AS64496" instead of "64496".
Database changes
No response
External dependencies
No response