[
https://issues.apache.org/jira/browse/TIKA-4153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17774069#comment-17774069
]
Tim Allison edited comment on TIKA-4153 at 10/11/23 1:38 PM:
-------------------------------------------------------------
I've rewritten the minShouldMatch into an ugly regex for now. This now
requires a known RFC822 header at offset 0 and then another known header within
the first ~1k characters.
-We should refactor this at some point to avoid the regex and allow something
like: require one of these _AND_ one of these. I'm not sure what the best
xml-ese for that would be given our current setup.-
-When we refactor the rfc822 detection with this, we should also update the
robots.txt file detection, too.-
was (Author: [email protected]):
I've rewritten the minShouldMatch into an ugly regex for now. This now
requires a known RFC822 header at offset 0 and then another known header within
the first ~1k characters.
-We should refactor this at some point to avoid the regex and allow something
like: require one of these _AND_ one of these. I'm not sure what the best
xml-ese for that would be given our current setup.
When we refactor the rfc822 detection with this, we should also update the
robots.txt file detection, too.-
> Update RFC822 detection, again
> ------------------------------
>
> Key: TIKA-4153
> URL: https://issues.apache.org/jira/browse/TIKA-4153
> Project: Tika
> Issue Type: Task
> Reporter: Tim Allison
> Priority: Minor
>
> On the user list, Kashif Khan supplied the following example of a file that
> does not start with RFC822 fields, is detected as RFC822...leading to loss of
> text.
> {noformat}
> Some text here 1.
> Some text here 2.
> Some text here 3.
> Original Message----
> From: [email protected] <[email protected]>
> Sent: Thursday, October 31, 2019 9:52 AM
> To: Some person, (The XYZ group)
> Subject: RE: Mr. Random person phone call: MESSAGE
> Hi,
> I am available now to receive the call.
> Some text here 4.
> Some text here 5.**Some text here 6.
> {noformat}
> From what I can tell, we last modified the rfc822 detection on TIKA-4125,
> with the major minShouldMatch refactoring on TIKA-3153.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)