[ 
https://issues.apache.org/jira/browse/SOLR-1131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780950#action_12780950
 ] 

Grant Ingersoll commented on SOLR-1131:
---------------------------------------

bq. Is this a good idea?

Not sure yet. 

bq. Why don't we add a new interface MutlValuedFieldType which extends 
FieldType for this 

Aren't we just substituting a very simple construction for an instanceof check?

I was possibly thinking of a couple of other options, too:
1. add a boolean on FT for isMultiField which returns false by default, then we 
could check that
2. Add a threadlocal that stores a preconstructed array of size one which could 
then simply be set for the single field case, which is the most common case.

My gut, however, says the object is very short lived and is likely to be of 
negligible cost.

> Allow a single field type to index multiple fields
> --------------------------------------------------
>
>                 Key: SOLR-1131
>                 URL: https://issues.apache.org/jira/browse/SOLR-1131
>             Project: Solr
>          Issue Type: New Feature
>          Components: Analysis
>            Reporter: Ryan McKinley
>            Assignee: Grant Ingersoll
>         Attachments: SOLR-1131-IndexMultipleFields.patch, SOLR-1131.patch
>
>
> In a few special cases, it makes sense for a single "field" (the concept) to 
> be indexed as a set of Fields (lucene Field).  Consider SOLR-773.  The 
> concept "point" may be best indexed in a variety of ways:
>  * geohash (sincle lucene field)
>  * lat field, lon field (two double fields)
>  * cartesian tiers (a series of fields with tokens to say if it exists within 
> that region)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to