Name
apachesolr_repeating_dates

Description
This module works to enhance search behaviour when using the apachesolr module and repeating date fields from the date module.

The default behaviour for apachesolr is to index each document once, describing the repeated dates as an array. This module alters the document index process and adds a unique document for each instance of the repeated date.

What this means is that nodes with repeating dates will appear multiple times in the result set (allowing themers to group by date). Users are also able to sort by the date field that was before impossible.

Sandbox
https://drupal.org/sandbox/ls206/2268095

Git clone
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/ls206/2268095.git apachesolr_repeating_dates

PAReview
Review is clean and returns no errors/warnings.

Manual reviews
https://drupal.org/node/2209529#comment-8799331
https://drupal.org/node/2224587#comment-8805897
https://drupal.org/node/2229161#comment-8803437
https://drupal.org/node/2236587#comment-8800043
https://drupal.org/node/2302793#comment-8997569
https://drupal.org/node/2308911#comment-8997617

Comments

sawtell’s picture

Issue summary: View changes
PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

fr3shw3b’s picture

Issue summary: View changes
Smartling’s picture

Please follow this template for the readme file:
https://drupal.org/node/2181737

Smartling’s picture

apachesolr_repeating_dates.db.inc

/**
* Retrieve all fields stored in the module table.

I don't think it's about the "module" table. Please fix the comments in the *.db file.

function _apachesolr_repeating_dates_prepare_field - is declared in *.module file but used only in *.db. I think you should move it to *.db file.

$entity_fields = field_info_instances('node', $entity->type);

If it's applicable to nodes only, please make a not about that in description and readme.

Some more questions:
1. Don't we need to implement some actions on module uninstall?
2. It would be nice to have some real-life use-cases for the module on the project page.
3. And also pay attention that in the last commit you deleted a function that is in use in the *.install file:

$fields = apachesolr_repeating_dates_get_field_instances();

Best regards,
Smartling

sawtell’s picture

Hi Smartling,

Thank you for taking the time to review.
I agree with the points you've made and have updated the module accordingly.

In terms of the uninstall actions, I believe the only thing that is not handled automatically is the changes in the Solr index.
To resolve this the index would need to be deleted and reindexed, this however, is an action that is probably best for the user to complete.

I have added a simple Drupal message on uninstall and a section in the README to explain this.

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxls2062268095git

I'm a robot and this is an automated message from Project Applications Scraper.

sawtell’s picture

Finally got rid of the PA review notices.

sawtell’s picture

Issue summary: View changes
sawtell’s picture

Status: Needs work » Needs review
sawtell’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus
pushpinderchauhan’s picture

@ls206, thanks for your contribution.

Manual Reviews:
1. You are adding file through following code but you can also use module_load_include function for this.

require_once 'includes/apachesolr_repeating_dates.db.inc';

It should be something like this:

module_load_include('inc', 'apachesolr_repeating_dates', 'includes/apachesolr_repeating_dates.db');

2. Your project page contains few information, can you extend this little bit more it would be more useful :)
3. Also add hook_help() in your module file.

I would manually test your module once I'll get some time in next few days and come back to you :)

Thanks Again!

sawtell’s picture

Hi Pushpinder,

Thanks for taking the time to review.

With regards to point 1. I remember reading somewhere that it was best practice to use require_once() outside of function calls (and module_load_include() within). However, I can't find the source of that comment now so I have changed to module_load_include. :)

I have updated the project page and implemented hook_help() as per your suggestions.

Cheers.

klausi’s picture

Assigned: Unassigned » stborchert
Status: Needs review » Reviewed & tested by the community

Review of the 7.x-1.x branch (commit 62ab877):

  • No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

I'm not that familiar with Date repeat and Apachesolr module but the code looks RTBC to me after a manual review.

Assigning to stBorchert as he might have time to take a final look at this.

sawtell’s picture

Thanks klausi,

I've not written test before so I will take a look at the documentation.

Cheers.

stborchert’s picture

Assigned: stborchert » Unassigned
Status: Reviewed & tested by the community » Fixed

Thanks for your contribution, Louis!

I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

One minor note to the module itself: it would be great if you could turn the feature on and off per index so in one index the repeated dates are split into several search results and in another index the document is indexed as one.

sawtell’s picture

Hi stBorchert,

Thank you for your review, I'm very excited to be able to promote this project.
I'll be sure to read through those suggested articles and I've added your suggestion to the module issue queue, definitely a feature to implement.

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.