Results 1 to 2 of 2
  1. #1
    pranav123 is offline Member
    Join Date
    May 2011
    Posts
    3
    Rep Power
    0

    Default How to invalidate the previous indexes when some document is added in the index?

    Hi,

    I am a newbie to lucene and I want to know how can I invalidate the previous indexes whenever I add some document to it? Or whenever I add some field to it?

    Do I have to reindex the whole lucene index? I assume No, because that will take a hell lot of time.
    So what should I do?

    I am using Lucene 3.1.

    Thanks in advance.

  2. #2
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    620
    Rep Power
    4

    Default

    see InstantiatedIndexWriter (Lucene 3.1.0 API), org.apache.lucene.document.Document)

    I mean to look at IndexWriter#updateDocument methods.
    Skype: petrarsentev
    http://TrackStudio.com

Similar Threads

  1. Replies: 13
    Last Post: 07-19-2010, 12:04 PM
  2. Replies: 1
    Last Post: 02-05-2010, 11:41 AM
  3. Replies: 1
    Last Post: 11-04-2009, 06:58 PM
  4. How to detect browser closing to invalidate a jsp session
    By kumar_ps78 in forum JavaServer Pages (JSP) and JSTL
    Replies: 13
    Last Post: 08-13-2009, 04:56 PM
  5. compare newly added Vector Element with previous elements
    By nidhirastogi in forum Advanced Java
    Replies: 10
    Last Post: 09-10-2008, 02:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •