lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Rainer <>
Subject Customizing levels in DateRangePrefixTree (or using number ranges directly?)
Date Thu, 09 Apr 2015 07:56:55 GMT

I'm using DateRangePrefixTree and NumberRangePrefixTreeStrategy to show "time histograms"
for my search results. This works perfectly. But is there a way to configure the way the levels
are defined in the index?

In my case, documents only come with integer ranges (from year X to year Y), but span a wide
interval (4000BC - present, since it's about archaeological data). So I'm always retrieving
my facets at year granularity, and then usually end up with lots (1000s) of values, which
I'm then "downsampling" again into ~25 buckets for UI display. The downsampling eats up a
good fraction of the overall response time. I assume there are still ways to optimize it.
But if there was a way to configure the indexing levels upfront, so that they better match
the granularity of my data, I could probably avoid much of the resampling altogether (e.g.
set up the index so that it indexes at century and decade granularity, naively speaking).

Is there a way to do this? I'd be perfectly happy with a solution that only works for integer
ranges rather than dates, but the plain NumberRangePrefixTree doesn't seem directly usable
as it's an abstract base class. Or am I still thinking along the wrong lines?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message