There is a workaround available called DirectIODirectory. You can subclass it and override useDirectIO() method to return true only for fdt files. It wraps another FSDirectory (e.g. MMapDirectory) and delegates everything back to it, but for those where useDirectIO() returns true it implements its own IndexInput:


The default uses DirectIO only for merges to not pollute page cache during merging index segments.


Am 21.10.2023 um 01:54 schrieb Justin Borromeo:
Is there any way to keep field data files out of the operating system's
page cache? We only use fdt for highlighting and don't need to keep it warm
in memory.  From what I understand, the operating system is in control of
what files get loaded into the page cache. Does Lucene have any mechanisms
to explicitly prevent them from being cached?  Is it even possible with

Justin Borromeo

Uwe Schindler
Achterdiek 19, D-28357 Bremen
eMail: u...@thetaphi.de

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