When all documents have the same score, Solr does not guarantee any stable or 
insertion-based ordering. The order you see is effectively an implementation 
detail of Lucene’s internal index structure.

Key points:

Equal scores ⇒ undefined order unless you explicitly sort.
Lucene may return docs based on internal docID order, which:
depends on segment creation/merging
can change between Solr/Lucene versions
can change between reindexes, even with identical data
Upgrade from Solr 7.4 → 9.10 includes Lucene changes that affect:
segment merging
docID assignment
query execution paths
→ so different ordering is expected.

Important clarifications:

Results are not returned in insertion order.
Deleting/recreating the index + dual cores does not preserve order.
SQL import order only matters if you explicitly sort in Solr — otherwise it’s 
irrelevant.
q=*:* or queries where all docs score equally give you no deterministic order.
How to verify:

Run the same query with &debugQuery=true on both systems.
You’ll see identical scores and no secondary sort — confirming the behavior is 
expected.

Correct solution:

Always specify an explicit secondary sort, e.g.:
sort=score desc, id asc

or any stable field (date, ID, etc.).
Bottom line:

If you rely on default score sorting and scores are equal, you are relying on 
undefined behavior. Solr is doing nothing wrong.

Reply via email to