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

Robert Muir updated LUCENE-7039:
--------------------------------
    Attachment: LUCENE-7039.patch

Updated patch. I moved encode/decode methods to the respective XYZField, 
because we don't want these scattered about everywhere.

Also I removed the ExactPointQuery, instead adding these simple sugar methods 
like this:
{code}
public static PointRangeQuery newIntExact(String field, int value) {
  return newIntRange(field, value, true, value, true);
}
{code} 

Otherwise its a terrible amount of plumbing just to get a range query at the 
end of the day anyway. And I think since it does not "do anything different" 
behind the scenes this is better, e.g. users will not make some wierd effort to 
use the exact version to "optimize" or anything like that.

I think this is ok for a first step. We may want to do more refactoring/improve 
docs in a followup.

> Improve PointRangeQuery & co
> ----------------------------
>
>                 Key: LUCENE-7039
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7039
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Robert Muir
>         Attachments: LUCENE-7039.patch, LUCENE-7039.patch
>
>
> The point types are now preferred for indexing numeric fields, but 
> PointRangeQuery has some usability issues.
> I think we should make the following changes:
> * {{newIntRange()}}, {{newLongRange()}}, 
> {{newFloatRange()}},{{newDoubleRange()}}, {{newBinaryRange()}}: simple 1D 
> ranges consistent with NumericRangeQuery naming. 
> * {{newMultiIntRange()}}, {{newMultiLongRange()}}, {{newMultiFloatRange()}}, 
> {{newMultiDoubleRange()}}, {{newMultiBinaryRange()}}: multi-dimensional 
> versions of the above (take arrays, a bit harder to use, but the arrays have 
> correct type!)
> * {{toString()}} should be meaningful, it should not spew binary nonsense 
> unless you used a binary range!
> * improve javadocs
> If we like this, we could do similar improvements for the ExactPointQuery



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to