: Interesting. I will definitely explore this. Just so I'm clear, we can : sort on docValues, but not filter? Is there any situation where external : file fields would work better than docValues?
For most field types that support docValues, you can still filter on it even if it's indexed="false" -- but the filtering may not be as efficient as using indexed values. for numeric fields you certainly can. One situation where ExternalFileFiled would probably preferable to doing inplace updates on docValues is when you know you need to update the value for *every* document in your collection in batch -- for large collections, looping over every doc and sending an atomic update would probably be slower then just replacing the external file. Another example when i would probably choose external file field over docValues is if the "keyField" was not the same as my uniqueKey field ... ie: if i have millions of documents each with a category_id that has a cardinality of ~100 categories. I could use the category_id field as the keyField to associate every doc w/some numeric "category_rank" value (that varies only per category). If i need/want to tweak 1 of those 100 category_rank values updating the entire external file just to change that 1 value is still probably much easier then redundemntly putting that category_rank field in every doc and sending an atomic update to all ~10K docs that have same category_id,category_rank i want to change. : : -----Original Message----- : From: Chris Hostetter [mailto:hossman_luc...@fucit.org] : Sent: Friday, February 2, 2018 12:24 PM : To: solr-user@lucene.apache.org : Subject: RE: External file fields : : : : I did look into updatable docValues, but my understanding is that the : : field has to be non-indexed (indexed="false"). I need to be able to sort : : on these values. External field fields are sortable. : : YOu can absolutely sort on a field that is docValues="true" : indexed="false" ... that is much more efficient then sorting on a field that is docValues="false" index="true" -- in the later case solr has to build a fieldcache (aka: run-time-mock-docvalues) from the indexed values the first time you try to sort on the field after a searcher is opened : : : : -Hoss : http://www.lucidworks.com/ : -Hoss http://www.lucidworks.com/