Solr currency function and asymmetric rates

2020-05-12 Thread Murray Johnston
I have a question / potential bug.  The currency function created in 
https://issues.apache.org/jira/browse/SOLR-4138 first converts the field to the 
default currency before then converting to the currency requested as part of 
the function.  When dealing with asymmetric rates, that leads to incorrect 
conversions.  Is this intended?  If not, is it required that 
CurrencyFieldType.getValueSource convert to default currency?


Thanks,


-Murray


Re: Solr currency function and asymmetric rates

2020-05-15 Thread Murray Johnston
I didn't see any response to this so I'm going to conclude that this is 
unexpected behavior and file a Jira ticket.

____
From: Murray Johnston 
Sent: Tuesday, May 12, 2020 3:39:14 PM
To: solr-user@lucene.apache.org
Subject: Solr currency function and asymmetric rates

Message from External Sender

I have a question / potential bug.  The currency function created in 
https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.apache.org_jira_browse_SOLR-2D4138&d=DwIFAw&c=9Hv6XPedRSA-5PSECC38X80c1h60_XWA4z1k_R1pROA&r=Lq9lNqDiwvMQkBC0o6YEad-z2TbtIWGO1Suwsz_Idvo&m=Y6eHhsypMRcTwmpwyZXk0FvgjDBkS9ai7WAu4yT2RDA&s=lV8SSGroDcMito64o1K4w0kX-TOWded5CEmtjt1Q69c&e=
  first converts the field to the default currency before then converting to 
the currency requested as part of the function.  When dealing with asymmetric 
rates, that leads to incorrect conversions.  Is this intended?  If not, is it 
required that CurrencyFieldType.getValueSource convert to default currency?


Thanks,


-Murray


JTS, IsWithin predicate, and multivalued fields

2020-07-13 Thread Murray Johnston
Hi all,


I'm trying to use (abuse[1]) a SpatialRecursivePrefixTreeFieldType field that 
is multivalued with the IsWithin JTS predicate.  After some testing, it appears 
that all values of the field must satisfy the predicate in order for the 
document to be returned.  Is that expected?  It seems somewhat different than 
other semantics for a multivalued field.


Thanks,


-Murray



[1] My use case is an extension of the SpatialForTimeDurations usage.  My 
prices have a "time in advance" that must also be satisfied.  My idea was to 
model this as a line instead of just a point and verify that the entire line 
IsWithin the bounding box but I might be blocked from doing this if it won't 
work for a multivalued field.




Re: JTS, IsWithin predicate, and multivalued fields

2020-07-13 Thread Murray Johnston
Replying to myself and for posterity:


This is expected behavior per the comments on 
https://issues.apache.org/jira/browse/LUCENE-4644 that originally added the 
IsWithin predicate.


Too bad, I was really pleased with my idea but I can see why it was implemented 
the way it was.  Back to the drawing board



From: Murray Johnston 
Sent: Monday, July 13, 2020 11:52:20 AM
To: solr-user@lucene.apache.org
Subject: JTS, IsWithin predicate, and multivalued fields

Message from External Sender

Hi all,


I'm trying to use (abuse[1]) a SpatialRecursivePrefixTreeFieldType field that 
is multivalued with the IsWithin JTS predicate.  After some testing, it appears 
that all values of the field must satisfy the predicate in order for the 
document to be returned.  Is that expected?  It seems somewhat different than 
other semantics for a multivalued field.


Thanks,


-Murray



[1] My use case is an extension of the SpatialForTimeDurations usage.  My 
prices have a "time in advance" that must also be satisfied.  My idea was to 
model this as a line instead of just a point and verify that the entire line 
IsWithin the bounding box but I might be blocked from doing this if it won't 
work for a multivalued field.