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.