So for normal keyword matching we query Solr by writing name:bill or name:"bill watson". So as per the question we need to query over multiple fields which can be done using the below query
q=firstname:bill AND lastname:watson
If the values are fixed, its better to use Filer queries. Filter queries is used to specify a query that can be used to restrict the sure set of documents that can be returned, without influencing score. The queries specified with fq are cached independently from the main query thus it helps to speed up the complex queries. So if we want to query over multiple fields we can do using the below query :
Please Like and Share the CodingDefined Blog, if you find it interesting and helpful.