Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jetnet opened this issue Oct 29, 2022 · 1 comment
Open

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

jetnet opened this issue Oct 29, 2022 · 1 comment

Comments

@jetnet
Copy link

jetnet commented Oct 29, 2022

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!

@essiembre
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants