milliseconds as unique keys are a bad idea unless you are 100% certain
you'll never be creating 2 docs in the same millisecond.  And are you
saying the log record A1 from file a.log indexed at 14:00 will have
the same unique id as the same record from the same file indexed at
14:30 or will it be different?

If the same, you can use updateDocument as Uwe suggested.

If different, and you want to replace all the docs already indexed
from file a.log with the current contents of a.log, I suggest you
store the file name as an indexed field for each record from each file
and, when you reindex a file, start by calling
IndexWriter.deleteDocuments(Term t) where t is a Term that references
the file name.

--
Ian.


On Tue, Oct 1, 2013 at 2:20 PM, gudiseashok <gudise.as...@gmail.com> wrote:
> I am afraid, my document in the above code has already a unique-key (will
> milli-seconds I hope this is enough to differentiate with another records).
>
> My requirement is simple, I have a folder with a.log,b.log and c.log files
> which will be updated every 30 minutes, I want to update the index of these
> files and re-indexing them. I am trying to explore the lucene-indexing but
> some how I am not able to get much help other than demo java files.
>
> Kindly suggest.
>
>
> Regards
> Ashok Gudise.
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Rendexing-problem-Indexing-folder-size-is-keep-on-growing-for-same-remote-folder-tp4092835p4092934.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-user-h...@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to