()
| 519 | return calculateIndexSize(); |
| 520 | } |
| 521 | } |
| 522 | |
| 523 | private String cachedIndexSizeKeyName() { |
| 524 | // avoid collision when we put index sizes for multiple cores in the same metrics request |
| 525 | return "indexSize_" + getName(); |
| 526 | } |
| 527 | |
| 528 | public int getSegmentCount() { |
| 529 | try { |
| 530 | return withSearcher( |
| 531 | solrIndexSearcher -> solrIndexSearcher.getRawReader().getIndexCommit().getSegmentCount()); |