[elephant-devel] Newbie question: Index on collections

Marc klists at saphor.de
Mon Mar 17 03:06:17 UTC 2008


Hello!

I fear that this may be a rather stupid newbie question, but neither 
from the documentation nor from the mailing list posts I got an idea as 
to the best practice for the following type of searches. Let's use an 
example akin to the one in the tutorial:

(defpclass person ()
 ((name :accessor name :index t)
  (friends :accessor friends)) ;collection with names (say as strings) 
of the friends of this person
)

Given a similar structure, what is the recommended way to handle queries 
of the type "find all persons that X is a friend of?" (i.e. queries on 
individual entries in slots that contain collections)? What would be the 
best data structure for the friends slot, assuming that the collection 
remains fairly stable over time (psets, lists or other collections)?

Thanks in advance for any hint!

Best regards,

Marc







More information about the elephant-devel mailing list