thanks, yes you're right validators are here for this! I'll go for this probably. I have set already validators and I forgot that I could use them for this too!
On Apr 2, 5:23 pm, wissl <[EMAIL PROTECTED]> wrote: > I think there are two possible solutions for that (maybe more...): > > 1) sfLucene provides the possibility to configure a validator method > in the search.yml, which is "asked", if the object has to be > (re)indexed. So you could create such a ->indexMe() in your object > which returns false, if only the views field isModified(), otherwise > true? > > 2) You could simply not use the save() method for that but a simple > BasePeer::doUpdate(). This won't trigger sfLucene as far as I > understood behaviors. If I understand your issue correct, you only > need to increase the "views" value and nothing else and then this > solution might be enough for your needs? > > On 2 Apr., 10:08, gestadieu <[EMAIL PROTECTED]> wrote: > > > Hi all, > > > I finally find a way to upgrade from sfLucene 0.1.0 to 0.1.5 (it seems > > there are some issues with some PHP5 versions and more important: make > > sure to not have Zend already installed in PEAR!). > > I am encountering a problem time to time with some of the index lock > > files only readable but I am still trying to get more details before > > publishing here my detail question... > > Ok, now the question! I have one propel object Article indexed > > obviously by sfLucene when it is saved. The problem is that everytime > > someone read the article for the first time, I update the counter > > field inside my Article object, which triggers sfLucene to re-index my > > document very often. Is there a way to say to Lucene to not index this > > document under certain condition? > > I would write something like: > > <?php > > if ($article->isNew()) lucene-can-index-the-object; > > else donotneedtoindexit; > > > Of course it will be a little bit more complex, but the question is on > > the code for Lucene itself. By default Lucene is doing a preSave or > > postSave, is there anyway to not run this when we do not want it on > > our code? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
