dcsimg
Conflict in writing
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Alfred_Sniff
Posted On:   Tuesday, April 26, 2005 08:30 AM

hi, First, I'm sorry to repeat myself or to ask stupid questions... I have a JSP page with a servlet where an user can upload a file. This file will be index by Lucene. There's no problem when one user is uploading. When more than one user is uploading, only one can index the file. There's probably a way to make this work but I don't know how. The goal is to allow a large number of users to connect and upload files at the same time here is the way I do : if (IndexReader.indexExists("c:\indexLucene")) { writerLucene = new IndexWriter("c:\indexLucene", new FrenchAnalyzer(), false); } else { writerLucene = new IndexWriter("c:\indexLucene&qu   More>>

hi,

First, I'm sorry to repeat myself or to ask stupid questions... I have a JSP page with a servlet where an user can upload a file. This file will be index by Lucene. There's no problem when one user is uploading. When more than one user is uploading, only one can index the file. There's probably a way to make this work but I don't know how. The goal is to allow a large number of users to connect and upload files at the same time

here is the way I do :

			
if (IndexReader.indexExists("c:\indexLucene"))
{

writerLucene = new IndexWriter("c:\indexLucene", new FrenchAnalyzer(), false);
}
else
{
writerLucene = new IndexWriter("c:\indexLucene", new FrenchAnalyzer(), true);
}

writerLucene.maxFieldLength=Integer.MAX_VALUE;
//writerLucene.mergeFactor = 2;
//writerLucene.minMergeDocs = 1;



Thanks for answers
Regards    <<Less

Re: Conflict in writing

Posted By:   Richard_Krenek  
Posted On:   Tuesday, April 26, 2005 09:03 AM

You can do something like http://cooltext.com/ They have a queueing mechanism. In your case, any number of users can upload PDFs, those PDFs are then queued FIFO. The page the user is looking at can refresh itself every few seconds letting the user know how many PDFs are queued before theres and the estimated time to finish. Hope this gives you some ideas.
About | Sitemap | Contact