Maybe if I knew what you needed. I started to rewrite the stuff for you into a smaller working example but by the time I got the CGI it became less clear what you really want to index and search on and how you want to show it. Looking at your data I think a database would be a superior solution to a search engine like Lucy but maybe the data is just for testing and this is just a practice/toy application?
The surface issue in the results you're having might be as simple to fix as discarding this stuff. It certainly doesn't belong and is probably muddying your chance at understanding what's really going on with searches and the indexing.
my @exi=split (/\n/,$excerpt);
...
foreach my $v(@exi){
if ($v=~ /$q/){
$report .= qq|
<br />
$v
<br />|;
|