- Issue created by @wfairhead
- ๐บ๐ธUnited States chrisfromredfin Portland, Maine
Yes, it would seem that in order for Views Json Source to support combined fields filtering, it the ViewsJsonQuery class needs to implement the ::placeholder() method.
This method is invoked by Drupal core's views HandlerBase for combined fields filters.
- ๐บ๐ธUnited States chrisfromredfin Portland, Maine
It's certainly non-trivial to implement the Combine filter for APath/JSONPath, but I don't think impossible. It seems like we could use regex to search the multiple fields selected in the views filter:
$..[?(@.field1 =~ /.*someword.*/ || @.field2 =~ /.*someword.*/)]
After a little more digging, it seems that at a minimum, placeholder() and addWhereExpression() would need to be implemented. The placeholders would define where to substitute what in the addWhereExpression, which could ultimately hopefully get to specifying the correct APath.
- ๐ฎ๐ณIndia samit.310@gmail.com
samit.310@gmail.com โ made their first commit to this issueโs fork.
- Merge request !243454751: fixed error Call to undefined method โ (Open) created by samit.310@gmail.com
- ๐ฎ๐ณIndia samit.310@gmail.com
Hi @chrisfromredfin,
Mean while i have added placeholder() and addWhereExpression() in the MR, now looking the way to add regex to search the multiple fields selected in the views filter.
Meanwhile, if you can help with some ideas, it would be very helpful.
Thanks
Samit K.