importer icon indicating copy to clipboard operation
importer copied to clipboard

[Q] Multiple fieldMatcher in a handler (v.3.x)

Open jetnet opened this issue 2 years ago • 1 comments

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!

jetnet avatar Oct 29 '22 14:10 jetnet

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.

essiembre avatar Nov 06 '22 14:11 essiembre