Return only items where multi-managed-metadata field contains ONLY certain values

We have a situation where a large document library has a managed managed field for a term with ~1000 terms, such that every document typically has between 1 or 20 or so terms specified.

The issue is that we want to create a view that shows the documents that ONLY use a particular subset of those terms. E.g. if the terms were called A001...A999, then we want to show documents that specify only A001, A002 or A003. If they specify any other term, they shouldn't be shown.  In the simplest case in fact we want a view that only shows documents where the field value is just "A001" and nothing else.

But no matter what combination of <IN> or <Eq> or <Contains> or <Includes> I seem to use, I can't seem to get this to work. Strangely enough for a multi-*CHOICE* field, I can do it, by using <IN> and then all 6 possible subsets of A B & C, formatted as #;A#;B#;C#; as the possible set of values, but for managed metadata <IN> actually seems to act the same as <Eq> - i.e. it simply means "is ONE of the values equal to this", and at any rate I can't seem to find a way of formatting multiple values that causes a match.

If there were only say, 50 or so possible terms then it could be done by simply using a series of <Neq> operations for each value that's not permitted, but when there's 1000+ it breaks the internal query engine.

Any suggestions welcome!

August 24th, 2015 9:40pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics