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

ASF GitHub Bot commented on SOLR-9529:
--------------------------------------

GitHub user treygrainger opened a pull request:

    https://github.com/apache/lucene-solr/pull/80

    SOLR-9529 - Make multivalued dates dynamic field use dates field type

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/treygrainger/lucene-solr SOLR-9529

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/lucene-solr/pull/80.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #80
    
----
commit 5428f19bdc72b2d2e55da465e99c4419449dca97
Author: Trey Grainger <c...@treygrainger.com>
Date:   2016-09-18T04:53:34Z

    SOLR-9529 - Make multivalued dates dynamic field use dates field type

----


> Dates Dynamic Field Inconsistently Defined in Schemas
> -----------------------------------------------------
>
>                 Key: SOLR-9529
>                 URL: https://issues.apache.org/jira/browse/SOLR-9529
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Trey Grainger
>            Priority: Minor
>
> There is a nice convention across all of the schemas that ship with Solr to 
> include field types for single valued fields (i.e. "string" -> "*_s", 
> "boolean" -> "*_b") and separate field types for multivalued fields (i.e. 
> "strings" -> "*_ss", "booleans" -> "*_bs"). Those definitions all follow the 
> pattern (using "string" as an example):
> <fieldType name="string" class="solr.StrField" sortMissingLast="true"/>
> <fieldType name="strings" class="solr.StrField" sortMissingLast="true" 
> multiValued="true"/>
> <dynamicField name="*_s" type="strings" indexed="true" stored="true"/>
> <dynamicField name="*_ss" type="strings" indexed="true" stored="true"/>
> For some reason, however, the "date" field type doesn't follow this pattern, 
> and is instead defined (inconsistently) as follows:
> <fieldType name="date" class="solr.TrieDateField" positionIncrementGap="0" 
> precisionStep="0"/>
> <fieldType name="dates" class="solr.TrieDateField" positionIncrementGap="0" 
> multiValued="true" precisionStep="0"/>
> <dynamicField name="*_dt" type="date" indexed="true" stored="true"/>
> <dynamicField name="*_dts" type="date" multiValued="true" indexed="true" 
> stored="true"/>
> Note specifically that the "*_dts" field should instead be referencing the 
> "dates" type and not the "date" type, and that subsequently the 
> multiValued="true" setting would become unnecessary on the "*_dts" 
> dynamicField definition.
> I'll get a patch posted for this. Note that nothing is functionally broken, 
> it's just inconsistent and could be confusing for someone looking through the 
> schema or seeing their multivalued dates getting indexed into the field type 
> defined for single valued dates.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to