Lucene : rebuilding the index

Discussion in 'Java' started by Zouplaz, Oct 19, 2005.

  1. Zouplaz

    Zouplaz Guest

    Hello, I'm new to Lucene and would to have your advice about index
    rebuilding.

    Whenever I try to recreate the index, I need to close the current
    IndexReader (I use only one IndexReader instance for all that web
    application). Without closing it first, I get messages like "unable to
    delete 4.cfs file" and some others.

    I've read the FAQ and the doc and nothing seems to prevent rebuiling an
    index without leaving a reader opened.

    What's wrong ?


    Thanks
     
    Zouplaz, Oct 19, 2005
    #1
    1. Advertising

  2. Zouplaz

    Chris Smith Guest

    Zouplaz <> wrote:
    > Hello, I'm new to Lucene and would to have your advice about index
    > rebuilding.
    >
    > Whenever I try to recreate the index, I need to close the current
    > IndexReader (I use only one IndexReader instance for all that web
    > application). Without closing it first, I get messages like "unable to
    > delete 4.cfs file" and some others.
    >
    > I've read the FAQ and the doc and nothing seems to prevent rebuiling an
    > index without leaving a reader opened.


    Most likely it's operating system dependent. On UNIX, you should have
    no problem deleting a file that's currently open. On Windows, you will
    have trouble. This is an area where it's not really possible to provide
    compatible behavior, so the Java API spec leaves it undefined, only
    guaranteeing that delete() will return false if, in fact, the delete
    operation fails.

    --
    www.designacourse.com
    The Easiest Way To Train Anyone... Anywhere.

    Chris Smith - Lead Software Developer/Technical Trainer
    MindIQ Corporation
     
    Chris Smith, Oct 19, 2005
    #2
    1. Advertising

  3. Zouplaz

    E.J. Pitt Guest

    Zouplaz wrote:
    > Hello, I'm new to Lucene and would to have your advice about index
    > rebuilding.
    >
    > Whenever I try to recreate the index, I need to close the current
    > IndexReader (I use only one IndexReader instance for all that web
    > application). Without closing it first, I get messages like "unable to
    > delete 4.cfs file" and some others.


    There is a lucene mailing list and you should ask on that list, but from
    memory (it's been two years) it is legal to rebuild a Lucene index while
    someone else is reading (as long as they're not deleting), so you can
    ignore the error. The file will get deleted later on.
     
    E.J. Pitt, Oct 20, 2005
    #3
  4. Zouplaz

    Zouplaz Guest

    "E.J. Pitt" <> wrote in news:RdJ5f.23174
    $:

    > Zouplaz wrote:
    >> Hello, I'm new to Lucene and would to have your advice about index
    >> rebuilding.
    >>
    >> Whenever I try to recreate the index, I need to close the current
    >> IndexReader (I use only one IndexReader instance for all that web
    >> application). Without closing it first, I get messages like "unable to
    >> delete 4.cfs file" and some others.

    >
    > There is a lucene mailing list and you should ask on that list, but from
    > memory (it's been two years) it is legal to rebuild a Lucene index while
    > someone else is reading (as long as they're not deleting), so you can
    > ignore the error. The file will get deleted later on.
    >


    Thank you... I'll will try !
     
    Zouplaz, Oct 23, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. rom

    rebuilding asp.net project

    rom, Nov 22, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    862
    Deepak
    Nov 24, 2004
  2. Replies:
    3
    Views:
    510
    gaidar
    May 28, 2005
  3. Keith Beef
    Replies:
    0
    Views:
    353
    Keith Beef
    Oct 23, 2007
  4. John Pritchard-williams

    Trying to open a Lucene-built index with Ferret...

    John Pritchard-williams, Nov 2, 2008, in forum: Ruby
    Replies:
    4
    Views:
    117
    Hugh Sasse
    Nov 3, 2008
  5. Tomasz Chmielewski

    sorting index-15, index-9, index-110 "the human way"?

    Tomasz Chmielewski, Mar 4, 2008, in forum: Perl Misc
    Replies:
    4
    Views:
    321
    Tomasz Chmielewski
    Mar 4, 2008
Loading...

Share This Page