Search conditions

In my database, I’ve some records like the example:

id url description


1 .xyz Domain Names | Join Generation XYZ home-site
2 .xyz Domain Names | Join Generation XYZ about-site
3 .xyz Domain Names | Join Generation XYZ info-site
4 .xyz Domain Names | Join Generation XYZ disclaimer of the site
5 http://alpha.com/home.html home-site

I made an index over the different url’s. Now I want to search the query
‘html’, but the different urls can only be two times in the result (the
ids 1, 2 and 5)
The id 1 and 2 are from the same url, and id 5 are an other url.

How can I realize this requirements?
Thanks for helping…