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