Details
-
Type:
Improvement
-
Status: Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.1.0.RELEASE
-
Fix Version/s: None
-
Component/s: ENTERPRISE
-
Labels:None
-
Environment:STS 2.5, Win 7
Description
The Solr addin for a bean provides a method to execute a query against Solr. This is nice, but there is some boilerplate code that is not provided. When you execute a Solr query against a bean class, it makes sense that the result is a list of beans. Instead, you have to manually sift through the result and query the beans individually, so that you can put the results into a listing display. This code always takes the following form:
SolrQuery sq = new SolrQuery(search.toString());
QueryResponse qr = Blurb.search(sq);
Vector<Blurb> bv = new Vector<Blurb>();
for (SolrDocument sd : qr.getResults())
model.addAttribute("blurbs", qr);
Can this functionality be added to the search method?