5 Replies Latest reply on Feb 26, 2014 10:26 AM by applebeary

    Filter by Multiple Tags via REST API?


      Is there any way to return a content list filtered by multiple tags through the API (using AND, not OR)?  Right now, it seems that through the "filter=tag(tag1, tag2)" query string you can get objects that are tagged with either tag1 OR tag2.  Is there any way to return only content with tag1 AND tag2?  We could perform the intersection/filtering ourselves with the returned data, but because of pagination, this will be pretty difficult once our instance has a large number of documents.

        • Re: Filter by Multiple Tags via REST API?

          To my knowledge, there is no AND modifier, only the implied OR.  You might be able to batch single tag searches together for better performance; however, I agree with you that this will not scale infinitely into the future with content growth. 


          Some alternatives that I've used in the past that have helped in similar situations include:

          • Reducing scope of the results to keep payloads small, manageable and predictable
          • Aggregate off-site.  If you are employing business logic on these results, get something out ahead of time...than can do the searches in 5-15 minute increments ... and batch a pre-canned list (assuming permutation counts are manageable).


          Hope one of these either helps in some form or fashion. =)


          I will put a request into Engineering to see about prioritizing an AND modifier