[PR #16755] [MERGED] Do not delete all search indexes when reindexing specific models #14910

Closed
opened 2025-12-29 23:27:25 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/16755
Author: @peteeckel
Created: 6/27/2024
Status: Merged
Merged: 7/1/2024
Merged by: @jeremystretch

Base: developHead: 16747-selective-reindexing


📝 Commits (2)

  • 1144b2e Do not delete all search indexes when reindexing specific models
  • 3f9b7d9 Separated clearing from re-indexing the search cache

📊 Changes

1 file changed (+7 additions, -2 deletions)

View changed files

📝 netbox/extras/management/commands/reindex.py (+7 -2)

📄 Description

  • Clear all indexes only if neither --lazy nor a list of models are specified for "manage.py reindex"
  • Otherwise, clear the index for a model immediately before rebuilding it

Fixes: #16747


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/16755 **Author:** [@peteeckel](https://github.com/peteeckel) **Created:** 6/27/2024 **Status:** ✅ Merged **Merged:** 7/1/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `16747-selective-reindexing` --- ### 📝 Commits (2) - [`1144b2e`](https://github.com/netbox-community/netbox/commit/1144b2e27d787b824d39b8dcc952ca44b54ecce4) Do not delete all search indexes when reindexing specific models - [`3f9b7d9`](https://github.com/netbox-community/netbox/commit/3f9b7d9488ee437c83041296629178da153f9781) Separated clearing from re-indexing the search cache ### 📊 Changes **1 file changed** (+7 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `netbox/extras/management/commands/reindex.py` (+7 -2) </details> ### 📄 Description * Clear all indexes only if neither `--lazy` nor a list of models are specified for "manage.py reindex" * Otherwise, clear the index for a model immediately before rebuilding it ### Fixes: #16747 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:27:25 +01:00
adam closed this issue 2025-12-29 23:27:25 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14910