Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-1688

Solr query response is not well supported

    XMLWordPrintable

    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())

      { bv.add(Blurb.findBlurb((Long)sd.getFieldValue("blurb.id_l"))); }

      model.addAttribute("blurbs", qr);

      Can this functionality be added to the search method?

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            rsax Robert Sax
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated: