New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PLAT-10143:adding support for double quotes in esearch #8778
Conversation
|
||
protected static function handleInnerQuotes($searchTerm, $itemType, $itemFieldName) | ||
{ | ||
$searchTermParts = explode(' ', $searchTerm); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Break the text using regex to support - no space between quotes , single or double , any type of whitespace -
"/('|"){1}[^\'\"]+('|"){1}|(\s){1}[^\'\"]+(\s){1}/"
… Orion-15.8.0-PLAT-10143
} | ||
return array($object_to_fill, $props_to_skip); | ||
} | ||
if ($itemType === KalturaESearchItemType::PARTIAL && preg_match_all('/(\'|\"){1}[^\'\"]+(\'|\"){1}|[^\'\"]*/', $searchTerm, $matches)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else
@@ -54,19 +67,88 @@ public static function eSearchItemToObjectImpl(&$eSearchItem, $dynamicEnumMap, $ | |||
} | |||
|
|||
|
|||
private static function shouldChangeToExact($searchTerm, $itemType) | |||
protected static function shouldBeExactWithTrim($searchTerm) | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use regex to make sure it is enclosedInQuationMarks
No description provided.