lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amin Mohammed-Coleman <ami...@gmail.com>
Subject Re: TermRangeQuery
Date Fri, 26 Nov 2010 15:03:39 GMT
Hi

Basically test my ids look like:

AAA-231
AAD-234
ADD-123

Didn't now about the collator, i was going to do a custom sort based on the number part of
the id.


Thanks
Amin

On 26 Nov 2010, at 14:39, Ian Lea wrote:

> Absolutely, as long as your ids will sort as you expect.
> 
> I'm not clear what you mean by XDF-123 but if you've got
> 
> AAA-123
> AAA-124
> ...
> ABC-123
> ABC-234
> etc.
> 
> then you'll be fine.  If they don't sort so neatly you can use the
> TermRangeQuery constructor that takes a Collator but note the
> performance warning in the javadocs.
> 
> 
> --
> Ian.
> 
> 
> On Fri, Nov 26, 2010 at 2:18 PM, Amin Mohammed-Coleman <aminmc@gmail.com> wrote:
>> Hi All
>> 
>> I was wondering whether I can use TermRangeQuery for my use case.  I have a collection
of ids (represented as XDF-123) and I would like to do a search for all the ids (might be
in the range of 10000) and for each matching id I want to get the corresponding data that
is stored in the index (for example the document contains id and string value).  I am using
a custom collector to collect that string value for each match.  Is it ok to use a TermRangeQuery
for the ids rather than creating a massive query string?
>> 
>> 
>> Thanks
>> Amin
>> ---------------------------------------------------------------------
>> 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
> 


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


Mime
View raw message