Path

ez projects / ezsearchpro / forum / general / set sort_by parameter properly


set sort_by parameter properly

You need to be logged in to post messages in the forums. New users may register here.

Mavko Žmak

Member since:
29 June 2004

Posts: 52

Sunday 27 June 2010 1:58:10 pm

Just a notice...

After installing ezsearchpro, you have to set your sort_by parameter to "ranking". For example if you use template search like this:




   {set search=fetch(content,search,


                     hash(text,$search_text,


                          class_id,$search_class_array,


                          sort_by,array('published',false()),


                          offset,$view_parameters.offset,


                          limit,$page_limit))}




you should change it to:




   {set search=fetch(content,search,


                     hash(text,$search_text,


                          class_id,$search_class_array,


                          sort_by,array('ranking',false()),


                          offset,$view_parameters.offset,


                          limit,$page_limit))}





This should be mentioned in the docs, so that people don't have to inspect the code in order to find it out.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Up

André R

Member since:
20 August 2005

Posts: 171

Monday 28 June 2010 8:57:59 am

Thanks, I'll add it.

You can also use several sort_by values like other fetch functions:



  {set search=fetch(content,search,


                    hash(text,$search_text,


                         class_id,$search_class_array,


                         sort_by, array( array('ranking',false()), array('published',false())),


                         offset,$view_parameters.offset,


                         limit,$page_limit))}


--
ar

Up

You need to be logged in to post messages in the forums. New users may register here.