-
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
Global search on homepage #159
Global search on homepage #159
Comments
This looks like it relates to #132. |
#132 specifically mentions 'devices', but if that can be expanded to ALL sections, then yes. |
@paradoxni In your example you use a customer name. I think that specific function would be provided by #16 (multitenancy support). |
I had used the search term as an example, but I think it would be useful to be able to search across all fields (including comments) across all sections. Another example would be a circuit, where you could search not just using circuitID. A global search, if you will. |
imported stuff from phpIPAM, "Search Within" doesn't search the "Description" field? |
@rekeds "Search within" limits searches to a scope. For example, finding all prefixes within 192.168.0.0/16. |
@jeremystretch thank you. Netbox is great. |
I would want to see this global search field on every page, not just the homepage. I don't see a problem with contextual search as well, but like having a lazy global search too. Hopefully this includes all types of fields, as addressed in #358 |
Adding an enterprise search engine seems a bit overkill for simply federating search across the existing models. Since we're tied to PostgreSQL anyway, you should be able to use https://docs.djangoproject.com/en/1.10/_modules/django/contrib/postgres/search/#SearchVector to pull results across all the models. |
@darthmdh I could be missing something but I think that's still limited to searching one table (model) at a time. What we want is to search for an instance of a string across many models. |
@jeremystretch The docs claim you can combine SearchVectors with + syntax but looking at the examples its unclear to me if that then makes logical sense when it comes to filter() the results. Unfortunately other than for deployment purposes I haven't yet dived into Django 1.10 to get familiar with this new API. Maybe something like https://github.com/etianen/django-watson is more immediately useful? |
Or, to state the obvious:
The results page has a subsection for devices, a subsection for prefixes, a subsection for addresses etc. Each section is skipped if there are no matches. Each section can be limited to (say) 10 hits, and if you hit the More... link then it does a regular search for that object type only. If the query looks like an IP address then parse it as such, and add the relevant IP address field searches. |
This has been implemented on the |
A search across all sections and all fields. e.g. search for "customerX" and the results page shows Racks, Devices, Circuits etc. that contain any matched field content.
The text was updated successfully, but these errors were encountered: