-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Combining Search View and Docsearch #6341
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
Comments
I don't have the full context for this, but from the description, it seems a good path forward to me. I have some questions:
I'd say to go ahead with this if the combination is simple and does not change the current behavior. I don't think this is in our current roadmap and my concern is not having too much time for review if the PR grows too much. |
I think the main concern is around shipping rendered HTML over the API. We're starting to move away from HTML API responses to JSON responses that are built on the client side. What are the benefits of the HTML approach, when we're using the JSON approach already in the doc pages? |
@stsewd can I start working on the issue |
@Blackcipher101 this issue has the |
@stsewd fine |
Looks like user and filter_by_user are still needed in .com for filtering results in the dashboard (#6341). But it can be removed from tests.
Currently we are serving the search results from two locations:
This creates many problems:
It will be better if we have one API endpoint for both the use cases.
Proposed Solution:
For this, we can make use of TemplateHTMLRenderer along with JSONRenderer.
Django Rest Framework allows multiple renderer_classes to be defined in a view. We can have renderer classes for json and html. We can continue serving the docsearch with the json response and for main site search we can have search-as-you-type. As soon as the user starts typing, we will get new API response in html form and we can render that as it is.
The text was updated successfully, but these errors were encountered: