You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Jan Høydahl (Created JIRA)" <ji...@apache.org> on 2012/03/08 23:11:58 UTC

[jira] [Created] (SOLR-3218) Range faceting support for CurrencyField

Range faceting support for CurrencyField
----------------------------------------

                 Key: SOLR-3218
                 URL: https://issues.apache.org/jira/browse/SOLR-3218
             Project: Solr
          Issue Type: Improvement
          Components: Schema and Analysis
            Reporter: Jan Høydahl
             Fix For: 4.0


Spinoff from SOLR-2202. Need to add range faceting capabilities for CurrencyField

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


[jira] [Updated] (SOLR-3218) Range faceting support for CurrencyField

Posted by "Andrew Morrison (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Morrison updated SOLR-3218:
----------------------------------

    Attachment: SOLR-3218.patch
    
> Range faceting support for CurrencyField
> ----------------------------------------
>
>                 Key: SOLR-3218
>                 URL: https://issues.apache.org/jira/browse/SOLR-3218
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis
>            Reporter: Jan Høydahl
>             Fix For: 4.0
>
>         Attachments: SOLR-3218-1.patch, SOLR-3218-2.patch, SOLR-3218.patch, SOLR-3218.patch
>
>
> Spinoff from SOLR-2202. Need to add range faceting capabilities for CurrencyField

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


[jira] [Commented] (SOLR-3218) Range faceting support for CurrencyField

Posted by "Jan Høydahl (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13226666#comment-13226666 ] 

Jan Høydahl commented on SOLR-3218:
-----------------------------------

CurrencyField is now in trunk :)
                
> Range faceting support for CurrencyField
> ----------------------------------------
>
>                 Key: SOLR-3218
>                 URL: https://issues.apache.org/jira/browse/SOLR-3218
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis
>            Reporter: Jan Høydahl
>             Fix For: 4.0
>
>         Attachments: SOLR-3218-1.patch, SOLR-3218-2.patch
>
>
> Spinoff from SOLR-2202. Need to add range faceting capabilities for CurrencyField

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


[jira] [Updated] (SOLR-3218) Range faceting support for CurrencyField

Posted by "Andrew Morrison (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Morrison updated SOLR-3218:
----------------------------------

    Attachment: SOLR-3218-1.patch
    
> Range faceting support for CurrencyField
> ----------------------------------------
>
>                 Key: SOLR-3218
>                 URL: https://issues.apache.org/jira/browse/SOLR-3218
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis
>            Reporter: Jan Høydahl
>             Fix For: 4.0
>
>         Attachments: SOLR-3218-1.patch
>
>
> Spinoff from SOLR-2202. Need to add range faceting capabilities for CurrencyField

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


[jira] [Updated] (SOLR-3218) Range faceting support for CurrencyField

Posted by "Andrew Morrison (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Morrison updated SOLR-3218:
----------------------------------

    Attachment: SOLR-3218-2.patch
    
> Range faceting support for CurrencyField
> ----------------------------------------
>
>                 Key: SOLR-3218
>                 URL: https://issues.apache.org/jira/browse/SOLR-3218
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis
>            Reporter: Jan Høydahl
>             Fix For: 4.0
>
>         Attachments: SOLR-3218-1.patch, SOLR-3218-2.patch
>
>
> Spinoff from SOLR-2202. Need to add range faceting capabilities for CurrencyField

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


[jira] [Commented] (SOLR-3218) Range faceting support for CurrencyField

Posted by "Jan Høydahl (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13225664#comment-13225664 ] 

Jan Høydahl commented on SOLR-3218:
-----------------------------------

Thanks for your work Andrew.

Just a small comment about pathces. We prefer that you name the patch simply SOLR-3218.patch every time. JIRA takes care of greying out the older versions. Also, is it possible to convert your GIT patch to svn compatible patch?

Good plan to jump over to CurrencyField once it is in trunk.
                
> Range faceting support for CurrencyField
> ----------------------------------------
>
>                 Key: SOLR-3218
>                 URL: https://issues.apache.org/jira/browse/SOLR-3218
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis
>            Reporter: Jan Høydahl
>             Fix For: 4.0
>
>         Attachments: SOLR-3218-1.patch, SOLR-3218-2.patch
>
>
> Spinoff from SOLR-2202. Need to add range faceting capabilities for CurrencyField

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


[jira] [Commented] (SOLR-3218) Range faceting support for CurrencyField

Posted by "Jan Høydahl (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13244409#comment-13244409 ] 

Jan Høydahl commented on SOLR-3218:
-----------------------------------

The conversion to String from CurrencyValue is a bit of a hack with instanceof tests, since I was not allowed to return String from getValue in CurrencyValue. Not very object oriented..
                
> Range faceting support for CurrencyField
> ----------------------------------------
>
>                 Key: SOLR-3218
>                 URL: https://issues.apache.org/jira/browse/SOLR-3218
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis
>            Reporter: Jan Høydahl
>             Fix For: 4.0
>
>         Attachments: SOLR-3218-1.patch, SOLR-3218-2.patch, SOLR-3218.patch, SOLR-3218.patch, SOLR-3218.patch
>
>
> Spinoff from SOLR-2202. Need to add range faceting capabilities for CurrencyField

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


[jira] [Commented] (SOLR-3218) Range faceting support for CurrencyField

Posted by "Lance Norskog (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13465322#comment-13465322 ] 

Lance Norskog commented on SOLR-3218:
-------------------------------------

+1 for this feature. It makes the currency type 10x more compelling.
                
> Range faceting support for CurrencyField
> ----------------------------------------
>
>                 Key: SOLR-3218
>                 URL: https://issues.apache.org/jira/browse/SOLR-3218
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis
>            Reporter: Jan Høydahl
>             Fix For: 4.1
>
>         Attachments: SOLR-3218-1.patch, SOLR-3218-2.patch, SOLR-3218.patch, SOLR-3218.patch, SOLR-3218.patch
>
>
> Spinoff from SOLR-2202. Need to add range faceting capabilities for CurrencyField

--
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


[jira] [Commented] (SOLR-3218) Range faceting support for CurrencyField

Posted by "Yonik Seeley (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13244188#comment-13244188 ] 

Yonik Seeley commented on SOLR-3218:
------------------------------------

bq. The alternative to using Strings is to move CurrencyValue to solrj package, what do you think?

Strings are good since it doesn't seem like we should push dependencies like this into solrj.
                
> Range faceting support for CurrencyField
> ----------------------------------------
>
>                 Key: SOLR-3218
>                 URL: https://issues.apache.org/jira/browse/SOLR-3218
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis
>            Reporter: Jan Høydahl
>             Fix For: 4.0
>
>         Attachments: SOLR-3218-1.patch, SOLR-3218-2.patch, SOLR-3218.patch, SOLR-3218.patch, SOLR-3218.patch
>
>
> Spinoff from SOLR-2202. Need to add range faceting capabilities for CurrencyField

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


[jira] [Commented] (SOLR-3218) Range faceting support for CurrencyField

Posted by "Andrew Morrison (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13225632#comment-13225632 ] 

Andrew Morrison commented on SOLR-3218:
---------------------------------------

Jan,

Once SOLR-2202 is trunked I'll update this patch to work with CurrencyField.
                
> Range faceting support for CurrencyField
> ----------------------------------------
>
>                 Key: SOLR-3218
>                 URL: https://issues.apache.org/jira/browse/SOLR-3218
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis
>            Reporter: Jan Høydahl
>             Fix For: 4.0
>
>         Attachments: SOLR-3218-1.patch, SOLR-3218-2.patch
>
>
> Spinoff from SOLR-2202. Need to add range faceting capabilities for CurrencyField

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


[jira] [Commented] (SOLR-3218) Range faceting support for CurrencyField

Posted by "Andrew Morrison (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13227284#comment-13227284 ] 

Andrew Morrison commented on SOLR-3218:
---------------------------------------

The latest patch is updated to account for the CurrencyField name.

I updated CurrencyValue.toString() to return "3.14,USD" for $3.14 rather than "314,USD". My feeling is that it's more straight forward to return strings that look like the values that were passed in to parse(). If we don't want toString to act as such, I can move that logic to CurrencyRangeEndpointCalculator.formatValue(). Also of interest, I'm injecting a '.' into the toString value of the long amount rather than using any existing floating point number formatters which might use a ',' rather than a '.' causing issues with the existing comma delimiter between the amount and currencyCode.

Hoss,

It was easy to allow the gap to be in any currency for which we have a conversion, so we're now allowing that. Start and end must still be of the same currency. I worry that relaxing the restriction on the gap may just be confusing without adding any real value. We may want to consider forcing gap to be the same as start and end so that things are more conceptually straight forward.
                
> Range faceting support for CurrencyField
> ----------------------------------------
>
>                 Key: SOLR-3218
>                 URL: https://issues.apache.org/jira/browse/SOLR-3218
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis
>            Reporter: Jan Høydahl
>             Fix For: 4.0
>
>         Attachments: SOLR-3218-1.patch, SOLR-3218-2.patch, SOLR-3218.patch
>
>
> Spinoff from SOLR-2202. Need to add range faceting capabilities for CurrencyField

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


[jira] [Updated] (SOLR-3218) Range faceting support for CurrencyField

Posted by "Jan Høydahl (Updated JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Høydahl updated SOLR-3218:
------------------------------

    Attachment: SOLR-3218.patch

Updated patch

* Patch is in correct format, starting form project root, not from solr
* Fixes indexOutOfRange bug for start=0
* Velocity GUI support
* SolrJ support
* Now puts plain String's in the NamedList instead of CurrencyValue's - easier to transport around

The alternative to using Strings is to move CurrencyValue to solrj package, what do you think?

Still needs many more test cases
                
> Range faceting support for CurrencyField
> ----------------------------------------
>
>                 Key: SOLR-3218
>                 URL: https://issues.apache.org/jira/browse/SOLR-3218
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis
>            Reporter: Jan Høydahl
>             Fix For: 4.0
>
>         Attachments: SOLR-3218-1.patch, SOLR-3218-2.patch, SOLR-3218.patch, SOLR-3218.patch, SOLR-3218.patch
>
>
> Spinoff from SOLR-2202. Need to add range faceting capabilities for CurrencyField

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


[jira] [Commented] (SOLR-3218) Range faceting support for CurrencyField

Posted by "Hoss Man (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13225639#comment-13225639 ] 

Hoss Man commented on SOLR-3218:
--------------------------------

bq. I believe start/end currency equality is enforced by MoneyType.compareTo which will throw an exception when end is compared to the first (start+gap).

Ah ..ok.  and then ultimately start+gap is compared to end (even if hardend is false) so you'll get a exception then.  ok fair enough.

bq. As far as enforcing currency equality being a good idea or not, it would make sense and I would prefer if start/end/gap currencies didn't need to be equal. This patch doesn't allow for that given the tradeoff of the utility of being able to use different currencies versus the annoyance of keeping a handle open to an ExchangeRateProvider in the places we'd need it.

I'm not completley understanding, but i don't need to: If it's easier/simpler (for now) to require that start/end/gap are all in the same currency that's fine -- we should just test/document that clearly .. we can alwasy relax that restriction later if you think of a clean/easy way to do it.

like i said before: it's probably silly to do it anyway, i just didn't understand if/what the complication was
                
> Range faceting support for CurrencyField
> ----------------------------------------
>
>                 Key: SOLR-3218
>                 URL: https://issues.apache.org/jira/browse/SOLR-3218
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis
>            Reporter: Jan Høydahl
>             Fix For: 4.0
>
>         Attachments: SOLR-3218-1.patch, SOLR-3218-2.patch
>
>
> Spinoff from SOLR-2202. Need to add range faceting capabilities for CurrencyField

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


[jira] [Commented] (SOLR-3218) Range faceting support for CurrencyField

Posted by "Hoss Man (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13228644#comment-13228644 ] 

Hoss Man commented on SOLR-3218:
--------------------------------

bq. I updated CurrencyValue.toString() to return "3.14,USD" for $3.14 rather than "314,USD". My feeling is that it's more straight forward to return strings that look like the values that were passed in to parse(). 

that sounds right.

the most important thing is that in the response from range faceting, where it gives you a (str) lower bound about a count, that lower bound should be a legal value when building a query against that field (ie: you can use it in a range query)  ... i'm pretty sure (if i understand correctly) that for CurrencyField that means "3.14,USD"

bq. I worry that relaxing the restriction on the gap may just be confusing without adding any real value. We may want to consider forcing gap to be the same as start and end so that things are more conceptually straight forward.

I believe you -- i've got no objection to locking that down, i just want to make sure that if we doc "you can't do this" that: a) the code actually fails if you try; and b) we have a test proving that the code will fail if you try.

(and if we decide later that it makes sense, we can relax things and change the test & docs)

                
> Range faceting support for CurrencyField
> ----------------------------------------
>
>                 Key: SOLR-3218
>                 URL: https://issues.apache.org/jira/browse/SOLR-3218
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis
>            Reporter: Jan Høydahl
>             Fix For: 4.0
>
>         Attachments: SOLR-3218-1.patch, SOLR-3218-2.patch, SOLR-3218.patch, SOLR-3218.patch
>
>
> Spinoff from SOLR-2202. Need to add range faceting capabilities for CurrencyField

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


[jira] [Commented] (SOLR-3218) Range faceting support for CurrencyField

Posted by "Andrew Morrison (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13225627#comment-13225627 ] 

Andrew Morrison commented on SOLR-3218:
---------------------------------------

