Forums / Extensions / eZ Find / Use eZFind as regular fetch

Use eZFind as regular fetch

Author Message

Jérôme Vieilledent

Thursday 12 February 2009 7:37:47 am

Hi

I heard that sometimes it's better to use eZFind than regular fetches if you have a lot of content objects.
How can I do it ? Am I forced to use a query string ? I'm using eZFind 2.0 alpha 1

Thanks

Nicolas Pastorino

Friday 20 February 2009 1:22:15 am

Salut Jerôme,

First of all, you can switch to eZFind 2.0 stable, lots of neat features and bugfixes in there !
( http://ez.no/ezfind/download ).

Concerning replacing the legacy fetch functions by eZFind search queries, it indeed presents quite a few advantages :
* quicker
* more flexible, filter-wise, generally
* externalizing the load to a third party software
* built-in support for surfacing external data ( no specific fetch function for retrieving external data )

Cons :
* Results might be out of sync ( in case DelayedIndexing is enabled, with a low frequence )
* View cache management is a tad trickier

This feature is not industrialized yet, although it was prototyped on a few projects. We are having a look at how to make it as usable as possible.

Best Regards

--
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

Jérôme Vieilledent

Friday 20 February 2009 6:24:40 am

Salut Nicolas et merci :-)

I've already downloaded and installed the final release of eZFind 2.0 and the good news is : no more PHP notice and warnings :-) ! Using eZFind is really fast indeed. Is there a way to trigger an index update each time you publish an object, like the old built in search engine does ? I've noticed that the publishing process is connected somewhere with ezfind, but I can't figure out what it does exactly...
So it is possible to do an ezfind search without a <i>query</i>, isn't it ? I noticed in the 2.0 doc, the <i>query</i> param is not required any more.
I just wonder how I can do filter with an ezboolean or ezdatetime field ? Which fields are supported ?

Thanks a lot

Jérôme Vieilledent

Saturday 21 February 2009 5:13:02 am

Is there a way to trigger an index update each time you publish an object, like the old built in search engine does ? I've noticed that the publishing process is connected somewhere with ezfind, but I can't figure out what it does exactly...

I finally found out that it is built in. Each time you publish/delete an object, the Solr index is updated.

Nicolas Pastorino

Tuesday 03 March 2009 1:37:33 am

Hello Jérôme,

Quote :

Is there a way to trigger an index update each time you publish an object, like the old built in search engine does ? I've noticed that the publishing process is connected somewhere with ezfind, but I can't figure out what it does exactly...

It is indeed built-in. In the case of larger sites, where committing to Solr takes some time ( mostly due to the fact that Solr optimizes its index ), you might want, in order to give the content editors a better user experience, to consider enabling DelayedIndexing, in SearchSettings in site.ini. You will then need to plugin the cronjobs/ezfindexcontent.php cron ( create a cronjob part for this ) and let it run frequently. This will make the publish operation much faster. Additionnally, you can disable the ezfind.ini[IndexOptions].OptimizeOnCommit directive, which will reduce the time taken to push a modification to Solr. This wil require setting up a pretty simple cronjob to optimize Solr's index every now and then. The former is not shipped yet, but here is how it could look :

$searchEngine = eZSearch::getEngine();
if ( $searchEngine instanceof eZSolr )
    $searchEngine->optimize();

This one can be run every night for instance.

Quote :

So it is possible to do an ezfind search without a query, isn't it ? I noticed in the 2.0 doc, the query param is not required any more.

Absolutely.

Have you had the chance to put the 2.0 stable version in production yet ?
Any feedback on this ?

Thanks for sharing !
Best Regards,

--
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

Jérôme Vieilledent

Tuesday 03 March 2009 2:32:01 am

Hi Nicolas

Have you had the chance to put the 2.0 stable version in production yet ?
Any feedback on this ?

It's not yet in production and the client is thinking to finally use Antidot (with the eZAntidot extension). I'm currently lobbying to use eZFind 2.0 which is fully compatible with EZP 4.x and Open Source, which is not the case for eZAntidot (the doc YOU wrote indicates version 3.8)

What do you think about Antidot-eZAntidot VS Solr-eZFind ? Can you give arguments ?
Thanks :-)

Andreas Kaiser

Tuesday 03 March 2009 2:32:37 pm

We just upgrade a production site using ezfind 1 to ezfind 2 final.

The site is going well with OptimizeOnCommit enabled. The site has around 1650 documents/objects at this moment.

Related with OptimizeOnCommit sure we will change this in the near future because more users/editors will be updating content at the same time and server load will be bad if we don't delay indexing. Some people I know had problems with OptimizeOnCommit enabled, but of course this depends of the server/environment.

eZ Partner in Madrid (Spain)
Web: http://www.atela.net/

eZ debug

Timing: Jan 18 2025 02:03:47
Script start
Timing: Jan 18 2025 02:03:47
Module start 'content'
Timing: Jan 18 2025 02:03:48
Module end 'content'
Timing: Jan 18 2025 02:03:48
Script end

Main resources:

Total runtime1.0445 sec
Peak memory usage4,096.0000 KB
Database Queries210

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0088 588.8750180.7813
Module start 'content' 0.00890.9069 769.6563667.6797
Module end 'content' 0.91580.1287 1,437.3359345.0859
Script end 1.0445  1,782.4219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00480.4569210.0002
Check MTime0.00170.1611210.0001
Mysql Total
Database connection0.00070.063910.0007
Mysqli_queries0.947990.75382100.0045
Looping result0.00250.23822080.0000
Template Total1.005196.220.5026
Template load0.00290.282320.0015
Template processing1.002295.945720.5011
Template load and register function0.00010.009110.0001
states
state_id_array0.00110.107910.0011
state_identifier_array0.00100.098820.0005
Override
Cache load0.00260.2537610.0000
Sytem overhead
Fetch class attribute can translate value0.00150.140640.0004
Fetch class attribute name0.00100.0918100.0001
XML
Image XML parsing0.00190.180840.0005
class_abstraction
Instantiating content class attribute0.00000.0025140.0000
General
dbfile0.00370.3547400.0001
String conversion0.00000.000830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
7content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
19content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
8content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
5content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 48
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs