You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Fleming Shi <fl...@gmail.com> on 2008/04/04 18:49:26 UTC
Ability to sort integer fields on large index
Here is the problem:
- Single Large index with upto 200 million documents
- Each document contains field using epoch timestamp format (padding
is required when creating range requests)
- One of the frequently used search query, a range request on the
timestamp field (10 digits)
- Other searches are fine, but the search using range request
(1207190000 to 1207190258), even small result set, still slow when
"sort" is requested
My questions:
- Is Lucene sorting then search or is it doing search then sort the
results?
- Is there a way to get this type of searches to return faster with
heavier weight on the timestamp not on relevancy?
Any insight would be greatly appreciated
/Regards
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Ability to sort integer fields on large index
Posted by Mark Miller <ma...@gmail.com>.
You should use DateTools to break up your time stamp into multiple
fields. This can work a lot faster than using a field with so many
different terms.
Are you using a RangeQuery? If you are, ditch it and use a
ConstantScoreRangeQuery. The former will expand the query to a boolean
that contains each matching unique term while the latter will just score
1 for each matching doc.
> My questions:
> - Is Lucene sorting then search or is it doing search then sort the
> results?
> - Is there a way to get this type of searches to return faster with
> heavier weight on the timestamp not on relevancy?
I believe that Lucene is scoring docs, and as it scores them, dropping
them into a priority queue that sorts...normally by the score, but
optionally by fields as well.
- Mark
On Fri, 2008-04-04 at 09:49 -0700, Fleming Shi wrote:
> Here is the problem:
>
> - Single Large index with upto 200 million documents
> - Each document contains field using epoch timestamp format (padding
> is required when creating range requests)
> - One of the frequently used search query, a range request on the
> timestamp field (10 digits)
> - Other searches are fine, but the search using range request
> (1207190000 to 1207190258), even small result set, still slow when
> "sort" is requested
>
> My questions:
> - Is Lucene sorting then search or is it doing search then sort the
> results?
> - Is there a way to get this type of searches to return faster with
> heavier weight on the timestamp not on relevancy?
>
> Any insight would be greatly appreciated
>
> /Regards
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org