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 Maurits van Wijland <m....@quicknet.nl> on 2002/10/06 09:05:40 UTC
Iterate the index by document
Hi all,
Is there anyway one can iterate through the index
and retrieve all the documents?
Thanks anyone...
regards,
maurits.
----- Original Message -----
From: "Otis Gospodnetic" <ot...@yahoo.com>
To: "Lucene Users List" <lu...@jakarta.apache.org>
Sent: Saturday, October 05, 2002 5:46 PM
Subject: Re: Problem With org.apache.lucene.demo.IndexHTML class on Sun
Solaris
> You can try giving java more memory.
> Run this to see what options you need to specify: java -help.
>
> Otis
>
>
>
> --- Ravi Kothiyal <ra...@mail.com> wrote:
> > Dear Friends ,
> >
> > I am using lucene-1.2 . When I am trying to create a html index from
> > java org.apache.lucene.demo.IndexHTML -create -index /opt/index
> > /webdev
> >
> > It start creating index but after some time it gives Memory outof
> > range exception and quit the command . Can you please help me in this
> > matter.
> >
> > Best Regards
> >
> > Ravi
> > --
> > __________________________________________________________
> > Sign-up for your own FREE Personalized E-mail at Mail.com
> > http://www.mail.com/?sr=signup
> >
> > "Free price comparison tool gives you the best prices and cash back!"
> > http://www.bestbuyfinder.com/download.htm
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
>
>
> __________________________________________________
> Do you Yahoo!?
> Faith Hill - Exclusive Performances, Videos & More
> http://faith.yahoo.com
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Iterate the index by document
Posted by Peter Carlson <ca...@bookandhammer.com>.
Here is a code snippet of how to do it.
Note: this will return deleted documents too.
IndexReader ir = IndexReader.open(indexPath);
int maxDocs = ir.maxDocs();
//Object[]
dates = new String[maxDocs];
for (int i=0; i<maxDocs; i++) {
dates[i] = ir.document(i).get("pubDate");
}
--Peter
On Sunday, October 6, 2002, at 12:05 AM, Maurits van Wijland wrote:
> Hi all,
>
> Is there anyway one can iterate through the index
> and retrieve all the documents?
>
> Thanks anyone...
>
> regards,
>
> maurits.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>