SolrQuery solrQuery = new SolrQuery();
//set default search field (no longer supported in schema.xml
solrQuery.set("df", "name");
solrQuery.setQuery(name);
solrQuery.set("fl", "lily.id");
QueryResponse response = solr.query(solrQuery);
// Convert query result into a list of record IDs
SolrDocumentList solrDocumentList = response.getResults();
List<RecordId> recordIds = new ArrayList<RecordId>();
for (SolrDocument solrDocument : solrDocumentList) {
String recordId = (String) solrDocument.getFirstValue("lily.id");