Platform-service getItemsByCriteria

Hello,

I have a question about the call to get items by criteria (/platform/v2/admin/namespaces/{namespace}/items/byCriteria)

We want to filter items based on tags or features, but the query seems to be intersect.
So if you provide more tags, the results become more strict. Is it possible to search on multiple tags or search on features to find any item containing one of the provided tags?

  • item1
    ** aaa, bbb, ccc
  • item2
    ** aaa, bbb, ddd
  • item3
    ** bbb, ddd, eee

current situation
search on:

  • aaa
    ** returns: item1, item2
  • bbb
    ** returns: item1, item2, item3
  • bbb,ddd
    ** returns: item2, item3
  • bbb,ccc
    ** returns: item1
  • aaa,eee
    ** returns: - (nothing)

We’re looking for
search on:

  • aaa
    ** returns: item1, item2
  • bbb
    ** returns: item1, item2, item3
  • bbb,ddd
    ** returns: item1, item2, item3
  • bbb,ccc
    ** returns: item1, item2, item3
  • aaa,eee
    ** returns: item1, item2, item3

Hi @user29, currently, querying by criteria selects items that match all supplied tags (AND logic). For your use case, if you need items matching any of the tags (OR logic), a workaround would be to:

  1. Query separately for each individual tag.
  2. Combine the results to eliminate duplicates.

This approach should achieve your goal for now. Let me know if this aligns with your needs or if you’d like to discuss alternative solutions!