#592 Filter support on nested collections types

Patrick Coffey Wed 7 Mar 2018

Hi All,

I have some questions on Haystack filter support for nested collections types:

  1. Can I confirm there are no methods for filter logic on nested collections? And,
  2. If there aren't known methods, does anyone have ideas on a way forward? I'm happy to make proposals, or working groups, but I want to see if anyone may have solved this already and is willing to share ideas.

For Example: If I have and entity with a list:

id: @id-foo
bar:[@id-a, @id-b, @id-c]

How could I filter for @id-foo without matching the entire bar list?

In this case one might use a contains operator in the filter. For example:

bar <containsOp> @id-b

The @id-foo entity would be returned in the response.

Patrick

Brian Frank Wed 7 Mar 2018

You cannot perform any filtering on list collections.

You can however perform filtering on nested Dict collections using the "->" operator. It should operate the same way on both a Ref and a nested Dict

I think there is a very good chance that we will be significantly enhancing the filter language as part of WG 551 and we can tackle lists too.

Login or Signup to reply.