.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
Post a Comment