Quantcast

Lucene loosing documents?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Lucene loosing documents?

Mufaddal Khumri
Hi,

I am trying to index 20349 records. When I index using the FSDirectory I
get 20349 documents - this is correct. Now when I ude the RAMDirectory
to create my index and write all documents from the RAMDirectory to the
FSDirectory I only get 20340 documents consistently. This is the only
change I made. Why do I loose 9 documents?

int counter = 1;
while(counter <= 20349)
{
        ramWriter.addDocument(doc);
}

Directory d[] = {ramDir};
fsWriter.addIndexes(d);
fsWriter.optimize();
ramWriter.close();

fsWriter.close();

Any ideas as to why I am missing the 9 documents?

Thanks.

------------------------------------------------------------------------------------------
This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity
to whom they are addressed. If you have received this
email in error please notify the system manager. Please
note that any views or opinions presented in this email
are solely those of the author and do not necessarily
represent those of the company. Finally, the recipient
should check this email and any attachments for the
presence of viruses. The company accepts no liability for
any damage caused by any virus transmitted by this email.
Consult your physician prior to the use of any medical
supplies or product.
------------------------------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lucene loosing documents?

Otis Gospodnetic-2
Can you close the ramDirectory first and then add it via fsWriter and
see if that solves it?

Otis

--- Mufaddal Khumri <[hidden email]> wrote:

> Hi,
>
> I am trying to index 20349 records. When I index using the
> FSDirectory I
> get 20349 documents - this is correct. Now when I ude the
> RAMDirectory
> to create my index and write all documents from the RAMDirectory to
> the
> FSDirectory I only get 20340 documents consistently. This is the only
> change I made. Why do I loose 9 documents?
>
> int counter = 1;
> while(counter <= 20349)
> {
> ramWriter.addDocument(doc);
> }
>
> Directory d[] = {ramDir};
> fsWriter.addIndexes(d);
> fsWriter.optimize();
> ramWriter.close();
>
> fsWriter.close();
>
> Any ideas as to why I am missing the 9 documents?
>
> Thanks.
>
>
------------------------------------------------------------------------------------------

> This email and any files transmitted with it are confidential
> and intended solely for the use of the individual or entity
> to whom they are addressed. If you have received this
> email in error please notify the system manager. Please
> note that any views or opinions presented in this email
> are solely those of the author and do not necessarily
> represent those of the company. Finally, the recipient
> should check this email and any attachments for the
> presence of viruses. The company accepts no liability for
> any damage caused by any virus transmitted by this email.
> Consult your physician prior to the use of any medical
> supplies or product.
>
------------------------------------------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Lucene loosing documents?

Mufaddal Khumri
In reply to this post by Mufaddal Khumri
Hi,

Thanks. That seems to work. I guess calling the close before the add
causes the last few documents to be flushed out or something?

-----Original Message-----
From: Otis Gospodnetic [mailto:[hidden email]]
Sent: Thursday, April 28, 2005 2:19 PM
To: [hidden email]
Subject: Re: Lucene loosing documents?

Can you close the ramDirectory first and then add it via fsWriter and
see if that solves it?

Otis

--- Mufaddal Khumri <[hidden email]> wrote:

> Hi,
>
> I am trying to index 20349 records. When I index using the
> FSDirectory I
> get 20349 documents - this is correct. Now when I ude the
> RAMDirectory
> to create my index and write all documents from the RAMDirectory to
> the
> FSDirectory I only get 20340 documents consistently. This is the only
> change I made. Why do I loose 9 documents?
>
> int counter = 1;
> while(counter <= 20349)
> {
> ramWriter.addDocument(doc);
> }
>
> Directory d[] = {ramDir};
> fsWriter.addIndexes(d);
> fsWriter.optimize();
> ramWriter.close();
>
> fsWriter.close();
>
> Any ideas as to why I am missing the 9 documents?
>
> Thanks.
>
>
------------------------------------------------------------------------
------------------

> This email and any files transmitted with it are confidential
> and intended solely for the use of the individual or entity
> to whom they are addressed. If you have received this
> email in error please notify the system manager. Please
> note that any views or opinions presented in this email
> are solely those of the author and do not necessarily
> represent those of the company. Finally, the recipient
> should check this email and any attachments for the
> presence of viruses. The company accepts no liability for
> any damage caused by any virus transmitted by this email.
> Consult your physician prior to the use of any medical
> supplies or product.
>
------------------------------------------------------------------------
------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...