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/

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 18 2025 05:19:06
Script start
Timing: Jan 18 2025 05:19:06
Module start 'layout'
Timing: Jan 18 2025 05:19:06
Module start 'content'
Timing: Jan 18 2025 05:19:07
Module end 'content'
Timing: Jan 18 2025 05:19:07
Script end

Main resources:

Total runtime0.6925 sec
Peak memory usage4,096.0000 KB
Database Queries73

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 587.9609152.6250
Module start 'layout' 0.00640.0028 740.585939.4453
Module start 'content' 0.00920.6817 780.0313664.5156
Module end 'content' 0.69100.0015 1,444.546920.1563
Script end 0.6925  1,464.7031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4741160.0002
Check MTime0.00140.1961160.0001
Mysql Total
Database connection0.00110.154010.0011
Mysqli_queries0.617589.1587730.0085
Looping result0.00060.0931710.0000
Template Total0.660895.420.3304
Template load0.00200.293620.0010
Template processing0.658895.122820.3294
Template load and register function0.00010.016310.0001
states
state_id_array0.00110.153510.0011
state_identifier_array0.00090.128820.0004
Override
Cache load0.00180.2630610.0000
Sytem overhead
Fetch class attribute can translate value0.00060.085830.0002
Fetch class attribute name0.00110.1660100.0001
XML
Image XML parsing0.00170.240530.0006
class_abstraction
Instantiating content class attribute0.00000.0041140.0000
General
dbfile0.00120.1683290.0000
String conversion0.00000.001340.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 48
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs