Forums / Developer / Help me

Help me

Author Message

carlos mboyo

Friday 08 April 2011 1:20:38 am

Can someone help me I can not limit the number of matches

Research ezfind.

Nicolas Pastorino

Friday 08 April 2011 1:25:54 am

Hi Carlos,

Could you precise your request a bit ?

Thanks in advance,
Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

carlos mboyo

Moderated by: Nicolas Pastorino

Friday 08 April 2011 2:14:31 am

Hi nicolas,

I work on the ezfind extension that works with solr, but I can not limit the number of search matches.

I'd like me to limit the number of matches to 30. This is possible with ezfind or solr? here is my fetch that displays the total number of matches:

{set $search_resultat = fetch( 'ezfind', 'search', hash( 'query', $terme, 
                                                         'sort_by',hash('score','desc'), 
                                                         'subtree_array', 1684, 
                                                         'limit', $page_limit, 
                                                         'offset', $view_parameters.offset, 
                                                         'class_id', array( 'information', 'etablissement' ), 
                                                         'filter', $search_filter ) )}

Nicolas Pastorino

Monday 11 April 2011 2:37:52 am

Hi Carlos,

Your fetch looks very good. The only thing you should do to limit the number of matches down to 30 is to set the $page_limit variable to 30.

Let us know how things go,
Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

carlos mboyo

Tuesday 12 April 2011 4:32:14 am

Hi Nicolas,

thank you for having responded to mymessage, but

the variable $ page_limit for limiting the number of

matches per page. It is not the result of total
research.

Cheers,

Nicolas Pastorino

Tuesday 12 April 2011 5:45:43 am

Hi Carlos,

The $page_limit variable is passed as value of the 'limit' parameter, itself passed-on to Solr, through eZ Find, for limiting the amount of results returned. It is also used, as you say, to paginate.

Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye