[ 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to