You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Murray Johnston <mj...@tripadvisor.com> on 2020/07/13 18:52:20 UTC

JTS, IsWithin predicate, and multivalued fields

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

Posted by Murray Johnston <mj...@tripadvisor.com>.
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 <mj...@tripadvisor.com>
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.