Changes onSolr class, converting some words from uppercase to lowercase
This commit is contained in:
22
workflow/engine/classes/class.AppSolr.php
Normal file → Executable file
22
workflow/engine/classes/class.AppSolr.php
Normal file → Executable file
@@ -1213,9 +1213,11 @@ class AppSolr
|
||||
|
||||
// validate phrase in case of < and <=
|
||||
$result1 = strpos($searchText, '<');
|
||||
if($result1 !== FALSE){
|
||||
if($result1 !== false)
|
||||
{
|
||||
$result = strpos($searchText, '<=');
|
||||
if ($result !== FALSE){
|
||||
if($result !== false)
|
||||
{
|
||||
$v1 = str_replace( '<=', '', $searchText );
|
||||
$v2 = str_replace( ':', '', $v1);
|
||||
$v3 = str_replace( '<','' ,':[* TO '.$v2.']' );
|
||||
@@ -1231,9 +1233,11 @@ class AppSolr
|
||||
}
|
||||
// validate phrase in case of > and >=
|
||||
$result2 = strpos($searchText, '>');
|
||||
if($result2 !== FALSE){
|
||||
if($result2 !== false)
|
||||
{
|
||||
$result = strpos($searchText, '>=');
|
||||
if ($result !== FALSE){
|
||||
if($result !== false)
|
||||
{
|
||||
$v1 = str_replace( '>=', '', $searchText );
|
||||
$v2 = str_replace( ':', '', $v1);
|
||||
$v3 = str_replace( '>','' ,':['.$v2.' TO *]' );
|
||||
@@ -1246,18 +1250,20 @@ class AppSolr
|
||||
$v4 = str_replace( '>','' ,':['.$v3.' TO *]' );
|
||||
$searchText = $v4;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// validate phrase in case of |
|
||||
$result2 = strpos($searchText, '|');
|
||||
if($result2 !== FALSE){
|
||||
if($result2 !== false)
|
||||
{
|
||||
$v1 = str_replace( '|', ' TO ', $searchText );
|
||||
$v2 = str_replace( ':', '', $v1 );
|
||||
$v3 = str_replace( '','' ,':['.$v2.']' );
|
||||
$searchText = $v3;
|
||||
}
|
||||
//echo $searchText;
|
||||
|
||||
$formattedSearchText .= $indexFieldName . $searchText;
|
||||
$includeToken = true;
|
||||
}
|
||||
$formattedSearchText .= $indexFieldName . $searchText;
|
||||
$includeToken = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user