You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "David Smiley (JIRA)" <ji...@apache.org> on 2018/06/26 17:47:00 UTC

[jira] [Commented] (SOLR-12520) Switch DateRangeField from NumberRangePrefixTree to LongRange

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

David Smiley commented on SOLR-12520:
-------------------------------------

It remains to be seen how DateRangeField (NumberRangePrefixTreeStrategy + DateRangePrefixTree) compares to LongRange for _realistic queries_.  By realistic queries, I mean for a query such as find all indexed ranges intersecting a particular month -- or similar simple intervals.  DateRangePrefixTree is deliberately aligned to useful/meaningful units of time we humans work in (at least in the Gregorian Calendar) that allow for queries to sometimes amount to visiting one term, or perhaps more terms but not a ton.  Both Lucene Points codec + the legacy numeric trie stuff it replaced were agnostic of this.  I expect that LongRange will have better indexing characteristics but that's not what's being optimized for in DateRangeField.

Another intentional purpose of DateRangeField was to allow fast faceting using the underlying terms.  That was never wired into Solr though, and there was a bug or something to be worked out.

> Switch DateRangeField from NumberRangePrefixTree to LongRange
> -------------------------------------------------------------
>
>                 Key: SOLR-12520
>                 URL: https://issues.apache.org/jira/browse/SOLR-12520
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Nicholas Knize
>            Priority: Major
>
> Since graduating {{Range}} field types in LUCENE-7740 we should consider switching SOLR's {{DateRangeField}} from using {{NumberRangePrefixTree}} in the {{spatial-extras}} module to {{LongRange}} in {{lucene-core}}. Not only will this provide a nice performance improvement but nothing will depend on {{NumberRangePrefixTree}} so it can be deprecated and removed. To maintain backcompat we could consider refactoring it from {{spatial-extras}} to SOLR and then removing it once the switch to {{LongRange}} is complete.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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