lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <s...@elyograg.org>
Subject Re: Adding DocValues after or in the middle of indexing
Date Sat, 16 Nov 2013 10:14:21 GMT
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


Mime
View raw message