Forums / Setup & design / 3.2 -> Is it possible to exclude some classes from the search ?

3.2 -> Is it possible to exclude some classes from the search ?

Author Message

laurent le cadet

Sunday 07 December 2003 3:24:07 am

Hi,

I want to exclude some classes from the search engine (image for example).

Is it possible ?

Thanks.

Laurent

17/12
Till impossible ? ;-)

Claus Jensen

Wednesday 17 December 2003 6:12:28 am

Hi Laurent,
Yes its possible, check out:
http://www.ez.no/developer/ez_publish_3/documentation/development/libraries/ez_template/operators/data_fetch

and:
http://www.ez.no/developer/ez_publish_3/documentation/customization/components/search/search_operator

cheers,
claÜs

Tore Skobba

Wednesday 17 December 2003 6:13:25 am

Yes, read here for more.

http://www.ez.no/developer/ez_publish_3/documentation/customization/components/search/custom_search_box

And here

http://www.ez.no/developer/ez_publish_3/documentation/customization/components/search/search_operator

Good luck.

Btw. A problem I often have had is that some of my pages (objects) are built of several objects, these building block objects should not have an full display mode as alone they are meaningless. Then I instead make an template full for them which simply calls it's parents full template. Otherwise a seach can make an "direct" full link to them.

Cheers
Tore

laurent le cadet

Wednesday 17 December 2003 6:43:01 am

Thanks guys.

Actually I'm drawing a fish (?!...flash animation)...I'll check your solutions as soon as it sweams by itself.

See you soon.

Laurent.

akiL Mussa

Friday 05 November 2004 5:58:35 am

Hi,

I have a similar problem. I'm trying to exclude images from the search. In the file search.tpl I have 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