Return-Path: Delivered-To: apmail-lucene-solr-dev-archive@minotaur.apache.org Received: (qmail 89750 invoked from network); 17 Dec 2009 10:06:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Dec 2009 10:06:43 -0000 Received: (qmail 79361 invoked by uid 500); 17 Dec 2009 10:06:41 -0000 Delivered-To: apmail-lucene-solr-dev-archive@lucene.apache.org Received: (qmail 79268 invoked by uid 500); 17 Dec 2009 10:06:41 -0000 Mailing-List: contact solr-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-dev@lucene.apache.org Delivered-To: mailing list solr-dev@lucene.apache.org Received: (qmail 79249 invoked by uid 99); 17 Dec 2009 10:06:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Dec 2009 10:06:41 +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; Thu, 17 Dec 2009 10:06:39 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 19F96234C498 for ; Thu, 17 Dec 2009 02:06:18 -0800 (PST) Message-ID: <1319666113.1261044378090.JavaMail.jira@brutus> Date: Thu, 17 Dec 2009 10:06:18 +0000 (UTC) From: "Noble Paul (JIRA)" To: solr-dev@lucene.apache.org Subject: [jira] Updated: (SOLR-1664) Some Methods in FieldType actually should be in SchemaField In-Reply-To: <1824560977.1261035378235.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/SOLR-1664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Noble Paul updated SOLR-1664: ----------------------------- Description: The following methods are only overridable from FieldType. {code:java} public Field createField(SchemaField field, String externalVal, float boost) ; protected Field.TermVector getFieldTermVec(SchemaField field,String internalVal) ; protected Field.Store getFieldStore(SchemaField field,String internalVal); protected Field.Index getFieldIndex(SchemaField field,String internalVal); public ValueSource getValueSource(SchemaField field, QParser parser); public Query getRangeQuery(QParser parser, SchemaField field, String part1, String part2, boolean minInclusive, boolean maxInclusive) ; {code} if there is anything specific to be done on a per-field basis it is not possible. if we allow overriding SchemaField it will be more flexible. I hope this can make it simpler to implement SOLR-1131 So ,there are two ways of overriding a functionality. * Override Fieldtype#createSchemaField() and provide new implementation of SchemaField * Override methods from FieldType itself(if the behavior is not per field ) as it is now SchemaField is made non-final and Solr only invokes methods on SchemaField only was: A lot of methods in FieldType actually should be in SchemaField. As we can see , all the following methods require SchemaField as an argument. The point is that most of the information is only available w/ SchemaField {code:java} public Field createField(SchemaField field, String externalVal, float boost) ; protected Field.TermVector getFieldTermVec(SchemaField field,String internalVal) ; protected Field.Store getFieldStore(SchemaField field,String internalVal); protected Field.Index getFieldIndex(SchemaField field,String internalVal); public ValueSource getValueSource(SchemaField field, QParser parser); public Query getRangeQuery(QParser parser, SchemaField field, String part1, String part2, boolean minInclusive, boolean maxInclusive) ; {code} As an enhancement we should treat FieldType as a factory for SchemaField and make SchemaField non final > Some Methods in FieldType actually should be in SchemaField > ----------------------------------------------------------- > > Key: SOLR-1664 > URL: https://issues.apache.org/jira/browse/SOLR-1664 > Project: Solr > Issue Type: Improvement > Reporter: Noble Paul > Fix For: 1.5 > > Attachments: SOLR-1664.patch > > > The following methods are only overridable from FieldType. > {code:java} > public Field createField(SchemaField field, String externalVal, float boost) ; > protected Field.TermVector getFieldTermVec(SchemaField field,String internalVal) ; > protected Field.Store getFieldStore(SchemaField field,String internalVal); > protected Field.Index getFieldIndex(SchemaField field,String internalVal); > public ValueSource getValueSource(SchemaField field, QParser parser); > public Query getRangeQuery(QParser parser, SchemaField field, String part1, String part2, boolean minInclusive, boolean maxInclusive) ; > {code} > if there is anything specific to be done on a per-field basis it is not possible. if we allow overriding SchemaField it will be more flexible. > I hope this can make it simpler to implement SOLR-1131 > So ,there are two ways of overriding a functionality. > * Override Fieldtype#createSchemaField() and provide new implementation of SchemaField > * Override methods from FieldType itself(if the behavior is not per field ) as it is now > SchemaField is made non-final and Solr only invokes methods on SchemaField only -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.