104 |
} |
} |
105 |
return unless (defined($args->{'words'})); |
return unless (defined($args->{'words'})); |
106 |
|
|
107 |
my $words = $args->{'words'}; |
my $words = lc($args->{'words'}); |
108 |
|
|
109 |
# chop leading and trailing spaces |
# chop leading and trailing spaces |
110 |
$words =~ s/^\s+//; |
$words =~ s/^\s+//; |
111 |
$words =~ s/\s+$//; |
$words =~ s/\s+$//; |
112 |
|
|
113 |
|
my @words = split(/\s+/,$words); |
114 |
|
|
115 |
my %usage; |
my %usage; |
116 |
foreach (split(/\s+/,$words)) { |
foreach (@words) { |
117 |
$usage{$_}++; |
$usage{$_}++; |
118 |
} |
} |
119 |
|
|
123 |
" path: ",$args->{'path'} |
" path: ",$args->{'path'} |
124 |
); |
); |
125 |
|
|
126 |
foreach my $word (keys %usage) { |
foreach my $word (@words) { |
127 |
|
|
128 |
$self->tree($args->{'index_name'})->B_search( |
$self->tree($args->{'index_name'})->B_search( |
129 |
Key => $word, |
Key => $word, |