Copy the pcFields.java file to your Web application's class files directory and compile. For example, in Apache-Tomcat this would go in the WEB-INF/classes directory. Also copy the code for the two List functions (addPrimoRecords, addPrimoFacets) and supporting functions in the attached codesource.txt file somewhere appropriate in your application.
* * *
In your Solr application you will have a SolrDocumentList instance, e.g.
QueryResponse qr = new QueryResponse();
SolrDocumentList sdl = new SolrDocumentList();
sdl = qr.getResults();
You will add the primo results to your existing List by updating the SolrDocumentList like this:
sdl = addPrimoRecords(sdl, primoResults);
Make sure you instantiate the pcFields class somewhere appropriate in your application:
public pcFields pcfields = new pcFields();
You will also need to change all field name references in the pcFields.java file and the codesource.txt file (e.g. "materialtype_text" etc.) to match the field names that you use in your Solr application.
* * *
In your Solr application you will also have a Facet List:
List facets = qr.getLimitingFacets();
So similarly, with the facets, you will add the primo results to your existing facet List like this:
facets = addPrimoFacets(facets, megaResults, inst_group);