importer
importer copied to clipboard
[Q] Multiple fieldMatcher in a handler (v.3.x)
hello Pascal,
I'd like to use several methods (e.g. csv and regex) in the KeepOnlyTagger, but it seems, only one fieldMatcher is allowed:
<handler class="$KeepOnlyTagger">
<fieldMatcher method="csv">crawl_date,type,content,collector.depth,document.language</fieldMatcher>
<fieldMatcher method="regex">(thumbnailImage|imagePHash).*</fieldMatcher>
</handler>
Error:
1 XML configuration errors detected:
[XML] StartCommand: cvc-complex-type.2.4.a: Invalid content was found starting with element 'fieldMatcher'. One of '{restrictTo}' is expected.
How to do that with the 3.x? Thanks!
It currently allows only one by design. The solution would be to merge your two matchers into a single one.
It would be nice to be able to use many. I am marking this as a feature request.