Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Intersection of search results?
Bill Klish
MediaBin 4.5.3
Windows 2003 EE
I see in the 4.5.3 API guide on page 159 that search constraints are of various types (i.e. Union, Intersection, etc.). We have written a custom java web application using the MB Web Services.
Essentially, we have some basic criteria, checks for values being set, ANDed together. Then we have a series of OR constraints on a single metadata field (i.e. asset category is val1 or asset category is val 2 ).
Crit1 AND Crit2 AND Crit3 AND Crit4 OR Crit5 OR Crit6
But, we want Crit1 AND Crit2 AND Crit3 AND (Crit4 OR Crit5 OR Crit6). Not sure this is possible.
We are getting results that pass the series of ORs but fail the ANDs using the search web service operation. So, I see a few approaches for this:
1. Run two searches and manually find the unique asset list via intersection
2. Figure out what is being referred to in the manual about intersection
3. Figure out if there is something like a SQL IN query where we could say Asset Category IN (val1, val2, etc.)
What is the best way to approach this?
Find more posts tagged with
Comments
lyman
There is currently no "in" operator for an ad hoc search (although it has been discussed). The server certainly should be able to take the expresison specified but I have handed the question to our web service expert as I am not positive how the functionality is bubbled up through that API.
The "or" operator is pretty inefficient especially in SQL and so you may get better performance by manually taking the union of search results:
criterion 1 and criterion 2 and type is option1
criterion 1 and criterion 2 and type is option2
criterion 1 and criterion 2 and type is option3
...
Cheers,
Lyman Hurd