Jira was stuck on Lucene 3.3 for 7 years. The cost of update to the 4.0 version was so high and the benefits were so unknown, that the decision to remove this code debt was put off for so long.
In early 2018 it was decided we will finally upgrade Lucene to 7.3. Just making the product functionally correct took around 2-3 months. However, we didn't stop there. We invested more time to get the most of the momentum we had and improved our usage of Lucene. Now Jira indexing is faster, index is smaller, search is much faster and more exact, and the API is cleaner.
The process of the upgrade taught us how much one can gain from removing code debt, and how much improvement one can get by small fixes.
I will also talk about Lucene consultancy we had from Uwe Schindler and how it kickstarted the project.