Okay, so you guys were just waiting for me to figure this out to boost my confidence right? Heh. Well, here's the hacking I've put together. Decide for yourself if it's acceptable.
In the "component\admin\models\extrafield.php" file the problem originates around line 208 at the getSearchValue function due to the fact that the Link type is treated like a multiselect type. The loop compares current values against the options available in the extra fields table and when it finds a match it simply stores the name of that option from the extra fields table as the value to search, Not that actual value (although they are clearly equal).
This method will obviously not work for links due to the fact that there are no options to compare against. So, instead we simply need to store the current array values for Name and Value. (By default the component typically references on the name value for searches, but I wanted to include the link URL as well.)
Here's my hack of the function:
function getSearchValue($id, $currentValue){
$row = & JTable::getInstance('K2ExtraField', 'Table');
$row->load($id);
require_once(JPATH_COMPONENT_ADMINISTRATOR.DS.'lib'.DS.'JSON.php');
$json=new Services_JSON;
$jsonObject=$json->decode($row->value);
$value='';
if ( $row->type=='textfield'|| $row->type=='textarea'){
$value=$currentValue;
}
else if ($row->type=='multipleSelect'){
foreach ($jsonObject as $option){
if (in_array($option->value,$currentValue))
$value.=$option->name.' ';
}
}
else if ($row->type=='link'){
$value.=$currentValue[0].' '; /* Add Name */
$value.=$currentValue[1].' '; /* Add URL */
}
else {
foreach ($jsonObject as $option){
if ($option->value==$currentValue)
$value.=$option->name;
}
}
return $value;
}
Basically all I did was the link type it's own "else if " in order to simply assign the values for name and url. Hope this works for you.
-Rob