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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 30 2025 19:45:14
Script start
Timing: Jan 30 2025 19:45:14
Module start 'layout'
Timing: Jan 30 2025 19:45:14
Module start 'content'
Timing: Jan 30 2025 19:45:14
Module end 'content'
Timing: Jan 30 2025 19:45:14
Script end

Main resources:

Total runtime0.0358 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0077 588.0078151.1953
Module start 'layout' 0.00770.0067 739.2031220.6406
Module start 'content' 0.01450.0196 959.84381,005.8828
Module end 'content' 0.03410.0017 1,965.726637.9766
Script end 0.0358  2,003.7031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00339.1688140.0002
Check MTime0.00154.0777140.0001
Mysql Total
Database connection0.00102.830010.0010
Mysqli_queries0.005615.526130.0019
Looping result0.00000.049910.0000
Template Total0.00123.310.0012
Template load0.00092.450110.0009
Template processing0.00030.865010.0003
Override
Cache load0.00061.591010.0006
General
dbfile0.00359.722480.0004
String conversion0.00000.029940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs