-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 PostgreSQL full text searching #7016
Comments
Would this enable global searching based off of any object fields? That would be a great feature to have to find things that we might not know the name of 100% |
Including MAC addresses. :-) |
From the plugin framework workgroup: Be able to add models defined in plugins to the global / full text search capabilities mentioned here. |
Looking forward to v3.3 with this full-text search ! |
Unfortunately it doesn't look like we'll be able to tackle this in v3.3 without additional help. A lot of work is still needed to determine exactly how this should be implemented, and any overlap with a future indexer (yet to be determined) must be evaluated. |
Is there a way to introduce a wildcard in the search as an alternative? So that we can do switch00 or devsw ? |
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. |
Would it be possible to sponsor this as a feature? |
@ITJamie we don't allow direct sponsorship of features in NetBox, however you're certainly welcome to compensate individuals who want to help explore the feasibility of this proposal and perhaps develop a proof of concept. |
Dug into this more:
|
I suspect we would want to find a way to keep icontains, as I imagine a lot of people rely on it. |
Marking this as temporarily blocked by #8927. At this point we still intend to implement this for v3.4. |
I'm going to close this out in favor of an alternate implementation detailed in #10560, which I expect to be considerably more robust. This issue will be retained for reference in the event the other proposal proves untenable. |
* #7016 base search classes * 7016 add search indexes * 7016 add search indexes * 7016 add search indexes * 7016 add search indexes * 7016 add search indexes * 7016 add search indexes * 8927 refactor search * 8927 refactor search * 8927 refactor search * 8927 refactor search * 8927 get search choices working * 8927 cleanup - optimize * 8927 use backend search function * 8927 fix for plugin search * 8927 add docs * Move search app to a module under netbox/ * Utilize global registry to register model search classes * Build search form options from registry * Determine search categories from model app by default * Enable dynamic search registration for plugins * Update docs & improve plugin support * Clean up search backend class * Docs for #8927 Co-authored-by: jeremystretch <[email protected]>
NetBox version
v2.11.11
Feature type
New functionality
Proposed functionality
Extend NetBox's search functionality to employ PostgreSQL's native full text search capability. This is already supported by Django: https://docs.djangoproject.com/en/3.2/ref/contrib/postgres/search/
I haven't dug into this too much yet, but it appears to be pretty straightforward. I expect the bulk of the work will involve replacing our sets of
filter()
parameters withSearchQuery
andSearchVector
instances, and adding a commonSearchVectorField
to all appropriate models.I'm also open to alternative strategies for improving NetBox's global search performance, however any such proposals should be opened as separate feature requests and referenced here.
Use case
This change should provide much more robust search functionality, and allow us to rank search results according to customizable rankings per model.
Database changes
We'll likely need to add a new SearchVectorField to each searchable model.
External dependencies
No response
The text was updated successfully, but these errors were encountered: