Revision 39150
Added by Marek Horst almost 9 years ago
MatchingToAvroPartialCitationMapper.java | ||
---|---|---|
55 | 55 |
citation.setPosition(citEntityId.getPosition()); |
56 | 56 |
citation.setDestinationDocumentId(docEntityIdAndConfidence.getDocEntityId().getDocumentId()); |
57 | 57 |
citation.setConfidenceLevel(docEntityIdAndConfidence.getConfidence()); |
58 |
|
|
59 |
context.write(new AvroKey<String>(src.text().toString()), new AvroValue<PartialCitation>(citation)); |
|
58 |
// writing only when matched |
|
59 |
if (citation.getDestinationDocumentId()!=null) { |
|
60 |
context.write(new AvroKey<String>(src.text().toString()), new AvroValue<PartialCitation>(citation)); |
|
61 |
} |
|
62 |
|
|
60 | 63 |
} catch (Exception e) { |
61 | 64 |
log.error("Error while converting match (" + src.toString() + ", " + dest.toString() + ")", e); |
62 | 65 |
} |
Also available in: Unified diff
merging trunk changes with IIS-CDH-5.3.0 branch