Understood, however code is rarely random/undefined. Does lucene look at % docs in each state, or the first doc or something else?
On Sun, Jun 9, 2019 at 1:58 PM Erick Erickson <[email protected]> wrote: > It’s basically undefined. When segments are merged that have dissimilar > definitions like this what can Lucene do? Consider: > > Faceting on a text (not sortable) means that each individual token in the > index is uninverted on the Java heap and the facets are computed for each > individual term. > > Faceting on a SortableText field just has a single term per document, and > that in the docValues structures as opposed to the inverted index. > > Now you change the value and start indexing. At some point a segment > containing no docValues is merged with a segment containing docValues for > the field. The resulting mixed segment is in this state. If you facet on > the field, should the docs without docValues have each individual term > counted? Or just the SortableText values in the docValues structure? > Neither one is right. > > Also remember that Lucene has no notion of schema. That’s entirely imposed > on Lucene by Solr carefully constructing low-level analysis chains. > > So I’d _strongly_ recommend you re-index your corpus to a new collection > with the current definition, then perhaps use CREATEALIAS to seamlessly > switch. > > Best, > Erick > > > On Jun 9, 2019, at 12:50 PM, John Davis <[email protected]> > wrote: > > > > Hi there, > > We recently changed a field from TextField + no docValues to > > SortableTextField which has docValues enabled by default. Once I did > this I > > do not see any facet values for the field. I know that once all the docs > > are re-indexed facets should work again, however can someone clarify the > > current logic of lucene/solr how facets will be computed when schema is > > changed from no docValues to docValues and vice-versa? > > > > 1. Until ALL the docs are re-indexed, no facets will be returned? > > 2. Once certain fraction of docs are re-indexed, those facets will be > > returned? > > 3. Something else? > > > > > > Varun > >
