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

David Smiley commented on LUCENE-7449:
--------------------------------------

Nice work Nick!

* Most users will be wondering what the difference is between intersects & 
crosses.  Can you either add an explanation or a URL reference to OGC/other 
specs?  The 4-way int/long/float/double duplication makes this annoying I 
realize.
* Looking at RangeFieldQuery.createWeight.IntersectVisitor.visit() I can't help 
but wonder if this should be a switch statement.  Or perhaps instead, now that 
we are on Java 8, up front initialize a Lambda predicate function depending on 
the query type, so that visit() merely calls it with the leaf to know if it 
should should add the doc to the BulkAdder.

example pseudocode:
{noformat}
interface LeafPredicate { boolean test(final byte[] range); }
// in buildMatchingDocIdSet:
switch (queryType)
case QueryType.WITHIN: predicate = target::contains
{noformat}

> Add CROSSES query support to RangeField
> ---------------------------------------
>
>                 Key: LUCENE-7449
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7449
>             Project: Lucene - Core
>          Issue Type: New Feature
>            Reporter: Nicholas Knize
>         Attachments: LUCENE-7449.patch
>
>
> {{RangeField}} currently supports {{INTERSECTS}}, {{WITHIN}}, and 
> {{CONTAINS}} query behavior. This feature adds support for an explicit 
> {{CROSSES}} query. Unlike {{INTERSECT}} and {{OVERLAP}} queries the 
> {{CROSSES}} query finds any indexed ranges whose interior (within range) 
> intersect the interior AND exterior (outside range) of the query range.



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