Closed FuePi closed 6 years ago
Good question. Not sure you can do it the way you have it, but here is a workaround I suggest you try (untested):
<filter class="com.norconex.importer.handler.filter.impl.EmptyMetadataFilter"
onMatch="exclude" fields="content-length">
<restrictTo field="transfer-encoding">.*chunked$</restrictTo>
</filter>
The restrictTo
makes sure EmptyMetadataFilter
is only applicable to documents with "chunked" transfer encoding.
For more control, you can also have a look at the ScriptFilter.
Does that work for you?
That works perfectly! Thank you very much for the fast response.
We need to filter documents without the header Content-Length and with the header Transfer-Encoding set to chunked. This is the importer configuration I came up with:
But this seems to exclude documents matching either one of the filters. Is there a way to logically combine these filters?