hi,
i have some problems getting the search function to search the image titles. all my images have the image title field populated. i have tick the image title box in the search option panel and yet the search engine do not return pictures that as the keyword in the image title field. am i missing something else ?
thanks for your help,
frank.
my search setup or option is that a space is taken as a "space". if i change that for "OR" or "AND" it does not make a lot of difference. my search is still incomplete. maybe my previous post was not clear enough about the different titles.
all my images have a title which is correctly searched. but they also all have a metadata title which is not searched. yet in the search panel both "Title" and "Image Title" are ticked. I thought they were corresponding to the image title and the metadata title, respectively and therefore should both be searched, but maybe that is where i am wrong.
basically i have a gallery of photos from new york city. they all have "new york" in the metadata image title. 2 images also have it in the title. when i search on "new york" i end up with the 2 pictures that have "new york" in the title. all other pictures are skipped.
thanks for your help,
frank.
Generally Zenphoto will add the metadata title as the title in the db when it discovers the images. Of course it can't search the actual metadata in the image file itself as it can't add data to images. If you changed the image titles after uploading them, you might want to do a meta data refresh.
i am really feeling i am doing something stupid...
i have refreshed the metadata in the admin panel. i even checked using myphpadmin that the fields in the database were populated. and for sure the "title" field as well as the "EXIFDescription" field (the metadata image title shown when we expand the image data in the admin panel) is also populated. and still the search only returns photos that have the keyword in their title, omitting the ones with the keywords in the EXIFDescription (or metadata title).
i have also try to refresh the database from the admin panel but to no avail.
frank.
I guess I am really not following this. But it sounds like you are saying that the search function is not returning images where the EXIFDescription contains some matching string. Yet you have not enabled the search of that field.
Please remember that these fields are literal. If you are searching the title field that is the only field that gets looked at. Not some other field which might have the string 'title' in it.
Frankm, might you be confusing the EXIF metadata title within the image file itself with the "Title" database field that ZenPhoto is using? It does get a little confusing that both EXIF and IPTC both have several fields with semi-ambiguous names, any of which may or may not be used, and may or may not match other similar fields. And these are all entirely different from the image title you can set in the Album/Image editor from the Admin interface.
thanks for all your answers. to make sure that i was not ticking the wrong search field in the search option panel, i ticked all of them, saved the config and run a new search. still the same.
@sbillard, when you talk about enabling the EXIFDescription, is there a box to tick in the search field list, because i don't see any.
@bdragonfly, what i call the metadata title is the one i get with this short bit of code
$mymeta = getImageMetadata();
echo $mymeta['EXIFDescription'];
and it seems to correspond to what is called "image title" when we look at the image metadata in the "images" tab of the admin panel (after "showing more fields").
again thanks for your help.
francois.
yes i did that a long time ago. i thought you were referring to really a field labelled EXIFDescription. what is currently ticked in the back-end options is:
i might just reinstall zenphoto, maybe i messed up something in the process. i will download the latest night build and try again. thanks for your help.
frank.
hi,
well without any intention to hack the code because i am far from being a php coder or developer, i took a look at the class-search.php file.
what i found is that the query $fieldsql doesn't include EXIFDescription in it. the thing is the fieldname must be in the $columns array and so far in the $columns array everything is written in lowercase (must be due to the strtolower instruction). any way because the actual fieldname is EXIFDescription, it doesn't match the exifdescription label in the $column array and therefore doesn't make it through the if ($fieldname && in_array($fieldname, $columns)) instruction.
could my problem be coming from that ??
i am using zenphoto version 1.2.9 [5374].
frank.
ps: i forgot all of this is in the searchFieldsAndTags function somewhere around line 700 or so.
me again...
in the searchFieldsAndTags function, i have replaced $columns[] = strtolower($row['Field']); by $columns[] = $row['Field']; on line 729 and now the search engine returns all the images correctly even those with the keywords in their EXIFDescription (or image title).
thanks all for your help. i hope my problem helps to fine tune the code.
frank.