Question

To store numeric DocValues in lucene I use NumericDocValuesField.

Where are the values stored? In the memory or on the disk?

If it is in the memory than how can they be stored on the disk? and vice versa.

I'm using lucene 4.6.0.

Was it helpful?

Solution

Where are the values stored? In the memory or on the disk?

Depends on the Directory you are using.

If you are using FSDirectory.open(File), then it will be written on disk, and if you are using RAMDirectory, then the index will be kept in memory, together with all the fields (numeric or not).

Just use the relevant directory implementation to get your data on the desired media.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top