For those who want to search the whole title (not just beginning)

you can simply add "%". to the search query in the code:

function node_quick_find_autocomplete($delta = 0, $string = '') {
  $settings = variable_get('node_quick_find_'. $delta, array());

  $matches = array();
  if ($string) {
    $string = "%" . drupal_strtolower($string);

Comments

derjochenmeyer’s picture

Here is a patch that fixes a permissions problem and also adds results to the quickfind box that contain the query string (not just begin with the string).

#416586: Add db_rewrite_sql to respect users permissions for search results

nicholasthompson’s picture

Status: Active » Closed (won't fix)

Cheers guys...

There is a reason Node Quick Find doesn't do a double-end search... Indexes. Searching with Indexes is blazing fast. Searching without is (or can be) very slow.

A B-tree index can be used for column comparisons in expressions that use the =, >, >=, <, <=, or BETWEEN operators. The index also can be used for LIKE comparisons if the argument to LIKE is a constant string that does not start with a wildcard character.

From: http://dev.mysql.com/doc/refman/5.0/en/mysql-indexes.html

vako’s picture

Thanks for the module and explanation Nicholas. But at least give an option to the user to choose between the two, with a warning that the non-indexed version will be slower.