Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 78882 invoked from network); 26 Jun 2008 08:32:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Jun 2008 08:32:19 -0000 Received: (qmail 36390 invoked by uid 500); 26 Jun 2008 08:32:04 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 36365 invoked by uid 500); 26 Jun 2008 08:32:04 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 36352 invoked by uid 99); 26 Jun 2008 08:32:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jun 2008 01:32:04 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [63.247.81.221] (HELO maximus.getnetvps.net) (63.247.81.221) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jun 2008 08:31:13 +0000 Received: (qmail 14141 invoked by uid 48); 26 Jun 2008 10:31:32 +0200 Received: from isa2.syzefxis-hosting.gr (isa2.syzefxis-hosting.gr [84.205.231.39]) by webmail.tera.gr (Horde MIME library) with HTTP; Thu, 26 Jun 2008 10:31:32 +0200 Message-ID: <20080626103132.nnklt3paogc0cc4s@webmail.tera.gr> Date: Thu, 26 Jun 2008 10:31:32 +0200 From: jim@tera.gr To: java-user@lucene.apache.org Subject: Highlight and greek characters MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.1.6) X-Virus-Checked: Checked by ClamAV on apache.org Hello i am having the following code to highlight a text public String highlight(String text, String query ) throws IOException { TermQuery query = new TermQuery(new Term("f", query)); QueryScorer scorer = new QueryScorer(query); SimpleHTMLFormatter formatter = new SimpleHTMLFormatter("", ""); Highlighter highlighter = new Highlighter(formatter, scorer); Fragmenter fragmenter = new SimpleFragmenter(50); highlighter.setTextFragmenter(fragmenter); TokenStream tokenStream = new GreekAnalyzer() .tokenStream("f", new StringReader(text)); String result = highlighter.getBestFragments(tokenStream, text, 5, "..."); return result; } if i use a text with english characters works fine if i try a text with Greek Character i am getting en empty string as result. Why? --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org