Millions of fields in an index makes some operations slow, opening a new searcher in particular [LUCENE-7648]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
Got a Solr user who was experiencing very slow commit times on their index – 10 seconds or more. This is on a 650K document index sized at about 420MB, with all Solr cache autowarm counts at zero.
After some profiling of their Solr install, they finally determined that the problem was an abuse of dynamic fields. The largest .fnm file in their index was 130MB, with the total of all .fnm files at 140MB. The user estimates that they have about 2 million fields in this index. They will be fixing the situation so the field count is more reasonable.
While I do understand that millions of fields in an index is a pathological setup, and that some parts of Lucene operation are always going to be slow on an index like that, 10 seconds for a new searcher seemed excessive to me. Perhaps there is an opportunity for a **little** bit of optimization?
The version is old – 4.10.4. They have not yet tried a newer version.
---
Migrated from [LUCENE-7648](https://issues.apache.org/jira/browse/LUCENE-7648) by Shawn Heisey (@elyograg)
Linked issues:
- [SOLR-10014](https://issues.apache.org/jira/browse/SOLR-10014)
Contributor guide
Research direction
Start by profiling the new-searcher path on an index with millions of fields and large .fnm files, using the reported 10-second commit behavior as the baseline. Determine which operation dominates and verify that any optimization improves new-searcher time without changing search behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100