Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 32275 invoked from network); 29 Jun 2009 07:56:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Jun 2009 07:56:11 -0000 Received: (qmail 2426 invoked by uid 500); 29 Jun 2009 07:56:20 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 2365 invoked by uid 500); 29 Jun 2009 07:56:20 -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 2355 invoked by uid 99); 29 Jun 2009 07:56:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Jun 2009 07:56:20 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of oren.liat@gmail.com designates 209.85.220.215 as permitted sender) Received: from [209.85.220.215] (HELO mail-fx0-f215.google.com) (209.85.220.215) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Jun 2009 07:56:10 +0000 Received: by fxm11 with SMTP id 11so1726428fxm.5 for ; Mon, 29 Jun 2009 00:55:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=2PN8JXo7cC8L9tx5lIqSaSIFDJ6vrvWUc4k9Z7Q3YEw=; b=dI0A/rhCv6KUPZ6XnspVdSqflyMvSznrtNo7pUCO0eVgXI5mYLqbdhFt1LOysqW9uB xy44arrjjIVtxb8V/Hhf106rw/JC6Jlenwyn+YphMvxIVCgnKPI9gzKQIuG0F5HBGqFP rtbn8uxH7hEXCD2xYhZ8RIot81inBiF41WzkI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=c0igThFfxhRzQl+rrcIv29w3UKd3PEv2TGirhq9yRr4HZtQcuI6vHn11jeK6KDu/CV 5j7J0EuEdenFmCSILsFQ9GXwpTOh+qLGhCzWhy8redkmyaMO/fNlbvkUtp46uArI1Zie xac/AuBpzWKvGoexvmD4e9azVHqf2n5iCcMJE= MIME-Version: 1.0 Received: by 10.86.74.6 with SMTP id w6mr1496950fga.50.1246262150038; Mon, 29 Jun 2009 00:55:50 -0700 (PDT) In-Reply-To: References: Date: Mon, 29 Jun 2009 10:55:50 +0300 Message-ID: Subject: Re: MultiSegmentReader problems - current is null From: liat oren To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=000e0cd299ccc006c7046d7804c3 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd299ccc006c7046d7804c3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit The full error is: Exception in thread "main" java.lang.NullPointerException at Priorart.Lucene.Expert.index.MultiSegmentReader$MultiTermDocs.freq(Mu ltiSegmentReader.java:709) I looked at issue LUCENE-781- it might relates to this one?? Though it is closed since 2007. Hope anyone can help with it - even if I try double totalFreqT = ir.termDocs().freq(); - to get the freq using termDocs of a multi-segment, I get the same error.. Thanks alot, Liat 2009/6/28 liat oren > Hi, > > I have an index that is a multi-segment index (how come it is created this > way?) > > When I try to get the freq of a term at the following way: > TermDocs tDocs = this.indexReader.termDocs(term); > tf = tDocs.freq(); > the greq method : > public int freq() > { > return current.freq(); > } > is in MultiSegmentReader. > > The current is null, so I get an exception. > > Should I initialize current? > How can I avoid this problem? > How can I avoid having a multi-segment index? > > Many thanks, > Liat > --000e0cd299ccc006c7046d7804c3--