lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charlie Hubbard <charlie.hubb...@gmail.com>
Subject Re: Extracting all documents for a given search
Date Sat, 17 Sep 2011 01:57:39 GMT
Ah because that will easily toss an out of memory exception.  Besides I
already tried it.  I don't want a huge array holding all of those documents.
 I really just want to be called back when a new document is found by the
searcher, and I can load the Document, find my object, and drop that to a
file.  I thought that's essentially what a Collector is, being an interface
that is called back whenever it encounters a Document that matches a query.
 Any elaboration on that?

Charlie

On Fri, Sep 16, 2011 at 2:30 PM, Eddie Drapkin <edwardd@wolfram.com> wrote:

> On 9/16/2011 11:30 AM, Charlie Hubbard wrote:
>
>> I'm trying to reimplement a feature I had under 2.x in 3.x.  I have a
>> feature where a zip file for all of the documents returned by a search can
>> be exported.  Now with the newer APIs you have to put an upper limit on
>> the
>> search so it won't return more than X documents.  I'd like to extract all
>> of
>> the documents matched by that search.  I've been trying to understand how
>> Collectors work, but I'm not sure I see the connection.  If I wanted to
>> walk
>> over each document that matches the search and save the contents to the
>> zip
>> how would that best be done?
>>
>> Thanks
>> Charlie
>>
>>
> Why not just get Integer.MAX_VALUE records from the newer APIs?
>
> Thanks,
> Eddie
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.**apache.org<java-user-unsubscribe@lucene.apache.org>
> For additional commands, e-mail: java-user-help@lucene.apache.**org<java-user-help@lucene.apache.org>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message