jnioche commented on code in PR #2012:
URL: https://github.com/apache/stormcrawler/pull/2012#discussion_r3634016551
##########
core/src/main/java/org/apache/stormcrawler/indexing/AbstractIndexerBolt.java:
##########
@@ -259,12 +272,32 @@ protected Map<String, String[]> filterMetadata(Metadata
meta) {
*
* @param metadata The {@link Metadata}.
* @param normalisedUrl The normalised url.
- * @return Return the normalised url SHA-256 digest as String.
+ * @return The value found in the metadata for the key configured with
{@link
+ * #DOC_ID_METADATA_PARAM_NAME}, if any, otherwise the normalised url
SHA-256 digest as
+ * String.
*/
protected String getDocumentID(Metadata metadata, String normalisedUrl) {
+ final String fromMetadata = getDocumentIDFromMetadata(metadata);
Review Comment:
what about a sha256Hex(fromMetadata)? like we do for URLs?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]