lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter W. <>
Subject Re: Sort Performance Question
Date Tue, 20 Mar 2007 20:50:07 GMT

The response time for sorts depends on number of results.
If you don't need all documents returned you could use a filter.

One idea would be to use DateTools to save your dates as Strings
and build your query with FilteredQuery passing in a custom filter
to search this field.

The filter would be constructed using two RangeFilters setting upper
and lower date boundaries (Strings) combined using NumberTools and

With a subset of your matching results sorting should be much faster.


Peter W.

On Mar 20, 2007, at 12:39 PM, David Seltzer wrote:

> Hi All,
> I have a sort performance question:
> I have a fairly large index consisting of chunks of full-text
> transcriptions of television, radio and other media, and I'm trying to
> make it searchable and sortable by date.  ...
> Initially I was sorting based on a unixtime field, but having read  
> up on
> it, I switched to a slightly easier format: "yyyyMMDDHHmm". Now this
> value is still larger than an int, so I went one step farther and
> created two more fields for test purposes: SortDate, which is yyyyMMdd
> and SortTime which is HHmm. When I sort by SortDate then SortTime the
> results come in even slower, around 4300ms. ...

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

View raw message