سؤال

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.

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top