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 981EE188A1 for ; Fri, 29 May 2015 12:18:58 +0000 (UTC) Received: (qmail 12491 invoked by uid 500); 29 May 2015 12:18:56 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 12438 invoked by uid 500); 29 May 2015 12:18:56 -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 12420 invoked by uid 99); 29 May 2015 12:18:56 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 May 2015 12:18:56 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 2B5861A3F86 for ; Fri, 29 May 2015 12:18:56 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.131 X-Spam-Level: X-Spam-Status: No, score=-0.131 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id YVPbJPQvYi83 for ; Fri, 29 May 2015 12:18:48 +0000 (UTC) Received: from nm1-vm2.bullet.mail.ne1.yahoo.com (nm1-vm2.bullet.mail.ne1.yahoo.com [98.138.91.17]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 4BF544540D for ; Fri, 29 May 2015 12:18:48 +0000 (UTC) Received: from [98.138.101.129] by nm1.bullet.mail.ne1.yahoo.com with NNFMP; 29 May 2015 12:18:40 -0000 Received: from [98.138.87.10] by tm17.bullet.mail.ne1.yahoo.com with NNFMP; 29 May 2015 12:18:40 -0000 Received: from [127.0.0.1] by omp1010.mail.ne1.yahoo.com with NNFMP; 29 May 2015 12:18:40 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 967512.51831.bm@omp1010.mail.ne1.yahoo.com X-YMail-OSG: j_OD7.QVM1kHOwqPpO9ve.fUkzX4Fh2.ALfB5ZshsDz7sAISBC5ODEzzfITi9Ym S1HumlHoFBM0Ph1qKETh0_nKvzU5jdcHFnhYPlJ9SfNvmelqT_19jRgJuZl0MMOh3QvWZJKkFgdP xz_aCS_w9zrDBjw8lRN.e6XbLt8js3FKzbeQt.LZRHD1lzwVaQhsXmO_7UK2NmeaDjwcp0FWy7K6 zpx1Sx3_u4eZr04vXrfpg58qq1fxMFs_jqz7538zoUEFVTBWDw6D57IERGnQ7cYwWW_pnuUsyMzw alcgfaw2pyS3RyOqek27qry8EjtY6wKXrCV4MYWGeTwEuoAq.pK3_qElXGND7Wq.Uo79sxYQPnc1 TmDwb3D8XrTjk9c4zv.Wj8RF6EcZro2iQiTsUtNf30WY_36qlSLRQLVNbc1KR78qEzImc83DL17h ihrLEHoBwdEsXUyPa2x3akunnhV26DH9ILEYRAjYJ2vNcKzRVZtIDsXjVopZ.VPWccydM2BAyvyw O_XW.RQrnE2tq8g-- Received: by 98.138.105.245; Fri, 29 May 2015 12:18:40 +0000 Date: Fri, 29 May 2015 12:18:39 +0000 (UTC) From: Ahmet Arslan Reply-To: Ahmet Arslan To: Lucene Users Message-ID: <63780462.1063371.1432901919123.JavaMail.yahoo@mail.yahoo.com> Subject: IllegalArgumentException: docID must be >= 0 and < maxDoc=48736112 (got docID=2147483647) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hello List, When a similarity returns NEGATIVE_INFINITY, hits[i].doc becomes 2147483647. Thus, exception is thrown in the following code: for (int i = 0; i < hits.length; i++) { int docId = hits[i].doc; Document doc = searcher.doc(docId); } I know it is an awkward to return infinity (comes from log(0)), but exception looks like equally awkward and uniformative. Do you think is this something improvable? Can we do better handling here? Thanks, Ahmet --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org