[elephant-devel] Added slot indices

Leslie P. Polzer leslie.polzer at gmx.net
Fri Jul 18 09:38:11 UTC 2008


(defpclass c1 ()
  ((slotx :index t) ; to enable class indexing for all subclasses
   (slot :accessor slot :initarg :slot :initform 0)))

(defpclass c2 (c1) nil)

(find-inverted-index 'c2 'slot :null-on-fail t)
-> NIL ; okay

; now add a slot idx
(defpclass c1 ()
  ((slotx :index t) ; to enable class indexing for all subclasses
   (slot :accessor slot :initarg :slot :initform 0 :index t)))

(find-inverted-index 'c1 'slot)
#<BDB-BTREE-INDEX oid:204>


(find-inverted-index 'c2 'slot :null-on-fail t)
-> NIL ; yuk

I suppose UPDATE-INSTANCE-FOR-REDEFINED-CLASS doesn't apply
to subclasses? What could I do to get this behaviour?

  Leslie





More information about the elephant-devel mailing list