Reading through the websites of both Solr and Lucene, they don't sound similar. If this is for the project you mentioned elsewhere, then Lucene is almost certainly the proper choice.
With respect to HTML, I think Lucene comes with an example
you should be able to adapt. If you're serious about it then you really should work through "Lucene in Action "; it'll save you much time and effort.