Here's an example. The book is about Wine in the world. Chapter 2 (say p20-50) is France. Within France, each region has a few pages. p25-30 covers Bordeaux, p30-35 covers Champagne, p36-40, Savoie p41-42.
Within the Bordeaux section, it could even happen that the word "Bordeaux" is not mentioned on every page. But the pages are still about the subject of Bordeaux.
The index should show:
Bordeaux 25-30
Burgundy 36-40
Champagne 30-35
Savoie 41-42
It's not impossible that the Burgundy section might mention also Bordeaux, say on pages 37, 38 and 39. These should NOT be grouped, but should appear individually as they are separate mentions, even if they are on consecutive pages. For these the index should show:
Bordeaux 37, 38, 39
Making overall for Bordeaux:
Bordeaux 25-30, 37, 38, 39
As this is very much a basic, generic requirement of an index, the user should have a way to achieve this.