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

Enable caching of object attributes in search index #15413

Closed
jeremystretch opened this issue Mar 12, 2024 · 0 comments
Closed

Enable caching of object attributes in search index #15413

jeremystretch opened this issue Mar 12, 2024 · 0 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Milestone

Comments

@jeremystretch
Copy link
Member

NetBox version

v3.7.3

Feature type

New functionality

Proposed functionality

Extend SearchIndex to enable caching object attributes in addition to concrete model fields. This can be achieved by tweaking its get_field_type() method to also accept attributes. (get_field_value() probably doesn't need modification as it's simply wrapping getattr().)

Use case

This will enable NetBox to capture rendered attributes in addition to raw database values. For instance, #14201 requests caching the number of an ASN object as the string "AS1234" in addition to the plain numeric value.

Database changes

None expected

External dependencies

None

@jeremystretch jeremystretch added type: feature Introduction of new functionality to the application needs milestone Awaiting prioritization for inclusion with a future NetBox release labels Mar 12, 2024
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed needs milestone Awaiting prioritization for inclusion with a future NetBox release labels Mar 13, 2024
@jeremystretch jeremystretch self-assigned this Mar 13, 2024
@jeremystretch jeremystretch added this to the v4.0 milestone Mar 13, 2024
jeremystretch added a commit that referenced this issue Mar 15, 2024
Closes #15413: Enable caching of object attributes in search index
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

1 participant