Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-4627

Warmup queries don't work for grouping

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.1
    • Fix Version/s: 4.1
    • Component/s: search
    • Labels:
      None

      Description

      When setting queries with the option group=true class QuerySenderListener doesn't process the document list. Hence, caches are not warmed.

      This can be fixed easily by updating the following to process GroupResponses

      // Retrieve the Document instances (not just the ids) to warm
      // the OS disk cache, and any Solr document cache. Only the top
      // level values in the NamedList are checked for DocLists.
      NamedList values = rsp.getValues();
      for (int i=0; i<values.size(); i++) {
      Object o = values.getVal;
      if (o instanceof ResultContext)

      { o = ((ResultContext)o).docs; }

      if (o instanceof DocList) {
      DocList docs = (DocList)o;
      for (DocIterator iter = docs.iterator(); iter.hasNext()

      { newSearcher.doc(iter.nextDoc()); }

      }
      }

      I will work on a patch for this

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rmerizalde Ricardo Merizalde
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: