I have some questions on Haystack filter support for nested collections types:
Can I confirm there are no methods for filter logic on nested collections? And,
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 FrankWed 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.
Patrick Coffey Wed 7 Mar 2018
Hi All,
I have some questions on Haystack filter support for nested collections types:
For Example: If I have and entity with a list:
How could I filter for
@id-foo
without matching the entirebar
list?In this case one might use a
contains
operator in the filter. For example: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.