[ 
https://issues.apache.org/jira/browse/LUCENE-3219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Male updated LUCENE-3219:
-------------------------------

    Attachment: LUCENE-3219.patch

Updated patch to incorporate Simon's suggestions:

- SearchWithSortTask now uses SortField.Type.valueOf().  This changes the 
exception thrown to an IllegalArgumentException.
- I haven't added Type to FieldCache.Parser since the constructor in SortField 
that accepts Parsers is deprecated and you can pull the Type from the 
CachedArrayCreator which is the preferred way of creating a SortField.  I did 
exploit this to reduce the code in the instanceof comparisons.

> Change SortField types to an Enum
> ---------------------------------
>
>                 Key: LUCENE-3219
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3219
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: core/search
>            Reporter: Chris Male
>            Priority: Minor
>         Attachments: LUCENE-3219.patch, LUCENE-3219.patch, LUCENE-3219.patch, 
> LUCENE-3219.patch
>
>
> When updating my SOLR-2533 patch, one issue was that the int value I had 
> given my new type had been used by another change in the mean time.  Since we 
> don't use these fields in a bitset kind of way, we can convert them to an 
> enum.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to