Hi Kashyap, > Hurray!!!
:) > Just to confirm if I've understood correctly - this solution is similar > to (nm +CuSu @Sup (sup +Item) (itm +Pos) ord) from the sample app correct? > Instead of (nm +CuSu @Sup) we have (nm +TagVal @Col1 nm +TagVal) - right? Yes, similar. The +CuSu case does: 1. fetch all +CuSu objects from the 'nm' tree whose names match the string in @Sup 2. use each object to index into the 'sup' tree (supplier) of items, to get these item objects 3. Index with the items into the position tree 4. Follow the joint from each found position to get its order object (nm +TagVal @Col1 nm +TagVal) is a bit truncated. The full generator was ((nm +TagVal @Col1 nm +TagVal @Col2) (v +Tag) itm) It traverses the 'nm' tree *two* times, first for color 1 and then for color 2. The found +TagVal objects are used to index into the 'v' tree of +Tag. > I need one more help - writing a function that take a list of strings > (Tags) and executes the pilog query with all the strings "anded" for > example, if I call (MakeQ "RED" BLUE" ) should return all items that have > three TAGs. > (de MakeQ Tags Better use (de MakeQ @ ..) or (de MakeQ (Tags) ..) to get evaluated arguments or argument list rspectively. > (let ( > Col '( (N) (intern (pack '@Col N))) 'intern' is not needed and not recommended. I would prepare the generator clauses as a Pilog variable, to build them at runtime, and then use the member/2 predicate in the filter clause to check for membership in the list of colors. ☺/ A!ex -- UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe
