.... 1) What you describe is really a different bug. You want objects that are ONLY in a particular category. In your example, you did get an object back that had OAK assigned, but it also had EAGLE. If I'm reading you right, this is a completely different issue then what you desribed. There is no way, right now, to say, give me an object that has keyword A or cat A and nothing else.
-> Yes, you're right. It's a different bug. I told I took a deeper look into the problem, and found out that the matching of keyword and category and the returning of objects were based on coincedence which laid in the problem I described below. I'm sorry for this one. The bug I posted earlier was misleading.
2) Maybe you didn't mean a ONLY match. After rereading your post, it sounds like your trying to do a AND type search, ie, it has to be in both guys. Again, this is not possible currently, but it could be done with a modification to the search tag. Actually, since we pass the keywords the same way you pass them, a comma-delimited list, and Verity treats lists like that as an OR search, you may want to try passing the list of keywords like so:
apple AND oranges
-> No, I mean an OR search
If you look at mdkeywordobjectfind and see how it constructs the category restriction, you will see it's an OR string, which you could change to an AND, or change to Attributes.CategoryAndOr
4) You say you want to find objects that are assigned in category Foo (let's forget for a moment you want stories ONLY in Foo), if so, why are you using keywordobjectfind, why not use categoryobjectfind instead?
-> I want all objects with the keywords OAK OR SPARROW. I specify a list with categories from wildlife. My book is returned because: 1. It has the keyword OAK 2. It has a category from wildlife. BUT the keyword OAK is not member of a category from wildlife, that is my problem. What i do now is do a mdkeywordobjectfind with a resultset FULL, next <cfloop list="#lstKeywords#" index="thisKeyword"> <cfif listFind(stObject.stKeywords[thisKeyword], thisKeyword> display the item </cfif> </cfloop> So I check if the matching keyword is member of the categories I'm searching in.
Thanks, Johan
======================================================================= Raymond Camden, Principal Spectra Compliance Engineer for Allaire
Email : jedimaster@allaire.com ICQ UIN : 3679482
"My ally is the Force, and a powerful ally it is." - Yoda
> -----Original Message----- > From: Johan Coens [mailto:j.coens@thefactore.com] > Sent: Tuesday, January 02, 2001 5:21 AM > To: Spectra-Talk > Subject: RE: keyword Bug in cfa_metadataKeywordObjectFind > > > First, thank you all for your responses. I've taken a deeper look into the > problem (and maybe I should have done that before) and found out what my > problem is. I'll try to bring it as clear as possible with the following > example. > > I have my type books and articles and the following hierarchy: > nature > trees > POPLAR > OAK (article and book ASSIGNED) > flowers > ROSE > TULIP > wildlife > fishes > SHARK > GOLDFISH > birds > EAGLE (book ASSIGNED) > SPARROW (article ASSIGNED) > > My article is about oaks and sparrows, so my article is assigned to the > keywords OAK and SPARROW. > I have a book which is about eagles and oaks, so my book is > assigned to the > keywords OAK and EAGLE. > > In my site I am in the section wildlife, so I only want books from the > category and subcategories from wildlife. So my call is the following: > <cfa_metadataKeywordObjectFind > dataSource = "#request.datasource#" > keywords = "OAK,SPARROW" > resultSet = "key" > lTypeIDs = "#request.TypeIDs.Book#" > r_stObjects = "keysBooks" > lCategoryIDs = "list of categoryIDs from wildlife" > > > > When I take a look at the object properties of my book: > objectdata > stKewords > OAK > EAGLE > lCategories: catID_birds,catID_trees > > The tag cfa_metadataKeywordObjectFind searches like: > 1. Is the categoryID present > 2. Is the keyword present > 3. Does the typeID match > > If all questions are answered with YES, then the object will be returned. > One essential question is missing though: > 4. Is the matching keyword member of the provided categories. > > This condition is not made in metadataKeywordObjectFind. My book is > returned, eventhough it is not about eagles. So before I do a > metadataKeywordObjectFind, I have to filter all keywords out which are not > present in my categories. > > Thanks all and a happy new year, > Johan Coens > ~~~~~~~~~~~~~ Paid Sponsorship ~~~~~~~~~~~~~ Get Your Own Dedicated Win2K Server! Instant Activation for $99/month w/Free Setup from SoloServer PIII600 / 128 MB RAM / 20 GB HD / 24/7/365 Tech Support Visit SoloServer, https://secure.irides.com/clientsetup.cfm. ------------------------------------------------------------------------------ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a message to spectra-talk-request@houseoffusion.com with 'unsubscribe' in the body.