.net - How do I delete old documents from Lucene/Lucene.NET -


What is the idiomatic way to remove old documents from a Lucene Index?

I have a date field (YYYYMMdhhmmss) on all documents, and I would like to remove anything more than one day old (for example).

Should I execute the filtered search or calculate through the documents of the index?

I'm sure the question is the same, which is running on the Lucene platform.

Thank you!

You should search for YYYYMMdd * because the current data is stored as text strings After you get the results, you can use IndexReader.delete to remove such documents, which you are not interested in. I think this is the best way to get it.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -