Lines 1585-1591
sub _build_initial_query {
Link Here
|
1585 |
my $operator = ""; |
1585 |
my $operator = ""; |
1586 |
if ($params->{previous_operand}){ |
1586 |
if ($params->{previous_operand}){ |
1587 |
#If there is a previous operand, add a supplied operator or the default 'and' |
1587 |
#If there is a previous operand, add a supplied operator or the default 'and' |
1588 |
$operator = ($params->{operator}) ? " ".($params->{operator})." " : ' and '; |
1588 |
$operator = ($params->{operator}) ? ($params->{operator}) : 'and'; |
1589 |
} |
1589 |
} |
1590 |
|
1590 |
|
1591 |
#NOTE: indexes_set is typically set when doing truncation or field weighting |
1591 |
#NOTE: indexes_set is typically set when doing truncation or field weighting |
Lines 1593-1606
sub _build_initial_query {
Link Here
|
1593 |
|
1593 |
|
1594 |
#e.g. "kw,wrdl:test" |
1594 |
#e.g. "kw,wrdl:test" |
1595 |
#e.g. " and kw,wrdl:test" |
1595 |
#e.g. " and kw,wrdl:test" |
1596 |
$params->{query} .= $operator . $operand; |
1596 |
$params->{query} .= " " . $operator . " " . $operand; |
1597 |
|
1597 |
|
1598 |
$params->{query_cgi} .= "&op=".uri_escape_utf8($operator) if $operator; |
1598 |
$params->{query_cgi} .= "&op=".uri_escape_utf8($operator) if $operator; |
1599 |
$params->{query_cgi} .= "&idx=".uri_escape_utf8($params->{index}) if $params->{index}; |
1599 |
$params->{query_cgi} .= "&idx=".uri_escape_utf8($params->{index}) if $params->{index}; |
1600 |
$params->{query_cgi} .= "&q=".uri_escape_utf8($params->{original_operand}) if $params->{original_operand}; |
1600 |
$params->{query_cgi} .= "&q=".uri_escape_utf8($params->{original_operand}) if $params->{original_operand}; |
1601 |
|
1601 |
|
1602 |
#e.g. " and kw,wrdl: test" |
1602 |
#e.g. " and kw,wrdl: test" |
1603 |
$params->{query_desc} .= $operator . ( $params->{index_plus} // q{} ) . " " . ( $params->{original_operand} // q{} ); |
1603 |
$params->{query_desc} .= " " . $operator . " " . ( $params->{index_plus} // q{} ) . " " . ( $params->{original_operand} // q{} ); |
1604 |
|
1604 |
|
1605 |
$params->{previous_operand} = 1 unless $params->{previous_operand}; #If there is no previous operand, mark this as one |
1605 |
$params->{previous_operand} = 1 unless $params->{previous_operand}; #If there is no previous operand, mark this as one |
1606 |
|
1606 |
|