Hello. I am going to switch to newest (4.10.2) version of Lucene and I'd like to make some optimization in my index and code. I would like to use DocValuesField to get values but also for filtering and sorting. So here I have some questions: If I'd like to use range filter (FieldCacheRangeFilter) I need to store a value in XxxDocValuesField, but if i want to use terms filter (FieldCacheTermsFilter) I need to store a value in SortedDocValuesField. So it looks like if I want to use range and terms filters I need to have two different fields. Am I right? Am I using it correctly?
Another thing is Sort. I can choose between SortedNumericSortField and SortField. First one requires SortedNumericDocValues, another NumericDocValuesField. Is there any(big) difference in performance? Should I use SortedNumericSortField (adding another field to the index)? And the last one. Am I right that all corresponding DocValuesField will be removed from index when doc is removed? I saw an IndexWriter method for an update doc value but no delete method for doc value. Regards Piotr