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

Mailing List Archive: Lucene: Java-User
IndexWriter and Directory create param
 

Index | Next | Previous | View Flat


Leslie.Hughes at watercorporation

Jun 9, 2003, 11:14 PM


Views: 3202
Permalink
IndexWriter and Directory create param

Hi,

I'm doing something like:-

Directory dir = FSDirectory.getDirectory("myindex", true);
IndexWriter writer = new IndexWriter(dir, myAnalyser, true);

which gives me a nice clean index. But what if the create params are
different? If I open a directory with create=false then create a writer on
it with create = true will this give problems? Maybe I should do something
like

boolean flag = true/false;
Directory dir = FSDirectory.getDirectory("myindex", flag);
IndexWriter writer = new IndexWriter(dir, myAnalyser, false);


Whilst I'm on the subject, there doesn't appear to be a standard way of
creating a Directory, FSDir has a getDirectory whilst RAMDir uses a
constructor - shouldn't there be a standard method on the Directory
interface (like there is with close)? Or maybe a configurable
DirectoryFactory?


Ideas?

Bye

Les




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

Subject User Time
IndexWriter and Directory create param Leslie.Hughes at watercorporation Jun 9, 2003, 11:14 PM
    Re: IndexWriter and Directory create param otis_gospodnetic at yahoo Jun 10, 2003, 12:02 AM
    RE: IndexWriter and Directory create param Leslie.Hughes at watercorporation Jun 10, 2003, 12:17 AM
    RE: IndexWriter and Directory create param otis_gospodnetic at yahoo Jun 10, 2003, 12:22 AM

  Index | Next | Previous | View Flat
 
 


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