[horde] how is searching with turba is supposed to work?
Claas Hilbrecht
claas.hilbrecht+maillinglists.horde at jucs-kramkiste.de
Tue Nov 13 17:38:22 UTC 2012
Hello,
today I get somewhat confused about how the turba addressbook search works.
I've changed the localsql driver to add the fields 'homeEmail' and
'workEmail' (and some other fields too, similar to
<http://wiki.horde.org/TurbaExtraFields>). I've created a
backends.local.php with the following content:
<?php
$cfgSources['localsql']['map'] = array_diff($cfgSources['localsql']['map'],
array("object_cellphone", "object_fax"));
$cfgSources['localsql']['map']['homeEmail'] = 'object_homeemail';
$cfgSources['localsql']['map']['workEmail'] = 'object_workemail';
$cfgSources['localsql']['map']['homeCellPhone'] = 'object_homecellphone';
$cfgSources['localsql']['map']['workCellPhone'] = 'object_workcellphone';
$cfgSources['localsql']['map']['workFax'] = 'object_workfax';
$cfgSources['localsql']['map']['homeFax'] = 'object_homefax';
$cfgSources['localsql']['tabs'][_("Communications")] = array('homeEmail',
'homePhone', 'homeCellPhone', 'homeFax',
'workEmail',
'workPhone', 'workCellPhone', 'workFax',
'assistPhone',
'pager',
'imaddress',
'imaddress2', 'imaddress3');
$cfgSources['localsql']['search'] = array('name', 'email', 'homeEmail',
'workEmail' );
I've also created the required fields at sql database level and I can
use/edit the fields as expected. I didn't get any error messages or
something like that.
Now I start searching the turba addressbook with the minisearch at the
portal page. Previously I've selected all addressbooks as datasources. The
minisearch returns the email address that is stored in 'object_email'
inside the database. I've asked on IRC how the minisearch should worked and
yunosh (sorry don't know realname) says that minisearch should search all
fields of type email and return the first email found in 'object_email',
'object_workemail' or 'object_homeemail'. But as stated before only email
addresses in the 'object_email' are returned. If I change
$cfgSources['localsql']['map'] = array_diff($cfgSources['localsql']['map'],
array("object_cellphone", "object_fax"));
to
$cfgSources['localsql']['map'] = array_diff($cfgSources['localsql']['map'],
array("object_cellphone", "object_fax", "object_email"));
as inspired from
<http://lists.horde.org/archives/horde/Week-of-Mon-20111128/042849.html>
the minisearch now gives the result from the 'object_homeemail' back and
still ignoring 'object_workemail'.
So again, what is the expected behaviour off minisearch. Should it return
the first email found in whatever email_object or is minisearch limited to
only one email column?
Next I tried to search from IMP with autocompletion. This also worked only
for 'object_email' and no other email fields. This seems to be a known
limitation according to the ticket <http://bugs.horde.org/ticket/10913#c2>.
This ticket mentioned that using any other email field like 'workEmail'
instead of 'email' doesn't work for IMP autocompletion. Since this ticket
is created before H5 I would simply get a confirmation that the limitation
is still valid with the current IMP versioh.
Hope someone can throw some light in the dark :)
--
MfG Claas Hilbrecht
More information about the horde
mailing list