On 02/04/2013 08:00 PM, Subin wrote:
> I just searched the documentation on how to do this. I'm not able to find
> any other than a brief description about  RT::Search::Googleish here:
> 
> http://bestpractical.com/rt/docs/4.0/RT/Search/Googleish.html

For this customization, you'll need to grok the code.  There are a few comments 
in there to help you get started, but unfortunately the clean way to customize 
simple search isn't documented yet.  Try starting with something like this in 
local/lib/RT/Search/Googleish_Local.pm

package RT::Search::Googleish;

use strict;
use warnings;
no warnings qw(redefine);

our @GUESS;

# Changes the first guess from "subject" to "default" if quoted.  For
# @GUESS handlers, $_[1] is a boolean for quoted or not by the user.
$GUESS[0] = [ 10 => sub { return "default" if $_[1] } ];

# @_ positional params are documented in the main Googleish.pm for
# Handle* subs
sub HandleDefault { return content => "Subject like '$_[1]' OR Content like 
'$_[1]'" }

1;
-- 
Help improve RT by taking our user survey: 
https://www.surveymonkey.com/s/N23JW9T

Reply via email to