How to remove old documents from Lucene / Lucene.NET

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

I have a date field (YYYYMMddhhmmss) in all documents and I would like to delete something more than one day (for example).

Should I do a filtered search or list through IndexReader documents?

I am sure that the question is the same no matter what platform Lucene runs on.

Thanks!

+3
source share
2 answers

YYYYMMdd * , . , IndexReader.delete, , . , .

+3

API Lucene.

"". . ( ), IndexReader.deleteDocuments(term) .

Query, , .

+2

Source: https://habr.com/ru/post/1720321/


All Articles