In several places throughout the redesigned sections there is a list of most popular X. See: https://infrastructure.drupal.org/drupal.org-style-guide/prototype/downl...
Which has: Installation profiles, Themes, Translations, Most installed, Most active, etc. Some of these stats could be the source for selecting what to recommend on these pages.
We keep statistics in the following two tables:
project_usage_week_project and project_usage_week_release
We need access to:
Create views based on some of these stats.
The project stats at http://drupal.org/project/usage, are we believe are implemented as a page callback from project/project_usage/includes/pages.inc
Statistics are stored by week, probabaly all we need field-wise is "project-wide usage count for most recent completed week"
Feedback about how to implement this would be appreciated.
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | project_solr_simple_query-666120-17.patch | 3.25 KB | mikey_p |
| #16 | project_solr_simple_query-666120-16.patch | 3.93 KB | mikey_p |
Comments
Comment #1
bdragon commentedThings are stored in {project_usage_week_project} by project nid, week-timestamp, and tid (of core version).
Summing on count and grouping by nid should suffice for getting project popularity. Haven't thought about the speed implications of this. It may be manageable if it's cached somewhat.
Timestamp:
Comment #2
bdragon commentedComment #3
damien tournoud commentedThose need to go into the solr index. We don't actually need Views.
Comment #4
damien tournoud commentedAlso: usage statistics are already in the solr index. So those are already covered.
Comment #5
jwilson3@Damien Tournoud: Can the implementers make use of the solr index of usage statistics (via some sort of query protocol?) to do things like:
"show an html unordered list of the 5 most popular modules"
"show an html unordered list of the 3 most popular translations"
"show an html unordered list of the 3 most popular installation profiles"
If so, then also, some examples on how to do this (or where to look for example code) would be really helpful too.
Comment #6
damien tournoud commented@jrguitar21: the first step is to get all that information into the solr index. Let's concentrate on this for now.
* "Most Installed" is already in solr,
* "New modules" is just a fancy name for node.created,
* "Top Rated" and "Most reviewed" need to be clarified (aren't those basically the same?),
* "Most Downloaded" can be derived from the download log,
* "Most Active" needs to be specified
Comment #7
Amazon commentedDanithaca is working on this as part of his pivots recommendation system. So when his social feedback on modules starts we can incorporate these.
One possible measurement is to look at issue queue and release activity. We run this risk of these being gamed/made irrelevant but let's figure out how to reward projects that are responsive to issues, and have lots of participation from the community.
I'll loop Joe Golden into the discussion regarding downloaded.
Comment #8
dwwThe usage summary data are in relatively small tables that are well indexed. I'm not sure we necessarily want to use solr for the original request here. Seems like a relatively trivial patch to project_usage to expose these tables to views. I don't see what we gain by doing this via solr vs. views. @DamZ: care to elaborate why a custom solr-based solution that very few people understand is better than using views which basically all of the redesign implementors are/should be familiar with?
Also, as of comment #6, this issue is turning into a giant meta rathole that's rehashing discussions like http://groups.drupal.org/node/7191. Are we sure we want to go there? ;) Why don't we actually accomplish the specific task at hand? *shrug*
Cheers,
-Derek
Comment #9
chrisstrahl commentedAs one of the implementation firms, it's going to be pretty challenging for us to implement this as a solr index. We haven't done it before, and we don't know the project module or project_usage well enough to handle this quickly/easily on our own.
Consider this a vote for exposing this stuff to views, or, if we go the solr index route, a guide on how to implement it for the redesign as so many of us need this data for our sections.
Comment #10
damien tournoud commented@dww: those metrics are used to power the facet-based project browsing.
The project browsing starts with the download landing page:
https://infrastructure.drupal.org/drupal.org-style-guide/prototype/downl...
And it continues at modules and themes:
https://infrastructure.drupal.org/drupal.org-style-guide/prototype/modul...
https://infrastructure.drupal.org/drupal.org-style-guide/prototype/theme...
The blocks on the right of those pages are facets and/or ordering of the current query.
I don't understand why we should do twice the work: once to design the download page and once for the browsing facets/ordering. Once we will have supplied those facets/ordering to solr, building the download page will be trivial.
Comment #11
jwilson3This issue is related to #372243: Expose project statistics to the solr index, just linking them together here for historical purposes.
Comment #12
Amazon commentedA quick update.
We know that the 7 Download and Extend sponsor teams have been waiting on this. So have the several Search results teams.
Here's the new code:
https://svn.drupal.org/drupal/drupal.org/redesign/sites/all/modules/drup...
https://svn.drupal.org/drupal/drupal.org/redesign/sites/all/modules/drup...
We are looking for people to review this code and help document it so that teams can understand how to make use of existing project browsing blocks, facets for Drupal versions, and how to accurately describe new Solr implemented search results blocks to be created.
Comment #13
dwwThe identical effort was started at #372243: Expose project statistics to the solr index and it's pointless to have two issues about the same thing. Let's consolidate on the older issue.
Comment #14
dwwActually, upon further thought, let's repurpose this issue for the other aspect of this effort... building blocks for the top N projects in various categories like "most used", "most downloaded", whatever. We'll use #372243 for making sure everything we care about is in the solr document. This issue will be about adding some API calls in project_solr for returning these lists of the top N hits for a given constraint, and code to expose these lists as blocks that can be stuffed into the main download and extend landing page (and other places in the project browsing pages in the redesign). In many (most?) cases, this code doesn't belong in drupalorg but in project_release or project_solr.
Comment #15
mikey_p commentedThere is a start of a module that does this on #862240: Provide additional solr facets for advanced project browsing. However that module currently duplicates part of what is in HEAD of drupalorg.module (mainly the menu callback, preprocess, and the tpl.php). Overall the version in drupalorg.module seems to be a bit more up to date and more central, and I'd recommend keeping that template and page callback there, and moving the solr related bits into project_solr, as an API described in this issue, that can be consumed by drupalorg.module.
Comment #16
mikey_p commentedHere's a simple version that does this sort of code, based loosely on project_solr_browse_page().
In order to make this a more strict API, no code in this function checks any URL paramaters, and no path is passed to construct ProjectSolrQuery.
With some additional refinement, it may be possible for project_solr_browse_page to become dependent on this function.
Comment #17
mikey_p commentedI removed some paging gunk that was left in, as well as an un-needed field alias.
Comment #18
hunmonk commentedadding redesign tags
Comment #19
dwwthe "... and expose these lists as blocks" part is actually already provided by drupalorg_order_facet.module, although that should be in apachesolr: #868794: Add an apachesolr_result_block module to render solr facet results as blocks.
Given that, it's not clear we actually care about this API function at all. We can probably do everything we need with result blocks. It seems like an API for returning these lists is perhaps duplicate effort. So, likely this issue should be "won't fix", but I'll leave it open for now...
Comment #20
dwwWe've solved this entirely via Solr, so I don't think we want an API like this anymore. We've got something similar enough via #868794 (which is currently functionality in drupalorg_search but it should hopefully move into apachesolr).