I need the source code for STRI search module for implementing search in DXA Tridion.
I want to read the metadata values in while searching .Any way to do that or any out of box code.
Here are some links (which you can also find in the docs)
The DXA search is (out of the box) intended to be a very simple one box search and by default all content and metadata text fields are indexed into the body catchall index field.
If you want to ensure a specific metadata field is indexed separately, you can easily do this with SI4T (the search integration which the DXA uses) TBB parameters. Check the Custom Field Mapping section of the SI4T wiki.
In order to search this metadata field you will indeed need some custom code to generate a query with the format fieldName:queryString. Check out the Solr documentation on query syntax