akiL Mussa
|
Monday 08 November 2004 4:37:56 am
Hi, I'm trying to exclude images from the search. In the file templates/content/search.tpl I'm using the following code:
{let search=false()}
{section show=$use_template_search}
{set page_limit=10}
{set search=fetch(content,search,
hash(text,$search_text,
section_id,$search_section_id,
subtree_array,$search_subtree_array,
sort_by,array('modified',false()),
offset,$view_parameters.offset,
class_filter_type, "exclude",
class_filter_array, array(5),
limit,$page_limit))}
{set search_result=$search['SearchResult']}
{set search_count=$search['SearchCount']}
{set stop_word_array=$search['StopWordArray']}
{set search_data=$search}
{/section}
Is there any problem with this code?
Thanks, akiL
|
akiL Mussa
|
Monday 08 November 2004 6:13:03 am
Silke, Thanks for reply, but it doesn't works. I just cleared all chaches, but the search still showing the images. The images are published like 'content' and not like 'media'. Could this cause this problem ?
|
Silke Fox
|
Monday 08 November 2004 6:57:07 am
akiL,
it shouldn't be a problem to publish images in the 'content' section.
Does debug output give any useful information?
You could check some database tables to find out if the search words are in there - have a look at ezsearch_word and ezsearch_object_word_link.
You might also try to update the search index by script, see http://ez.no/ez_publish/documentation/development/scripting/supplied_scripts/update_search_index. Sorry, no more ideas for now...
|