Chinese, Japanese and Korean words are not separated by space. If we can invoke Solr (with CJK word-segmentation tools configured) to pre-segment the search keywords, and then re-invoke the Solr to search the segmented words, the search result will be much better. This module applies to this situation.

How to use Usage:
Iin the Search API module, successfully configue to connect to a working Apache Solr server with Chinese word segmenter installed , Then download & enable this module, no configuration via UI.

Project page:
https://www.drupal.org/sandbox/fishfree/2462769

Git:
git clone http://git.drupal.org/sandbox/fishfree/2462769.git solr_pre_segment_search_words
cd solr_pre_segment_search_words

Manual reviews:
https://www.drupal.org/node/2623192#comment-10635950
https://www.drupal.org/node/2625384#comment-10635896
https://www.drupal.org/node/2597211#comment-10635908

Comments

fishfree created an issue. See original summary.

PA robot’s picture

Status: Active » Needs work

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

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.

fishfree’s picture

Issue summary: View changes
fishfree’s picture

I would have done pareview auto-scanning myself, but unfortunately I could not open http://pareview.sh yesterday. Now I can access it, and cleaned up all the errors and warnings.

Could some guys be so kind to review it manually, please? This is my first full module application. I need mentorship and encourage. :-)

fishfree’s picture

Status: Needs work » Needs review
gauravsood91’s picture

Manual Review

Individual user account
Yes: Follows guidelines for individual user accounts.
No duplication
Yes: Does not cause module duplication and/or fragmentation.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements.
3rd party assets/code
Yes: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
Yes: Follows the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
Code doesn't seem to be long/complex enough
Secure code
Yes: Meets the security requirements
Coding style & Drupal API usage
Yes: It follows code and API guidelines.

gauravsood91’s picture

Status: Needs review » Needs work
fishfree’s picture

Thank you, gauravsood91! But this module really solve an important problem for Chinese full text search with Apache Solr. It's not necessary to write long code to make it.

jungle’s picture

There are two continued underscores in naming. One underscore is enough. To rename solr__pre_segment_search_words to solr_pre_segment_search_words.

fishfree’s picture

Thank you, jugle. I modified again and commit again. The original machine name was automatically generated by Drupal project system, so I still can not rename the module folder.

rogical’s picture

Very useful in Chinese Site, I tested and have used in my project now, so far all works good :)

fishfree’s picture

Issue summary: View changes
Status: Needs work » Needs review
Issue tags: +PAreview: review bonus
jungle’s picture

Status: Needs review » Reviewed & tested by the community

A tiny module solves a big problem in Chinese. Working fine for me.

fishfree’s picture

Issue summary: View changes
klausi’s picture

Status: Reviewed & tested by the community » Postponed (maintainer needs more info)
Issue tags: -PAreview: review bonus

manual review:

  1. project page is a bit short, can you extend it with https://www.drupal.org/node/997024 ? What are the dependencies of this module? Search API or Apachesolr module? Do I have to modify my Solr configuration?
  2. "solr_pre_segment_search_words": is quite a long module name, which can be annoying. How about "solr_segment_words" or similar?
  3. This project is too short to approve you as git vetted user. We are currently discussing how much code we need, but everything with less than 120 lines of code or less than 5 functions cannot be seriously reviewed. However, we can promote this single project manually to a full project for you.

Otherwise looks good to me. Do you want to shorten the module name or should I publish the module as "solr_pre_segment_search_words"?

Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

fishfree’s picture

Status: Postponed (maintainer needs more info) » Needs review
Issue tags: +PAreview: review bonus

klausi, thank you very much for your manual review. Let me explain for your questions and suggestions:

  1. This module is mainly for Chinese users. There is a helpful blog link in the README.txt file which describe detailed configuration to Apache Solr server. The dependent module is already described in the project page and the module info file. However, I elaborated the project page today.
  2. I shortened the module machine name to solr_pre_segment. "Pre" is the key point of this module.
  3. This module respects the philosophy "do one thing, do it best". I don't think it necessary to extend redundant codes to meet the minimum code lines requirement.

I did another 3 manual reviews:
https://www.drupal.org/node/2645412#comment-10751008
https://www.drupal.org/node/2643098#comment-10751150
https://www.drupal.org/node/2650742#comment-10754764

klausi’s picture

Status: Needs review » Fixed
Issue tags: +PAreview: single application approval

Thanks for your contribution, fishfree!

I promoted this project for you: https://www.drupal.org/project/solr_pre_segment

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.

klausi’s picture

Now that this experimental project has been promoted, you'll need to update the URL of your remote repository or reclone it.

fishfree’s picture

klausi, thank you for your approval and reminder. I will go on elaborating on this module.

Status: Fixed » Closed (fixed)

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