-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Order search results by most viewed pages #5968
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
Do you have an idea about how to implement this? I have some questions:
|
@humitos
HTMLFile object seems to be the right place -- but they get deleted and recreated after every build, so we will lost all the data
We want the data into elasticsearch -- so yes
We can use Google Analytics, I don't know if they have an API for this or something else.
Once we have the data, I don't think it should be very complicated. I will research about this point. @davidfischer Can we somehow use Google Analytics here? |
Some simple thoughts on this: Storing the dataWe can store the data in a separate model. We can't store in HTMLFile model because these gets deleted and recreated after a build. Also, no use of ForeignKey because we don't want the relationships to be null when improted files objects are deleted and recreated. Updating the dataI believe we can have API endpoint for it. Send a API request as soon as the page loads which increases its count by one. Syncing the data with elasticsearchJust a query to our new "count model" should be enough to get the data. cc: @ericholscher |
I think we should likely update it via the footer API, not with JS. I think it should basically work exactly the same as the Search Analytics, except that we aggregate the counts by day for each (project/version/page) grouping. We should likely do the same for Search Analytics, where we aggregate the I think the main goals here are how we want to query/display the data. I'm imagining similar to search analytics:
I'm imagining something similar to this: https://github.com/readthedocs/readthedocs.org/graphs/traffic -- but we likely won't track referrer to start. |
@ericholscher |
I'm proposing another solution for this in #7082. The problem here, is that new pages (like docs for a new api) are going to be ranked lower in this case, but we actually want those pages to have a higher rank. |
I think we're not moving forward with this idea because of the complexity (ref #7297 (comment)). Closing this issue. |
Currently the order of the search results don't consider the
number of views
of a page.It would be good if search results gets ordered based on the
number of views
parametere.The text was updated successfully, but these errors were encountered: