I am here to share about Drupal's Search Module limitations & solution to overcome it.

Limitation:- Drupal's Search Module provides search results on the basis of exact keyword match. i.e. when we search a word like 'what' in our website, it give results only where the word 'what' exactly matches & it doesn't include words like 'whatever' in search results. It concludes that Search module executes search query with a EQUAL(=) condition in WHERE clause but we always require results from a search query with a LIKE condition in WHERE clause.

Solution:- We need to create our own custom Search module with same features exactly the Drupal's Search module but with LIKE condition based search query. As we have created a custom search module for reference, you can use & modify it according to your requirement.

You all are free to ask/share anything regarding this.

Project Link:- http://drupal.org/sandbox/annkit87/1597860
Git Repository Link:- http://drupalcode.org/sandbox/annkit87/1597860.git
Version Compatibility:- Drupal 7

Review of other projects:-
http://drupal.org/node/1771086#comment-6436734
http://drupal.org/node/1773848#comment-6556674
http://drupal.org/node/1736430#comment-6437586

Comments

developers_rtpl’s picture

Priority: Normal » Critical
developers_rtpl’s picture

StatusFileSize
new2.8 KB

Revised Custom Search module.

developers_rtpl’s picture

Project: Developer Custom Search » Drupal.org security advisory coverage applications
Issue summary: View changes

We have reviewed other projects.

developers_rtpl’s picture

Project: Drupal.org security advisory coverage applications » Developer Custom Search

Added tag: PAReviews: review bonus as outlined on http://drupal.org/node/1410826

developers_rtpl’s picture

Project: Developer Custom Search » Drupal.org security advisory coverage applications
Component: Code » module
Assigned: developers_rtpl » Unassigned
Priority: Critical » Normal
jvdurme’s picture

Status: Needs review » Needs work

Hi there,

It appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.

There are still a lot of code standard errors. Please fix them first, you can see them here: http://ventral.org/pareview/httpgitdrupalorgsandboxannkit871597860git

Also change the git repository link to

git clone http://git.drupal.org/sandbox/annkit87/1597860.git developer_custom_search

Manual review:

line 61: use t('Search Results')

cu,

Joost

dharam1987’s picture

Hello,

Your project has many errors listed under the Drupal Code Sniffer, as mentioned by jvdurme, here is the link

http://ventral.org/pareview/httpgitdrupalorgsandboxannkit871597860git

Manual Review

1- The queries which you have written are correct but are not secure, please check here for further instructions http://drupal.org/writing-secure-code

2- For all anchor tags do not use direct markup use l() instead, http://api.drupal.org/api/drupal/includes%21common.inc/function/l/7

3- use arg() function of drupal instead of exploding the query string, reference - http://api.drupal.org/api/drupal/includes!bootstrap.inc/function/arg/7

Thanks

klausi’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

klausi’s picture

Issue summary: View changes

Add one more link under Review of other projects