Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 80445 invoked from network); 2 Jun 2009 19:49:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Jun 2009 19:49:28 -0000 Received: (qmail 24653 invoked by uid 500); 2 Jun 2009 19:49:38 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 24575 invoked by uid 500); 2 Jun 2009 19:49:38 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 24400 invoked by uid 99); 2 Jun 2009 19:49:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jun 2009 19:49:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jun 2009 19:49:28 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7563B234C1E9 for ; Tue, 2 Jun 2009 12:49:07 -0700 (PDT) Message-ID: <589237839.1243972147480.JavaMail.jira@brutus> Date: Tue, 2 Jun 2009 12:49:07 -0700 (PDT) From: "Michael McCandless (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Resolved: (LUCENE-1631) CLONE -You cannot sort on fields that don't exist In-Reply-To: <743750730.1241795987277.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-1631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael McCandless resolved LUCENE-1631. ---------------------------------------- Resolution: Won't Fix I meant to resolve as Won't Fix. > CLONE -You cannot sort on fields that don't exist > ------------------------------------------------- > > Key: LUCENE-1631 > URL: https://issues.apache.org/jira/browse/LUCENE-1631 > Project: Lucene - Java > Issue Type: Bug > Components: Search > Affects Versions: 2.4.1 > Environment: Operating System: other > Platform: Other > Reporter: steve neo > Assignee: Yonik Seeley > Fix For: 1.9 > > > I still get this error in 2.4.1 - if field does not exist in index, there is nullPointException if it search over multiple index. In following test code, there is runtime error, here is part of test code. > indexSingleFieldDocs(new Field[]{new Field("ds", "xyz", Field.Store.YES, Field.Index.NOT_ANALYZED) > , new Field("dsc", "hello", Field.Store.NO, Field.Index.ANALYZED)}); > indexSingleFieldDocs(new Field[]{new Field("ds", "def", Field.Store.YES, Field.Index.NOT_ANALYZED) > , new Field("dsc", "hello", Field.Store.NO, Field.Index.ANALYZED)}); > ... > QueryParser p = new QueryParser("dsc", new StandardAnalyzer()); > Query q = p.parse("hello"); > Hits hits = searcher.search(q,new Sort("ds")); > If change "ds" to some others, got this exception: > java.lang.RuntimeException: field "ds" does not appear to be indexed > at org.apache.lucene.search.ExtendedFieldCacheImpl$5.createValue(ExtendedFieldCacheImpl.java:173) > at org.apache.lucene.search.FieldCacheImpl$Cache.get(FieldCacheImpl.java:71) > at org.apache.lucene.search.ExtendedFieldCacheImpl.getAuto(ExtendedFieldCacheImpl.java:127) > at org.apache.lucene.search.FieldSortedHitQueue.comparatorAuto(FieldSortedHitQueue.java:487) > at org.apache.lucene.search.FieldSortedHitQueue$1.createValue(FieldSortedHitQueue.java:184) > at org.apache.lucene.search.FieldCacheImpl$Cache.get(FieldCacheImpl.java:71) > at org.apache.lucene.search.FieldSortedHitQueue.getCachedComparator(FieldSortedHitQueue.java:167) > at org.apache.lucene.search.FieldSortedHitQueue.(FieldSortedHitQueue.java:55) > at org.apache.lucene.search.TopFieldDocCollector.(TopFieldDocCollector.java:43) > at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:121) > at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:113) > at org.apache.lucene.search.Hits.(Hits.java:90) > at org.apache.lucene.search.Searcher.search(Searcher.java:61) > at com.edgenius.test.lucene.TestLucene.testSort(TestLucene.java:207) -- 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: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org