The name of the module: Search Index Options

A detailed description of what it does:

This light-weight module extends the core Search module's functionality by:

- providing a new admin configuration to limit content types for search indexing;
- making only active search modules available for choosing as the default one;
- locking the default search module to prevent it from unselecting;

as shown below:



The core search module scans all the available content, regardless of whether some content types were meant to be searchable at all or not. This kind of design causes extra processing load while indexing and storing lots of unnecessary information in database. The Search Index Options module addresses this problem by letting users to set only desired content types for indexing, thus significantly reducing the load and amount of stored index data.

This is a really small yet very useful module that does not change much except taking over of core search module's single database query.

Project page: https://www.drupal.org/project/search_index

Repo: git clone --branch 7.x-2.x https://git.drupal.org/project/search_index.git

The version: 7.x

Reviews per Review Bonus:

A proposal to clarify the instructions for Project Applications: https://www.drupal.org/project/projectapplications/issues/2957446

https://www.drupal.org/project/projectapplications/issues/2947206#commen...
https://www.drupal.org/project/projectapplications/issues/2954990#commen...
https://www.drupal.org/project/projectapplications/issues/2955142#commen...
https://www.drupal.org/project/projectapplications/issues/2948023#commen...
https://www.drupal.org/project/projectapplications/issues/2955242#commen...

Comments

AltaGrade created an issue. See original summary.

AltaGrade’s picture

Issue summary: View changes
AltaGrade’s picture

Issue summary: View changes
Nandu.Kumar’s picture

Status: Needs review » Needs work

Hi AltaGrade,

See the automated Pareview of your project

https://pareview.sh/pareview/https-git.drupal.org-project-search_index.git

AltaGrade’s picture

Nandu123, thanks for pointing me to the right direction. Cleared all the errors and notices: https://pareview.sh/pareview/https-git.drupal.org-project-search_index.g...

AltaGrade’s picture

Status: Needs work » Needs review

Forgot to change the status

AltaGrade’s picture

Issue summary: View changes
Cyclonecode’s picture

You should also edit the issue summary and add the correct git clone command for your project:

git clone --branch 7.x-2.x https://git.drupal.org/project/search_index.git

There is also standard for modules to remove any data they create when uninstalled. For instance you should remove the
variable 'search_content_types' when your module is uninstalled or perhaps this variable comes from the core search module?

AltaGrade’s picture

Issue summary: View changes

Thanks, Cyclonecode. Done!

AltaGrade’s picture

Issue summary: View changes
AltaGrade’s picture

Issue summary: View changes
AltaGrade’s picture

Issue summary: View changes
Cyclonecode’s picture

I just installed the module in a clean installation where the core search module was initially disabled and when visiting `admin/config/search/settings` I get the following warning message:

* Notice: Undefined offset: 0 in search_index_form_alter() (line 32 of /var/www/html/d7/sites/all/modules/search_index/search_index.module).

Probably because the `search_active_modules` variable does not yet exists.

If I first disable the `search_index` module and then visiting the search configuration page and click save once, then enable `search_index` and visiting the same page then there is no error messages.

This behavior can be tested by simply delete the `search_active_modules` variable from the database.

Cyclonecode’s picture

Status: Needs review » Needs work
AltaGrade’s picture

Status: Needs work » Needs review

Good catch, Cyclonecode, thank you! The bug has been fixed, please review once again.

Cyclonecode’s picture

Great that you solved the php notifications that I mentioned above. I think you should rename the variable search_content_types, prefixing it with the name of your module i.e search_index_content_types. This will make it easier for others to see which module created the variable. I am not sure if this is a standard, but in my opinion it really should be =)

If you look at other modules like syslog, search, simpletest you will see that the variable names almost always are prefixed with the actual name of the module. For instance:

simpletest_httpauth_method
simpletest_httpauth_username
simpletest_httpauth_password
simpletest_clear_results
simpletest_verbose
search_cron_limit
search_logging
syslog_identity
syslog_facility
syslog_format

When this is done I don't see any reason not to mark this as RTBC.

Cyclonecode’s picture

Status: Needs review » Needs work
AltaGrade’s picture

Status: Needs work » Reviewed & tested by the community

Thanks a lot, Cyclonecode!

Done as shown on https://cgit.drupalcode.org/search_index/commit/?id=dd7265425237b82c4bff...

Is it ok if I mark this RTBC? Or that should be done by other community members?

Cyclonecode’s picture

You should not mark your own issue as RTBC, but I was anyway suppose to do this now so I guess it does not matter =)

AltaGrade’s picture

Noted for posterity cases. Thanks!

Cyclonecode’s picture

Feel free to assign any credit for the help in this process as per:
https://www.drupal.org/drupalorg/blog/a-guide-to-issue-credits-and-the-d...

AltaGrade’s picture

Feel free to assign any credit for the help in this process as per: https://www.drupal.org/drupalorg/blog/a-guide-to-issue-credits-and-the-d...

That page is really TL;DR :) to grasp for especially new users like me. I thought I was giving you appropriate credits while committing new changes. If you look at https://www.drupal.org/node/2955636/commits, then you will count three times your nick name mentioned. Am I doing something wrong with assigning credits too? Save me from that TL;DR and tell me what's the right way and I'll definitely credit you for all your help.

AltaGrade’s picture

Title: [D7] Search Index » [D7] Search Index Options
Issue summary: View changes
AltaGrade’s picture

Ok, now when its RTBC I wonder how long it usually takes to get approved?

apaderno’s picture

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

Thank you for your contribution!
I am going to update your account so you can opt into security advisory coverage now.
These are some recommended readings to help with excellent maintainership:

You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, 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.

I thank all the dedicated reviewers as well.

apaderno’s picture

Status: Fixed » Closed (fixed)

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