Results 1 to 2 of 2
  1. #1
    bibhas.paul is offline Member
    Join Date
    Dec 2014
    Posts
    1
    Rep Power
    0

    Default Lucene Index with file system

    I have created a Lucene indexer which will periodically look into a file system folder to read the content of latest files to update the lucene catalog.

    Problem arise, If we delete any file from above folder then above Indexer doesn't understand which file gets deleted so the same could be remove from catalog.

    Can any one please tell me how to resolve this issue.

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: Lucene Index with file system

    What you could do is create a sort of trigger file for all files which are indexed, so if you have a file 'document.doc' then you also create an empty file 'document.doc.idx' at the moment you indexed it. If at one point you do a scan of the existing documents and you only have the file 'document.doc.idx' left over but not the 'document.doc' file, then its time to remove the lucene index record.

    Alternatively you can of course periodically run a scheduled task to rebuild the entire index from scratch in a quiet moment, usually at night.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Replies: 0
    Last Post: 06-27-2012, 11:57 AM
  2. Lucene Index Writing on SSD Drive
    By Jigna Joshi in forum Lucene
    Replies: 0
    Last Post: 11-04-2011, 07:02 AM
  3. How do I index a database file using lucene
    By pranav123 in forum Lucene
    Replies: 2
    Last Post: 05-23-2011, 01:14 PM
  4. Replies: 0
    Last Post: 10-29-2010, 08:15 PM
  5. How to index the special characters in Lucene
    By talktoudaykumar in forum Lucene
    Replies: 2
    Last Post: 04-23-2009, 07:51 AM

Tags for this Thread

Posting Permissions

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