Yeah, I think that is something you will struggle with.
Below is code I use to map data so can searxh better and easier
// BeforeRender
// Get values currently stored in form
// Add to JSession
$cckMap['start']['lesson_files'] = explode(',', $fields['choose_lesson_files']->value);
$cckMap['start']['external_link'] = explode(',', $fields['choose_external_link']->value);
$cckMap['start']['11th_fret'] = explode(',', $fields['choose_11th_frets']->value);
$cckMap['start']['skills_concepts'] = explode(',', $fields['choose_skills_concepts']->value);
$cckMap['start']['bands_artists'] = explode(',', $fields['choose_bands_and_artists']->value);
$session = JFactory::getSession();
$session->set('cck_map', $cckMap);<br>
// AfterStore
// Update table with new values or delete from table if no longer required
// Get a handle to the Joomla! application object
$application = JFactory::getApplication();
$session = JFactory::getSession();
$cckMap = $session->get('cck_map'); // the array of initial values
// Make end strings in to array
// e.g. $cckMap['end']['blog_types'] = array;
$cckMap['end']['lesson_files'] = explode(',', $fields['choose_lesson_files']->value);
$cckMap['end']['external_link'] = explode(',', $fields['choose_external_link']->value);
$cckMap['end']['11th_fret'] = explode(',', $fields['choose_11th_frets']->value);
$cckMap['end']['skills_concepts'] = explode(',', $fields['choose_skills_concepts']->value);
$cckMap['end']['bands_artists'] = explode(',', $fields['choose_bands_and_artists']->value);
// cck type i.e. some_content_type
$cckMap['cck'] = $fields['cck_value']-> live_value;
// CLEAN ARRAYS (remove duplicates)
foreach ($cckMap['start'] as $k => $v)
{
$cckMap['start'][$k] = array_filter($v);
}
foreach ($cckMap['end'] as $k => $v)
{
$cckMap['end'][$k] = array_filter($v);
}
// test if like to
// foreach($cckMap['start'] as $k => $v)
// {
// foreach($v as $k2 => $v2)
// {
// JFactory::getApplication()->enqueueMessage($k2.' = '.$v2, 'message');
// }
// }
// foreach($cckMap['end'] as $k => $v)
// {
// foreach($v as $k2 => $v2)
// {
// JFactory::getApplication()->enqueueMessage($k2.' = '.$v2, 'message');
// }
// }
// if deletion or creation required, Get a db connection.
$db = JFactory::getDbo();
// DELETE MAPS
foreach ($cckMap['end'] as $k => $v)
{
// $v = array()
foreach ($cckMap['start'][$k] as $k2 => $v2)
{
// if start value is not in end array....
if (!in_array($v2, $v))
{
$db->clear($query);
$query = $db->getQuery(true);
$conditions = array(
$db->quoteName('pk') . ' = ' . $config['pk'],
$db->quoteName('cck') . ' = ' . $db->quote($cckMap['cck']),
$db->quoteName('fk') . ' = ' . $v2,
$db->quoteName('fk_cck') . ' = ' . $db->quote($k)
);
$query->delete($db->quoteName('#__cck_map'));
$query->where($conditions);
$db->setQuery($query);
$deleted = $db->execute();
}
}
}
// CREATE MAPS
foreach ($cckMap['start'] as $k => $v)
{
// $v = array()
foreach ($cckMap['end'][$k] as $k2 => $v2)
{
// if end value is not in start array....
if (!in_array($v2, $v))
{
// Create and populate an object.
$cckMapAdd = new stdClass();
$cckMapAdd->pk = (int) $config['pk'];
$cckMapAdd->cck = $cckMap['cck'];
$cckMapAdd->fk = (int) $v2;
$cckMapAdd->fk_cck = $k;
// Insert the object into the #__cck_map table.
$cckMapAdded = JFactory::getDbo()->insertObject('#__cck_map', $cckMapAdd);
}
}
}
<br>
I store this in a free table, though you could do this with a Seblod Content Type ie create a content type based on Article Object and create/delete that way.
Then need to do Search Join on your List and Search types to get results required.