lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-5610) Add Terms min/max
Date Sun, 20 Apr 2014 19:52:15 GMT

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

Michael McCandless updated LUCENE-5610:
---------------------------------------

    Attachment: LUCENE-5610.patch

Another patch, I think it's closer:

  * I re-implemented Terms.getMax default impl as a binary search
    digit by digit

  * I added FilteredTermsEnum.seekCeil, but that code is tricky ...

  * Impl'd MultiTerms.getMin/Max

  * Test cases, including showing we get the right result for min/max
    of numeric fields

I'd like to add some sugar to make the numeric case easier, e.g. maybe
NumericUtils.min/max(Terms)?

I think we can separately tackle a more efficient BlockTree impl for
min/maxTerm; I think it could just store this in the index and
fallback to super for older indices.


> Add Terms min/max 
> ------------------
>
>                 Key: LUCENE-5610
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5610
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Robert Muir
>         Attachments: LUCENE-5610.patch, LUCENE-5610.patch, LUCENE-5610.patch
>
>
> Having upper/lower bounds on terms could be useful for various optimizations in the future,
e.g. to accelerate sorting (if a segment can't compete, don't even search it), and so on.
> Its pretty obvious how to get the smallest term, but the maximum term for a field is
tricky, but worst case you can do it in ~ log(N) time by binary searching term space.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message