After examination of your sample for the “Cambidge Univsty” case, this is what I suggest.
Apparently “Cambidge Univsty” was manually added at start of “Cambridge University” word sequence which was probably later indexed with application of Apply to all similar texts. You then have duplication of index entries: one “spot” with misspelling, one correct spanning the words.
I saved your sample as .fodt so that the XML is easily accessible. The “spot” indexes are encoded as XML element text :alphabetical-index-mark … />
. The important fact to note here is the slash in />
, meaning this XML element is “self-sufficient” and closed at its end.
“Range” index markers need an opening XML element and a closing one.
Considering these two remarks, it is then easy to design a regular expression to fix the faulty “erroneous” index entries (in fact to remove them because they are enclosed in another “range” markup.
The index key is recorded in the XML element as text:string-value="…"
.
With a text editor which supports regular expressions, such as KWrite on my Linux box (you didn’t mention your OS but there are equivalent on every OS), I replaced a pattern with “nothing”. The pattern is:
<[^<]+text:string-value="Cambidge Univsty"[^/]+/>
where [^<]+
means any sequence of characters different from <
and [^/]+
any sequence of characters different from /
.
You can adapt to remove other superfluous entries.
Where you have “simply” a misspelling, like “MIlano” for Milano", use the traditional replace command.
When done transforming the .fodt with the text editor, reopen it with Writer, update the index and save again as .odt.
To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!
In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.
(the edit only removed typos, adding nothing fundamental)