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