Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
API and client have different search results
System
Using the MediaBin Windows client to find the number of folders:
Criteria: Name = exists
Location = Media Database (include subfolders checked)
Include In Search Results = Folders
returns 4889 folders
In a script:
Set objRootContainer = g_objSession.RootContainer
Set objStartContainer = objRootContainer
set objExistConstraint = g_objSession.CreateMetaDataExistsSearchConstraint (strMetaDataId, 1)
set objExistCriteria = Create_Criteria (objExistConstraint, 10000)
set objAllContainers = objStartContainer.FindAllContainers(objExistCriteria)
returns 3339 folders
I thought these would be the same?
Thanks,
Peter Garcia
Find more posts tagged with
Comments
msrinivas
Are you using the same user id in both the instances?
Migrateduser
Good question, yes the metadata (MD) field I'm using in the script and in the search query in the client are the same: Name
Every folder and asset has a Name so I figure that's a pretty safe MD to use.
As part of the script trouble shooting while looking for the GUID for the MD "Expiration Date" on the system the script is running on, I output the GUID for "Name" as well:
Metadata Definition for Name is: Name {B297C571-F083-11D4-8200-0060080D8AC2}
Metadata Definition for expiration is: Expiration Date {4F3651FA-A01F-4796-887D-42B36F5E7F7F}
this checks with the value listed in include/constants.asp
One things we noticed, which may or may not be an issue, is when running the script several beeps came out of the command window perhaps indicating there may be special characters (CTRL-G) in the file name?
Migrateduser
D'oh!, the users had different permissions in the client and the script!