Changeset 12972

Show
Ignore:
Timestamp:
10/22/07 15:21:50 (1 year ago)
Author:
rambo
Message:

forward port r12971

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom.helper.search/config/config.inc

    r730 r12972  
    11'search_help_message' => 'lucene', 
    22'results_per_page' => 10, 
     3/** 
     4 * Whether to utomatically add * to single term queries 
     5 * Warning: may lead to unintuitive matches when user enters 
     6 * whole keyword (in stead of just part of it) as the single term 
     7 * (objects containing just the given keyword as written 
     8 * may not get matched since the wildcard part matches nothing) 
     9 */ 
     10'single_term_auto_wilcard' => false, 
  • trunk/midcom/midcom.helper.search/viewer.php

    r12948 r12972  
    147147 
    148148        if (   count(explode(' ', $data['query'])) == 1 
    149             && strpos($data['query'], '*') === false) 
    150         { 
    151             /** 
    152              * If there is only one search term append * to the query 
    153              */ 
     149            && strpos($data['query'], '*') === false 
     150            && $this->_config->get('single_term_auto_wilcard')) 
     151        { 
     152            //If there is only one search term append * to the query if auto_wildcard is enabled 
    154153            $data['query'] .= '*'; 
    155154        }