Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-User

IndexWriter in 3.5

 

 

Lucene java-user RSS feed   Index | Next | Previous | View Threaded


emailgane at yahoo

Feb 9, 2012, 4:02 AM

Post #1 of 2 (230 views)
Permalink
IndexWriter in 3.5

Hello all,

In 3.0.3 the following code works fine but in 3.5, it throws exception "No segments found". In case of 3.0.3, Just creating writer will create files, segments.gen, segments_1 and write.lock. In case of 3.5, only write.lock is created.

Create Index Writer
Open Reader
Add documents

I need to do this. When the application starts, I have my writer and reader ready. I have a thread which crawls the filesytem and adds it to index and another one performs search. Is this intentional?

Regards
Ganesh



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene


ian.lea at gmail

Feb 9, 2012, 4:09 AM

Post #2 of 2 (227 views)
Permalink
Re: IndexWriter in 3.5 [In reply to]

Yes, this changed at some point. In recent releases nothing is
written to the index unless you close(), or maybe commit(), the
writer.


--
Ian.


On Thu, Feb 9, 2012 at 12:02 PM, Ganesh <emailgane [at] yahoo> wrote:
> Hello all,
>
> In 3.0.3 the following code works fine but in 3.5, it throws exception "No segments found". In case of 3.0.3, Just creating writer will create files, segments.gen,  segments_1 and write.lock. In case of 3.5, only write.lock is created.
>
> Create Index Writer
> Open Reader
> Add documents
>
> I need to do this. When the application starts, I have my writer and reader ready. I have a thread which crawls the filesytem and adds it to index and another one performs search. Is this intentional?
>
> Regards
> Ganesh
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
> For additional commands, e-mail: java-user-help [at] lucene
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene

Lucene java-user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.