Search conditions

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

id url description


1 http://xyz.com/index.html home-site
2 http://xyz.com/about.html about-site
3 http://xyz.com/info.html info-site
4 http://xyz.com/disclaimer.html 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…

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs