You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shai Erera (JIRA)" <ji...@apache.org> on 2009/06/23 12:04:07 UTC
[jira] Created: (LUCENE-1714) WriteLineDocTask incorrectly
normalizes fields
WriteLineDocTask incorrectly normalizes fields
----------------------------------------------
Key: LUCENE-1714
URL: https://issues.apache.org/jira/browse/LUCENE-1714
Project: Lucene - Java
Issue Type: Bug
Components: contrib/benchmark
Reporter: Shai Erera
Fix For: 2.9
WriteLineDocTask normalizes the body, title and date fields by replacing any "\t" with a space. However, if any one of them contains newlines, LineDocMaker will fail, since the first line read will include some of the text, however the second line, which it now expects to be a new document, will include other parts of the text.
I don't know how we didn't hit it so far. Maybe the wikipedia text doesn't have such lines, however when I ran over the TREC collection I hit a lot of those.
I will attach a patch shortly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Updated: (LUCENE-1714) WriteLineDocTask incorrectly
normalizes fields
Posted by "Shai Erera (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1714?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shai Erera updated LUCENE-1714:
-------------------------------
Attachment: LUCENE-1714.patch
# Using a Matcher as a static final member, pre-compiled.
# Completed CHANGES
# Added a note to WriteLineDocTask about this task not being thread-safe. It never was, since it writes to the output file in a non-synchronized way. Now with the addition of a static Matcher member, it's even less thread-safe.
All benchmark tests pass.
> WriteLineDocTask incorrectly normalizes fields
> ----------------------------------------------
>
> Key: LUCENE-1714
> URL: https://issues.apache.org/jira/browse/LUCENE-1714
> Project: Lucene - Java
> Issue Type: Bug
> Components: contrib/benchmark
> Reporter: Shai Erera
> Assignee: Michael McCandless
> Fix For: 2.9
>
> Attachments: LUCENE-1714.patch, LUCENE-1714.patch
>
>
> WriteLineDocTask normalizes the body, title and date fields by replacing any "\t" with a space. However, if any one of them contains newlines, LineDocMaker will fail, since the first line read will include some of the text, however the second line, which it now expects to be a new document, will include other parts of the text.
> I don't know how we didn't hit it so far. Maybe the wikipedia text doesn't have such lines, however when I ran over the TREC collection I hit a lot of those.
> I will attach a patch shortly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Assigned: (LUCENE-1714) WriteLineDocTask incorrectly
normalizes fields
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1714?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael McCandless reassigned LUCENE-1714:
------------------------------------------
Assignee: Michael McCandless
> WriteLineDocTask incorrectly normalizes fields
> ----------------------------------------------
>
> Key: LUCENE-1714
> URL: https://issues.apache.org/jira/browse/LUCENE-1714
> Project: Lucene - Java
> Issue Type: Bug
> Components: contrib/benchmark
> Reporter: Shai Erera
> Assignee: Michael McCandless
> Fix For: 2.9
>
> Attachments: LUCENE-1714.patch
>
>
> WriteLineDocTask normalizes the body, title and date fields by replacing any "\t" with a space. However, if any one of them contains newlines, LineDocMaker will fail, since the first line read will include some of the text, however the second line, which it now expects to be a new document, will include other parts of the text.
> I don't know how we didn't hit it so far. Maybe the wikipedia text doesn't have such lines, however when I ran over the TREC collection I hit a lot of those.
> I will attach a patch shortly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1714) WriteLineDocTask incorrectly
normalizes fields
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12723175#action_12723175 ]
Michael McCandless commented on LUCENE-1714:
--------------------------------------------
Looks good; I'll commit shortly.
> WriteLineDocTask incorrectly normalizes fields
> ----------------------------------------------
>
> Key: LUCENE-1714
> URL: https://issues.apache.org/jira/browse/LUCENE-1714
> Project: Lucene - Java
> Issue Type: Bug
> Components: contrib/benchmark
> Reporter: Shai Erera
> Assignee: Michael McCandless
> Fix For: 2.9
>
> Attachments: LUCENE-1714.patch, LUCENE-1714.patch
>
>
> WriteLineDocTask normalizes the body, title and date fields by replacing any "\t" with a space. However, if any one of them contains newlines, LineDocMaker will fail, since the first line read will include some of the text, however the second line, which it now expects to be a new document, will include other parts of the text.
> I don't know how we didn't hit it so far. Maybe the wikipedia text doesn't have such lines, however when I ran over the TREC collection I hit a lot of those.
> I will attach a patch shortly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Updated: (LUCENE-1714) WriteLineDocTask incorrectly
normalizes fields
Posted by "Shai Erera (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1714?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shai Erera updated LUCENE-1714:
-------------------------------
Attachment: LUCENE-1714.patch
Patch includes:
# Fix WriteLineDocTask to replace "[\t\r\n]+" with a space for body, title and date.
# Add test to WriteLineDocTaskTest
# CHANGES
All benchmark tests pass.
> WriteLineDocTask incorrectly normalizes fields
> ----------------------------------------------
>
> Key: LUCENE-1714
> URL: https://issues.apache.org/jira/browse/LUCENE-1714
> Project: Lucene - Java
> Issue Type: Bug
> Components: contrib/benchmark
> Reporter: Shai Erera
> Fix For: 2.9
>
> Attachments: LUCENE-1714.patch
>
>
> WriteLineDocTask normalizes the body, title and date fields by replacing any "\t" with a space. However, if any one of them contains newlines, LineDocMaker will fail, since the first line read will include some of the text, however the second line, which it now expects to be a new document, will include other parts of the text.
> I don't know how we didn't hit it so far. Maybe the wikipedia text doesn't have such lines, however when I ran over the TREC collection I hit a lot of those.
> I will attach a patch shortly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1714) WriteLineDocTask incorrectly
normalizes fields
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12723030#action_12723030 ]
Michael McCandless commented on LUCENE-1714:
--------------------------------------------
Looks good! Shai, can we pre-compile the regex up front (java.util.regex.Matcher) so we don't have to compile it three times on every written line?
> WriteLineDocTask incorrectly normalizes fields
> ----------------------------------------------
>
> Key: LUCENE-1714
> URL: https://issues.apache.org/jira/browse/LUCENE-1714
> Project: Lucene - Java
> Issue Type: Bug
> Components: contrib/benchmark
> Reporter: Shai Erera
> Assignee: Michael McCandless
> Fix For: 2.9
>
> Attachments: LUCENE-1714.patch
>
>
> WriteLineDocTask normalizes the body, title and date fields by replacing any "\t" with a space. However, if any one of them contains newlines, LineDocMaker will fail, since the first line read will include some of the text, however the second line, which it now expects to be a new document, will include other parts of the text.
> I don't know how we didn't hit it so far. Maybe the wikipedia text doesn't have such lines, however when I ran over the TREC collection I hit a lot of those.
> I will attach a patch shortly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Resolved: (LUCENE-1714) WriteLineDocTask incorrectly
normalizes fields
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1714?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael McCandless resolved LUCENE-1714.
----------------------------------------
Resolution: Fixed
Thanks Shai!
> WriteLineDocTask incorrectly normalizes fields
> ----------------------------------------------
>
> Key: LUCENE-1714
> URL: https://issues.apache.org/jira/browse/LUCENE-1714
> Project: Lucene - Java
> Issue Type: Bug
> Components: contrib/benchmark
> Reporter: Shai Erera
> Assignee: Michael McCandless
> Fix For: 2.9
>
> Attachments: LUCENE-1714.patch, LUCENE-1714.patch
>
>
> WriteLineDocTask normalizes the body, title and date fields by replacing any "\t" with a space. However, if any one of them contains newlines, LineDocMaker will fail, since the first line read will include some of the text, however the second line, which it now expects to be a new document, will include other parts of the text.
> I don't know how we didn't hit it so far. Maybe the wikipedia text doesn't have such lines, however when I ran over the TREC collection I hit a lot of those.
> I will attach a patch shortly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org