I've went through the Jobeet Tutorial for integrating Zend Lucene into a symfony (1.4.8) project in order to add search capabilities into my frontend of my site (through indexing). Among others, the key concept is to use updateLuceneIndex
during model's save
action (needs to be overridden) in order to create/update the index of the specific entry.
My model has i18n
fields, some of which (i,e name
, title
) I want to be inserted in the index. Everything works as expected but when it comes to save the i18n
fields into the index all I get is blank values ($this->getName()
returns empty string). I'm inspecting the created index with the Luke.
I ended up that this has nothing to do with the Zend Lucene but with symfony. It seems that during save
the information for i18n
fields isn't available (or is it?). I've also tried hook up the update during preSave()
, postSave()
but no avail.
So I want to ask how am I supposed to get my model's i18n
field values during the save action in order to update the index accordingly?
Important note: This happens only during doctrine:data-load
task. If I manually insert or update a record the index gets updated accordingly.
One last related question. It would be nice if I could save different keywords for each of the languages of the field of the model. How can I get the different values for each field's language inside the model?