Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1D6CBF0F2 for ; Fri, 5 Apr 2013 15:11:17 +0000 (UTC) Received: (qmail 80938 invoked by uid 500); 5 Apr 2013 15:11:16 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 80839 invoked by uid 500); 5 Apr 2013 15:11:16 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 80745 invoked by uid 99); 5 Apr 2013 15:11:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Apr 2013 15:11:16 +0000 Date: Fri, 5 Apr 2013 15:11:16 +0000 (UTC) From: "Adrien Grand (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SOLR-4676) Share a Lucene FieldType instance instead of creating on each call to createField() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SOLR-4676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13623698#comment-13623698 ] Adrien Grand commented on SOLR-4676: ------------------------------------ bq. The way you worded this suggests it's a problem for createField to return null. That was not my intention. I just wanted to say that returning null not only has implications on indexing but also on some components that use this method to transform strings to objects, such as grouping. > Share a Lucene FieldType instance instead of creating on each call to createField() > ----------------------------------------------------------------------------------- > > Key: SOLR-4676 > URL: https://issues.apache.org/jira/browse/SOLR-4676 > Project: Solr > Issue Type: Improvement > Components: Schema and Analysis > Reporter: David Smiley > Assignee: David Smiley > Priority: Minor > Attachments: SOLR-4676_Share_Lucene_FieldType_in_SchemaField.patch > > > I think the Lucene FieldType instances should be cached on Solr's SchemaField so that they don't have to be needlessly re-created for each indexed value that runs through Solr in SchemaField.createField(). The only obstacle I see to this is that getIndexOptions(field,val) takes the value, and if that value were to alter the logic then the FieldType can't be shared. This is a protected method and I don't see anything that overrides it, and the default implementation doesn't use the value. So I think it can be removed. Patch in progress... -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org