Return-Path: Delivered-To: apmail-jakarta-lucene-dev-archive@apache.org Received: (qmail 76885 invoked from network); 20 May 2002 17:28:18 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 20 May 2002 17:28:18 -0000 Received: (qmail 8283 invoked by uid 97); 20 May 2002 17:28:17 -0000 Delivered-To: qmlist-jakarta-archive-lucene-dev@jakarta.apache.org Received: (qmail 8266 invoked by uid 97); 20 May 2002 17:28:16 -0000 Mailing-List: contact lucene-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Developers List" Reply-To: "Lucene Developers List" Delivered-To: mailing list lucene-dev@jakarta.apache.org Received: (qmail 8252 invoked by uid 50); 20 May 2002 17:28:15 -0000 Date: 20 May 2002 17:28:15 -0000 Message-ID: <20020520172815.8251.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: lucene-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 7912] - Field.isIndexed() returns false for UnStored fields X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7912 Field.isIndexed() returns false for UnStored fields ------- Additional Comments From cutting@apache.org 2002-05-20 17:28 ------- Looks good to me. A couple of minor improvements: The line: return (String[]) v.toArray(new String[v.size()]); Would be more efficient if you use a static for the prototype, e.g.: private static final STRING_ARRAY_PROTO = new String[0]; ... return (String[]) v.toArray(STRING_ARRAY_PROTO); This saves the allocation of an extra array. Note: toArray is not in Java 1.1, so if we decide to keep Lucene 1.1 compatible, then this will have to be re-written as a 'for' loop anyway... And in SegmentsReader.getIndexedFieldNames, you don't need the intermediate Vector: you can create the array and fill it directly from the Hashtable: Enumeration it = h.keys(); String[] result = new String[h.size()]; for (int i = 0; i < h.size(); i++) { result[i] = it.nextElement(); } return result; This saves the allocation of the Vector, and is less code too. -- To unsubscribe, e-mail: For additional commands, e-mail: