Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9809694AC for ; Thu, 24 Nov 2011 11:45:05 +0000 (UTC) Received: (qmail 4526 invoked by uid 500); 24 Nov 2011 11:45:03 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 4478 invoked by uid 500); 24 Nov 2011 11:45:03 -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 4470 invoked by uid 99); 24 Nov 2011 11:45:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Nov 2011 11:45:03 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ian.lea@gmail.com designates 209.85.210.176 as permitted sender) Received: from [209.85.210.176] (HELO mail-iy0-f176.google.com) (209.85.210.176) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Nov 2011 11:44:58 +0000 Received: by iaqq3 with SMTP id q3so2847114iaq.35 for ; Thu, 24 Nov 2011 03:44:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=+KLD3Qusc0MzKCwSTyqdgcIHDUJ+fLgUNZAUFJLj35M=; b=RVoyP37rcKvjkTnQMZBQSKYl8ujUVo0D1F4k/PZDfE/4MMZaI6rrAaXA3VABTjtNCH +7Ne186i3y0T58aotnUs/kRzx/QmvNecUjfggwtnqJ1h7SPL30Fd+WkEm0S/0ka2UR/R 8cxs5kZx6ZVOXqDMwNA0aZ9nlPEn+gGkkeYUI= Received: by 10.43.53.1 with SMTP id vo1mr7466550icb.2.1322135077094; Thu, 24 Nov 2011 03:44:37 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.171.72 with HTTP; Thu, 24 Nov 2011 03:44:16 -0800 (PST) In-Reply-To: <1322133704390-3533380.post@n3.nabble.com> References: <1321968903969-3527712.post@n3.nabble.com> <1322133704390-3533380.post@n3.nabble.com> From: Ian Lea Date: Thu, 24 Nov 2011 11:44:16 +0000 Message-ID: Subject: Re: highlighter by using term offsets To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 OK, so you've ruled out one possible cause. Progress! But if you're getting NPE on line 274 and line 274 reads TermPositionVector tpv = (TermPositionVector)reader.getTermFreqVector(hits[i].doc,"contents"); then something is null where it shouldn't be. Rule out everything you can and what is left should be the culprit. Basic low-tech debugging, step by step. If you really can't figure it out, post the smallest possible totally self-contained unit test or program that demonstrates the problem. And tell us which version of lucene you are using. -- Ian. On Thu, Nov 24, 2011 at 11:21 AM, starz10de wrote: > Hi, > > no hits are not null, I can print all retrieved docuemtns without problem. > > -- > View this message in context: http://lucene.472066.n3.nabble.com/highlighter-by-using-term-offsets-tp3527712p3533380.html > Sent from the Lucene - Java Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org