The reason for this issue is in the way the data is stored in the MetaData Keyword Verity collection. The scenario described basically has multiple categories with the same or unique keywords (which is totally okay) being assigned to an object and your logic needs to be able to choose keywords filtered by categories. Correct?
First let's examine how the verity index is set up. Quickly a collection can be thought of as table with a set of columns. The columns are key, title, body, custom1 and custom2. Once these are populated, you can query these columns through the <cfsearch> tag much like SQL is against a table. The collection used to store the MetaData keywords is set up as follows: key(objectId), title(label), body(keyword), custom1(catlist) and custom2(typeId).
With that overview behind us, let's go back to the original question. Here we have a MetaData hierarchy with the keywords assigned to an object (ID=2333)...
> > MyHierarchy > > - books (categorie books in MyHierarchy) > > - nature > > - trees > > KEYWORD1 (assigned) > > KEYWORD2 > > - queen flowers > > KEYWORD > > - science > > - physics > > - cdroms (categorie cdroms in MyHierarchy) > > - best music of the 80s > > QUEEN THE BEST (assigned) > > - best music of the 90s > > ABBA
The row in verity now reflects the following: key(2333), title(label), body(KEYWORD1,QUEEN THE BEST), custom1(trees,best music of the 80s) and custom2(typeId)
See the problem. There is no way to know which category the keyword is assigned. So when you request 'QUEEN THE BEST' with the categories of 'trees' and 'nature' you will return the object even though the keyword doesn't belong to those categories.
There are several things where we can go from here. 1. Try to structure the classification to avoid this scenario. 2. Pray for a fix now that is out in the open. There is a Spectra Alter being constructed now... (Beware of Bad Humor) 3. When you do a <cfa_metadataKeywordObjectFind> and you are using the lCategoryIDs attribute, set the resultSet attribute to FULL and then loop through the data returned to verify the categories were filtered correctly. See below for tag example. <cfa_metadataKeywordObjectFind keywords = "QUEEN THE BEST" lCategoryIDs = "all categorieIDs from nature" lTypeIDs = "Type ID for an object assigned to the keywords" resultSet = "FULL" r_stObjects="stMDObjects" > <cfloop collection="#stMDObjects#" item="oid"> <!--- Look at each object to make sure the keyword requested is in the correct category --->
</cfloop>
That's it.
Ben
-----Original Message----- From: Raymond Camden [mailto:rcamden@allaire.com] Sent: Friday, December 29, 2000 10:27 AM To: Spectra-Talk Subject: RE: keyword Bug in cfa_metadataKeywordObjectFind
As far as I know there is no hot fix for this issue, because, again, as far as I know this isn't an issue. (Sorry, I know that doesn't help you any.) You say that the category restriction does not seem to be working. Ie, you ask for keyword QUEEN THE BEST from category NATURE (and the cats beneath it), but it returns an object that was assigned QUEEN THE BEST from CDROMs. Tell me, if you do a cat find, not a keyword find, and specify NATURE (and those kids), do you still get the object?
======================================================================= 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: Friday, December 29, 2000 10:23 AM > To: Spectra-Talk > Subject: RE: keyword Bug in cfa_metadataKeywordObjectFind > > > RE-Indexing did'nt solve it. Specifying lCategories does'nt seem to work. > Rebuilding a collection with 500+ keywords, I don't want that. Has there > been released some kind of hotfix for my (seemingly) bug? > > -----Original Message----- > From: Raymond Camden [mailto:rcamden@allaire.com] > Sent: vrijdag 29 december 2000 14:29 > To: Spectra-Talk > Subject: RE: keyword Bug in cfa_metadataKeywordObjectFind > > > As far as I know, this shouldn't be happaning. Just because the category > shares a word with the keyword, there shouldn't be any confusion, > especially > since your passing in the UUIDs of the categories, not the labels. > > I've tested category filtering before, and it does work, again, > as far as I > know. Can you try deleting your metadata collections and reindexing? > > ======================================================================= > 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: Friday, December 29, 2000 4:20 AM > > To: Spectra-Talk > > Subject: keyword Bug in cfa_metadataKeywordObjectFind > > > > > > I think there is a bug in cfa_metadataKeywordObjectFind. I'll > demonstrate > > with an example: > > > > I want to retrieve objects from a metadatahierarchy, but only from a > > specific tree in the hierarchy. FE. If I have: > > > > MyHierarchy > > - books (categorie books in MyHierarchy) > > - nature > > - trees > > KEYWORD1 (assigned) > > KEYWORD2 > > - queen flowers > > KEYWORD > > - science > > - physics > > - cdroms (categorie cdroms in MyHierarchy) > > - best music of the 80s > > QUEEN THE BEST (assigned) > > - best music of the 90s > > ABBA > > > > When I do a metadataKeywordObjectFind with the params > > <cfa_metadataKeywordObjectFind > > keywords = "QUEEN THE BEST" > > lCategoryIDs = "all categorieIDs from nature" > > lTypeIDs = "Type ID for an object assigned to the keywords" > > > > > > > This will give me the objects assigned to the keyword 'QUEEN > THE BEST' in > > the category CDROMS? It looks like the lCategories are ignored.. Another > > very weird thing: > > > > - if i specify only the category nature in the lCategories, no > objects are > > returned. > > - if i specify only category nature and trees in the lCategories, > > no objects > > are returned. > > - But: if i specify only category nature, trees and queen flowers in the > > lCategories, objects are returned. > > > > Is this because of the existince of the word QUEEN in the > categorie QUEEN > > flowers? It looks like this. > > > > Maybe someone can help me out. > > > > Regards, > > 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.