234 |
$template =~ s{Q}{$v}; |
$template =~ s{Q}{$v}; |
235 |
$whitespace = " AND " if $whitespace; |
$whitespace = " AND " if $whitespace; |
236 |
|
|
237 |
|
# don't return -* &* and other non-word characters |
238 |
|
return '' if $template =~ m/^\W\*$/; |
239 |
|
|
240 |
return |
return |
241 |
$whitespace . |
$whitespace . |
242 |
$attr . '="' . $template . '"'; |
$attr . '="' . $template . '"'; |
265 |
$q .= ' AND ((' . join(') OR (', map { "input=\"$_\"" } @only_input) . '))' if @only_input; |
$q .= ' AND ((' . join(') OR (', map { "input=\"$_\"" } @only_input) . '))' if @only_input; |
266 |
|
|
267 |
warn "# query: $q\n"; |
warn "# query: $q\n"; |
268 |
my $swish_results = $swish->query( $q ); |
my $search_obj = $swish->new_search_object; |
269 |
|
if ( my $sort = param('sort') ) { |
270 |
|
$search_obj->set_sort( $sort ); |
271 |
|
} |
272 |
|
my $swish_results = $search_obj->execute( $q ); |
273 |
|
|
274 |
dump_yaml( 'swish_results', $swish_results ); |
dump_yaml( 'swish_results', $swish_results ); |
275 |
|
|