Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.1.0.RELEASE
-
None
-
None
-
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?