[elephant-devel] including multiple slot-names and their values in the API get-instances-by-value

Ian Eslick eslick at media.mit.edu
Sat Dec 26 07:15:02 UTC 2009


get-instances-by-value is a low level primitive, so it operates only on a single index.

I have a triple-store / ontology hack in my contrib directory.  I haven't looked at it in a couple of years but you may find it useful.
	elephant-1.0/src/contrib/eslick/triples.lisp

There is also a query system in the works which would do the two index scans and merge for you, but I wouldn't hold out for it; it's low on my priority list these days.

Regards,
Ian

On Dec 25, 2009, at 5:21 AM, Arjun Mullick wrote:

> Hello,
> 
> this is the definition of my class 
> (defpclass classname ()
>   ((slot1 :accessor slot1 :initarg :slot1 :index t)
>    (slot2 :accessor slot2 :initarg :slot2 :index t)
>    (slot3 :accessor slot3 :initarg :slot3 :index t)))
> 
> If I make three instances of this class with following slot values:
> 
> INSTANCE1   slot1:"a"    slot2:"b"   slot3:"c"
> INSTANCE2   slot1:"a"    slot2:"n"   slot3:"d"
> INSTANCE3   slot1:"a"    slot2:"b"   slot3:"m" 
> 
> Now if the user gives the values for slot1 and slot2 I should be able to get slot3
> For example: If the user gives slot1 as "a" and slot2 as "b" then two vaues
> "c" and "m" should be returned
> 
> 
> We tried the API get-instances-by-value 
> Is there a way I can include multiple slot-names and their values in 
> get-instances-by-value 
> 
> 
> Arjun Mullick
> _______________________________________________
> elephant-devel site list
> elephant-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel





More information about the elephant-devel mailing list