fix(search): Add comments field to search indexing

Include comments field with weight 5000 in search indexes for
DeviceRole, L2VPN, MACAddress, and RouteTarget models to enable
full-text search on comment content.

Fixes #22767
This commit is contained in:
Martin Hauser 2026-07-25 14:18:00 +02:00 committed by Jeremy Stretch
parent 34d6c170d8
commit 7d0a86ef52
2 changed files with 4 additions and 0 deletions

View File

@ -84,6 +84,7 @@ class DeviceRoleIndex(SearchIndex):
('name', 100),
('slug', 110),
('description', 500),
('comments', 5000),
)
display_attrs = ('description',)
@ -117,6 +118,7 @@ class MACAddressIndex(SearchIndex):
fields = (
('mac_address', 100),
('description', 500),
('comments', 5000),
)
display_attrs = ('assigned_object', 'description')
@ -239,6 +241,7 @@ class PlatformIndex(SearchIndex):
('name', 100),
('slug', 110),
('description', 500),
('comments', 5000),
)
display_attrs = ('manufacturer', 'description')

View File

@ -172,6 +172,7 @@ class VLANTranslationPolicyIndex(SearchIndex):
fields = (
('name', 100),
('description', 500),
('comments', 5000),
)
display_attrs = ('description',)