Skip to content
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

Merged
merged 5 commits into from Sep 23, 2019

Conversation

@ravitshalem
Copy link
Contributor

ravitshalem commented Sep 19, 2019

No description provided.

protected static function handleInnerQuotes($searchTerm, $itemType, $itemFieldName)
{
$searchTermParts = explode(' ', $searchTerm);

This comment has been minimized.

Copy link
@MosheMaorKaltura

MosheMaorKaltura Sep 22, 2019

Contributor

Break the text using regex to support - no space between quotes , single or double , any type of whitespace -
"/('|"){1}[^'"]+('|"){1}|(\s){1}[^'"]+(\s){1}/"

}
return array($object_to_fill, $props_to_skip);
}
if ($itemType === KalturaESearchItemType::PARTIAL && preg_match_all('/(\'|\"){1}[^\'\"]+(\'|\"){1}|[^\'\"]*/', $searchTerm, $matches))

This comment has been minimized.

Copy link
@MosheMaorKaltura
@@ -54,19 +67,88 @@ public static function eSearchItemToObjectImpl(&$eSearchItem, $dynamicEnumMap, $
}
private static function shouldChangeToExact($searchTerm, $itemType)
protected static function shouldBeExactWithTrim($searchTerm)
{

This comment has been minimized.

Copy link
@MosheMaorKaltura

MosheMaorKaltura Sep 22, 2019

Contributor

Use regex to make sure it is enclosedInQuationMarks

@ravitshalem ravitshalem merged commit 5360a74 into Orion-15.8.0 Sep 23, 2019
@ravitshalem ravitshalem deleted the Orion-15.8.0-PLAT-10143 branch Sep 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.