Forums / Extensions / eZ Find / Object Indexing when Solr server unavailable

Object Indexing when Solr server unavailable

Author Message

Ghandri Hamza

Monday 07 February 2011 2:48:40 am

I manipulate EzFind for some time, I am facing a problem, I’d like to know your opinion on the matter.

What happens when the Solr server is unreachable at the publication of content with real-time indexing "DelayedIndexing = disabled" ?

Does it add an entry in the table “ezpending_actions” ?
From the tests I made that does not work, the content is never indexed.

Thanks in advance.

Gaetano Giunta

Monday 07 February 2011 4:09:44 am

Afaik no, failed indexations do not get pushed to the delayed indexation table. You might want to open a feature request for that. But is it really the best solution? If solr is really unattainable you will still have no indexed content and a growing pending actions table... maybe a bigger warning is what is needed

Principal Consultant International Business
Member of the Community Project Board

Marko Žmak

Monday 07 February 2011 4:53:40 am

I can confirm it from my own experience. If your solr server stops working all the content published during it's downtime won't get indexed. You should run "php extension/ezfind/bin/php/updatesearchindexsolr.php" to reindex the content that was missed.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Ghandri Hamza

Monday 07 February 2011 5:23:48 am

I agree, that's what I thought, but running the script "php extension/ezfind/bin/php/updatesearchindexsolr.php" is pretty overkill. It indexes the whole site instead of only indexing the small missing part.

Franck Magnan

Monday 07 February 2011 11:53:34 am

Hi Ghandri,
if you know which node or which subtree have not been indexed by solr, you can run updatesearchindexsolr.php script with few parameters to not reindex all your contents. For example, you can try this command:

php extension/ezfind/bin/php/updatesearchindexsolr.php -s backend_siteaccess --topNodeID=111 --offset=0 --limit=5

hope this help,

--
Developer at Open Wide

Marko Žmak

Tuesday 08 February 2011 3:03:18 am

Franck, when you run:

php extension/ezfind/bin/php/updatesearchindexsolr.php --help

you get:

--offset=VALUE       *For internal use only*
--limit=VALUE        *For internal use only*
--topNodeID=VALUE    *For internal use only*

What does "for internal use only" mean? Are this parameters safe to use?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Franck Magnan

Tuesday 08 February 2011 6:30:55 am

Hello Marko,

I don't know if these options are experimental or not but I already have used them and AFAIK, they are working

--
Developer at Open Wide

Ghandri Hamza

Tuesday 08 February 2011 7:46:41 am

Thank you for taking time to feed into this topic.

I'm in a rather delicate situation.In the case given by Marko, we should identify a subtree, or when we have objects all around the content tree it becomes more difficult.
I think we should bring an improvement to mitigate the problem of inaccessibility of Solr by including ObjectID in the table "ezpending_actions" untils the Solr server is avalaible again .

Marko Žmak

Tuesday 08 February 2011 10:52:12 am

Maybe reindexing the entire content during the night could do it. I know about situations when people put the complete reindexaton in a nightly cronjob, in order to solve the case like yours.

But yes, having some mechanism that would allow you to reindex only the missed nodes would be nice. But I'm not sure that ezpending_actions is the right way to do it. Maybe some other solution that uses some tables of the ezfind extension.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth