On 11/16/2013 12:39 AM, Otis Gospodnetic wrote: > Can one introduce DocValues (by adding them to the schema.xml) post facto? > If that is done, do newly added documents end up using DocValues, > while the old ones remain without DocValues?
Short answer: You need to reindex. Long answer: That would very likely cause some big problems for sorting and facets. Without docValues, sorting and facets use the indexed field. With docValues, these features will use docValues instead, because performance is typically better. Prior to Solr 4.5, docValues required that every document have a value for the field. Because some of the docs would not have anything in docValues, exceptions might be thrown on these older versions if you use sorting or facets. I have not tried it, but it seems likely. This assumes of course that these older versions don't just throw an exception at core startup because the existing segments are missing the files for docValues. Solr 4.5 eliminated the limitation described above, so exceptions are less likely. Unfortunately results from sorting or facets would likely be incorrect, because only a subset of the documents would have docValues data. If the older versions do somehow manage to avoid exceptions, they would likely also produce incorrect results. Thanks, Shawn
