i read about how i could use solr to search in my threads but i dont quite understand how it works and i cant find any articles explaining this for a total beginner.
could someone explain briefly how solr works and how it communicate with mysql and php?
First take a look at this tutorial.
With solr you will need to have an xml (or csv) document which will be pushed to solr (process is called updating; indexing is the process to make fields available for search). The format of xml is sth. like:
Look here for more details.
But in your case you could use a crawler (appropriated if different or external sources) to get different document formats recognized.
Try to understand if Nutch could help here.
E.g. take a look at this presentation for an explanation about solr, lucene and nutch.