#108 Normalize misspelled HTTP headers - #2006
Conversation
|
I like the purpose but would rather have that outside of Metadata itself. We have comparable utility classes in |
|
Thanks, @HarshDevelops! The implementation looks straightforward and solid. However, it might need a rework... Not your fault, but because the web has changed since the implementation of Nutch's SpellCheckedMetadata. Also the way it's used in Nutch has changed or will change, cf. NUTCH-2563, NUTCH-3002/NUTCH-3122 and this discussion.
Definitely, that was even the case in Nutch, although not from the beginning on (apache/nutch@bbbc29d and apache/nutch@f510e19). In addition, approximate header extraction shouldn't be the default. Some context and explanations:
|
|
Thanks @HarshDevelops for the work here, and @sebastian-nagel for the detailed I replicated the matching logic from this PR against the real 1. Sebastian's Because this hooks into 2. The dictionary is a poor fit for crawling. 3. There's a performance cost on a path that can't absorb one. Sebastian's lazy/on-miss design happens to fix all three at once: the caller It also lines up with @jnioche's earlier point, and in fact requires it: "is the Suggested way forwardSomething like One thing worth saying clearly: the alias half of this PR is the valuable part Also, given NUTCH-2563 / NUTCH-3122, Nutch seems to be moving in this same Happy to help review the reworked version. |
Thank you for contributing to Apache StormCrawler.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes
Is there a issue associated with this PR? Is it referenced in the commit message?
Does your PR title start with
#XXXXwhereXXXXis the issue number you are trying to resolve?Has your PR been rebased against the latest commit within the target branch (typically main)?
Is your initial contribution a single, squashed commit?
Is the code properly formatted with
mvn git-code-format:format-code -Dgcf.globPattern="**/*" -Dskip.format.code=false?For code changes
mvn clean verify?Note
Please ensure that once the PR is submitted, you check GitHub Actions for build issues and submit an update to your PR as soon as possible.
Closes #108
Summary:
Testing:
mvn -pl core -Dtest=MetadataTest testmvn -pl core testmvn git-code-format:format-code -Dgcf.globPattern="**/*" -Dskip.format.code=falsemvn --no-transfer-progress clean verifyreachedstormcrawler-opensearch, then failed locally because Docker/Testcontainers was unavailable; skipped tests then caused the module JaCoCo threshold to fail.