If I've understood your question correctly, the answer is yes. Assuming the input data is coming from another file the flow will be along the lines of
. Open input file for reading . Open output file for writing . Open (or create) lucene index . For each input record - write to output file - add to lucene Then at the end close the files and the index and you're done. -- Ian. On Tue, Aug 13, 2013 at 9:16 AM, Jugal Kolariya <jugal.kolar...@rancoretech.com> wrote: > That only answer my 2nd part. > > My most important question still remains. > > " > > In my code case, I am creating a new file and writing data to that file. > > Now, when the file writing is in progress, I would like to create Lucene > Indexes. Once indexes are created, I can then perform operation on the > indexes. > > I want to know whether I can create indexes for the file on which the data > is still being getting written from the code. > > " > > Is it possible to create indexes of a file, data in which is still getting > written... > > Any guidance will be highly appreciated. > > > On 12-08-2013 PM 10:46, Michael McCandless wrote: >> >> You'll have to periodically re-index that document, if it's content is >> constantly changing. >> >> Alternatively, it's possible to index sub-documents so that each new >> "chunk" of content added because a new document, and then you join or >> group the results back into a single document ... >> >> Mike McCandless >> >> http://blog.mikemccandless.com >> >> >> On Mon, Aug 12, 2013 at 9:47 AM, Jugal Kolariya >> <jugal.kolar...@rancoretech.com> wrote: >>> >>> Hello, >>> I have a potential usecase for which I am not sure whether >>> using >>> lucene will help me or not. >>> >>> In my code case, I am creating a new file and writing data to that file. >>> >>> Now, when the file writing is in progress, I would like to create Lucene >>> Indexes. Once indexes are created, I can then perform operation on the >>> indexes. >>> >>> I want to know whether I can create indexes for the file on which the >>> data >>> is still being getting written from the code. >>> >>> If yes, what about the incremental changes which happen in file. Those >>> details wont be captured in the indexes. Does this effectively means >>> everytime I try to perform a search I will first create index and then >>> perform search operation. >>> >>> Any guidance on this will be highly appreciated. Javadoc does not seem to >>> provide relevant information on this. Lucene version is 4.4.0 >>> -- >>> >>> >>> Thanks & regards >>> /Jugal Kishore Kolariya >>> / >>> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org >> For additional commands, e-mail: java-user-h...@lucene.apache.org >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org