Hoss,

The attached patch (SOLR-3218-1.patch) adds additional tests for EUR and GBP.

I believe start/end currency equality is enforced by MoneyType.compareTo which will throw an exception when end is compared to the first (start+gap).

As far as enforcing currency equality being a good idea or not, it would make sense and I would prefer if start/end/gap currencies didn't need to be equal. This patch doesn't allow for that given the tradeoff of the utility of being able to use different currencies versus the annoyance of keeping a handle open to an ExchangeRateProvider in the places we'd need it.

I'd be happy to take a look at making different currencies possible if there is enough interest.

It'll be good to add a test for start/end currency mismatches. I'll upload SOLR-3218-2.patch in a moment.

                
> Range faceting support for CurrencyField
> ----------------------------------------
>
>                 Key: SOLR-3218
>                 URL: https://issues.apache.org/jira/browse/SOLR-3218
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis
>            Reporter: Jan Høydahl
>             Fix For: 4.0
>
>         Attachments: SOLR-3218-1.patch, SOLR-3218-2.patch
>
>
> Spinoff from SOLR-2202. Need to add range faceting capabilities for CurrencyField

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


[jira] [Commented] (SOLR-3218) Range faceting support for CurrencyField

Posted by "Andrew Morrison (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13226849#comment-13226849 ] 

Andrew Morrison commented on SOLR-3218:
---------------------------------------

That was fast. I'll submit an updated patch soon.
                
> Range faceting support for CurrencyField
> ----------------------------------------
>
>                 Key: SOLR-3218
>                 URL: https://issues.apache.org/jira/browse/SOLR-3218
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis
>            Reporter: Jan Høydahl
>             Fix For: 4.0
>
>         Attachments: SOLR-3218-1.patch, SOLR-3218-2.patch
>
>
> Spinoff from SOLR-2202. Need to add range faceting capabilities for CurrencyField

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


[jira] [Commented] (SOLR-3218) Range faceting support for CurrencyField

Posted by "Andrew Morrison (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13225616#comment-13225616 ] 

Andrew Morrison commented on SOLR-3218:
---------------------------------------

Hoss Mann had posted the following on SOLR-2202
-----------------------------------------------

a) CurrencyField (and by extension "CurrencyValue") gets my vote

b) i really only reviewed the facet stuff in SOLR-2202-solr-10.patch (i know Jan has already been reviewing the more core stuff about the type) ... it makes me realize that we really need to refactor the range faceting code to be easier to do in custom FieldTypes, but that's certainly no fault of this issue and can be done later.

The facet code itself looks correct but my one concern is that (if i'm understanding all of this MoneyValue conversion stuff correctly) it should be possible to facet with start/end/gap values specified in any currency, as long as they are all consistent – but there is not test of this situation. the negative test only looks at using an inconsistent gap, and the positive tests only use USD, or the "default" which is also USD. We should have at least one test that uses something like EUR for start/end/gap and verifies that the counts are correct given the conversion rates used in the test.

incidentally: I don't see anything actually enforcing that start/end are in the same currency – just that gap is in the same currency as the values it's being added to, so essentially that start and gap use hte same currenty. But I'm actually not at all clear on why there is any attempt to enforce that the currencies used are the same, since the whole point of the type (as i understand it) is that you can do conversions on the fly – it may seem silly for someone to say facet.range.start=0,USD & facet.range.gap=200,EUR & facet.range.end=1000,YEN but is there any technical reason why we can't let them do that?
                
> Range faceting support for CurrencyField
> ----------------------------------------
>
>                 Key: SOLR-3218
>                 URL: https://issues.apache.org/jira/browse/SOLR-3218
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis
>            Reporter: Jan Høydahl
>             Fix For: 4.0
>
>         Attachments: SOLR-3218-1.patch
>
>
> Spinoff from SOLR-2202. Need to add range faceting capabilities for CurrencyField

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


[jira] [Updated] (SOLR-3218) Range faceting support for CurrencyField

Posted by "Andrew Morrison (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Morrison updated SOLR-3218:
----------------------------------

    Attachment: SOLR-3218.patch
    
> Range faceting support for CurrencyField
> ----------------------------------------
>
>                 Key: SOLR-3218
>                 URL: https://issues.apache.org/jira/browse/SOLR-3218
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis
>            Reporter: Jan Høydahl
>             Fix For: 4.0
>
>         Attachments: SOLR-3218-1.patch, SOLR-3218-2.patch, SOLR-3218.patch
>
>
> Spinoff from SOLR-2202. Need to add range faceting capabilities for CurrencyField

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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