Remove_field with regex as argument


I'd like to remove all fields that begin by "foobar". Is there any way to pass a regex to the remove_field command, or is there any remove command that accepts regexs?

(Magnus Bäck) #2

Use a prune filter.


Unfortunately the field is a subfield (obtained parsing a JSON), and the prune filter doesn't support that.

I thought about using the mutate filter to rename the subfield as a root field, but the rename command doesn't allow regexs, so I'm back to square one. Any other ideas?

(Magnus Bäck) #4

Then you'll have to use a ruby filter. I'm pretty sure examples have been posted in the past.

(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.