neongrau __
2007-Mar-06 10:46 UTC
[Ferret-talk] aaf excluding certain db records from indexing
hi! short question about aaf: is there a builtin functionality in acts_as_ferret to exclude records from being indexed when for example a column "is_deleted" / "is_disabled" / "dont_index" has a certain value? regards neongrau -- Posted via http://www.ruby-forum.com/.
Jens Kraemer
2007-Mar-06 12:49 UTC
[Ferret-talk] aaf excluding certain db records from indexing
On Tue, Mar 06, 2007 at 11:46:26AM +0100, neongrau __ wrote:> hi! > > short question about aaf: > > is there a builtin functionality in acts_as_ferret to exclude records > from being indexed when for example a column "is_deleted" / > "is_disabled" / "dont_index" has a certain value?just override the ferret_enabled? instance method. cheers, Jens -- Jens Kr?mer webit! Gesellschaft f?r neue Medien mbH Schnorrstra?e 76 | 01069 Dresden Telefon +49 351 46766-0 | Telefax +49 351 46766-66 kraemer at webit.de | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa
neongrau __
2007-Mar-06 13:18 UTC
[Ferret-talk] aaf excluding certain db records from indexing
Jens Kraemer wrote: s_disabled" / "dont_index" has a certain value?> > just override the ferret_enabled? instance method. >hallo jens! so i just put s.th. like this into my model? def ferret_enabled? self.is_deleted ? false : true end and aaf will skip the record when indexing? -- Posted via http://www.ruby-forum.com/.
Jens Kraemer
2007-Mar-06 13:21 UTC
[Ferret-talk] aaf excluding certain db records from indexing
On Tue, Mar 06, 2007 at 02:18:34PM +0100, neongrau __ wrote:> Jens Kraemer wrote: > s_disabled" / "dont_index" has a certain value? > > > > just override the ferret_enabled? instance method. > > > > hallo jens! > > so i just put s.th. like this into my model? > > def ferret_enabled? > self.is_deleted ? false : true > end > > and aaf will skip the record when indexing?that''s right. However this does not apply to index rebuilds, please see my other recent mail to the list for a solution to this problem. Jens -- Jens Kr?mer webit! Gesellschaft f?r neue Medien mbH Schnorrstra?e 76 | 01069 Dresden Telefon +49 351 46766-0 | Telefax +49 351 46766-66 kraemer at webit.de | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa