Apache Solr support for CVS statistics
Dries - February 12, 2009 - 13:33
| Project: | CVS integration |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
| Issue tags: | drupal.org redesign |
Jump to:
Description
Attached is a first draft of a patch required to implement the 'Most active' project blocks in the Mark Boulton designs.
| Attachment | Size |
|---|---|
| apache-solr-support.patch | 1.18 KB |

#1
A)
+ // TODO: ideally we'd be able to return statistics per branch but that+ // informaiton is not available in the CVS tables.
Sure it is. What do you think the {cvs_files}.branch field is about? ;)
B)
$interval = 60 * 60 * 24 * 30 * 2; // 2 monthsSeems like a nice thing to use a variable for so it's possible to alter this behavior without changing the code.
C) Probably wise to ensure the node you're indexing is a project that has CVS configured at all before doing any of the rest of this. For example, add this to the top of the function:
<?phpif (empty($node->cvs['directory'])) {
return;
}
?>
That'll help with the "we need to optimize this" part too, since then you're only doing the nasty query on project nodes, not every node we try to index.
#2
Even better would be using project_use_cvs() instead of directly inspecting $node->cvs['directory'], no?
#3
Linking this from the Redesign project #661680: Meta issue for CVS integration because this issue was tagged 'drupal.org redesign'