lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <>
Subject Re: Impact of changing precisionStep on already indexed content
Date Sat, 27 May 2017 12:52:14 GMT
On 5/26/2017 11:00 AM, Jaroslaw Rozanski wrote:
> What is the impact of changing "precisionStep" without re-indexing
> document preceding the change?
> Scenario:
> Assume you have index with field:
> <field name="event" type="tdate" indexed="true" stored="true"/>
> <fieldType name="tdate" class="solr.TrieDateField" precisionStep="6"
> positionIncrementGap="0"/>
> So `tdate` of precision 6. Now let's assume you were to change `tdate`
> to be of precision 8.
> According to [1] the change will affect how many terms will be stored in
> index after type change is in place.
> But will that affect queries and sorting if index contains documents
> with date precisionStep 6 and 8 at the same time?

Some queries could mysteriously stop working correctly, in a way that
might take a long time to notice.  I'm pretty sure that the
precisionStep is used in the query process, to speed up the queries
based on the step indicated in the schema. The values searched first (at
higher tiers) could be way off what's correct for the documents indexed
with a different step.  At query time, Solr can only go by what's in the
schema, it doesn't look at the index when it is putting its queries

At a minimum, this could mean you won't get some results that match your
query, particularly for range queries, but if the planets align just
right, I can also imagine it including at least one document that
shouldn't be there.

I've got no idea about how it might affect sorting.  My instinct says
that it won't affect sorting, but I do not actually know.

You should definitely completely reindex.  This is probably one
situation where deleting the entire index and restarting is NOT
required, but if it were me, that is the way I'd do it.


View raw message