You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Maricris Villareal (JIRA)" <ji...@apache.org> on 2011/01/07 17:24:45 UTC

[jira] Created: (LUCENE-2851) Highlighting in UTF-8 documents

Highlighting in UTF-8 documents
-------------------------------

                 Key: LUCENE-2851
                 URL: https://issues.apache.org/jira/browse/LUCENE-2851
             Project: Lucene - Java
          Issue Type: Bug
          Components: contrib/highlighter
    Affects Versions: 2.9.3
            Reporter: Maricris Villareal


When I try to highlight a Chinese document using org.apache.lucene.search.highlight.Highlighter, I end up with a corrupted document from getBestTextFragments().  This corruption happens both when I try to highlight a pure English query or when I try to highlight a pure Chinese query.  

I believe that this issue is related to LUCENE-1500 which was closed by preventing an exception from being thrown but did not fix the underlying problem.

-- 
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Closed: (LUCENE-2851) Highlighting in UTF-8 documents

Posted by "Maricris Villareal (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2851?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maricris Villareal closed LUCENE-2851.
--------------------------------------

    Resolution: Not A Problem

Sorry, it turned out that the issue was in the way I was opening the file.

BufferedReader br = new BufferedReader(new FileReader(pageFile));

was changed to 

BufferedReader br = new BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(pageFile), "UTF-8"));

and it worked.

> Highlighting in UTF-8 documents
> -------------------------------
>
>                 Key: LUCENE-2851
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2851
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: contrib/highlighter
>    Affects Versions: 2.9.3
>            Reporter: Maricris Villareal
>
> When I try to highlight a Chinese document using org.apache.lucene.search.highlight.Highlighter, I end up with a corrupted document from getBestTextFragments().  This corruption happens both when I try to highlight a pure English query or when I try to highlight a pure Chinese query.  
> I believe that this issue is related to LUCENE-1500 which was closed by preventing an exception from being thrown but did not fix the underlying problem.

-- 
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org