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

Post filter DelegatingCollector.finish not called for multi-shard queries specifying grouping

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.8, 5.2.1
    • None
    • search
    • None

    Description

      The finish method for a DelegatingCollector post filter is not being called for queries specifying a fq filter, multiple shards, and grouping options.

      Recommend adding the following code to org.apache.solr.search.grouping.CommandHandler.searchWithTimeLimiter to call finish (if a DelegatingCollector is available) after calling search, but before obtaining totalHitCount:

      org.apache.solr.search.grouping.CommandHandler line ~218
          try {
            searcher.search(query, luceneFilter, collector);
          } catch (TimeLimitingCollector.TimeExceededException x) {
            partialResults = true;
            logger.warn( "Query: " + query + "; " + x.getMessage() );
          }
      
          /* Call finish of DelegatingCollector to complete post processing
             for multi-shard queries */
          if (filter.postFilter != null) {
            filter.postFilter.finish();
          }
          /* END: Call finish of DelegatingCollector to complete post processing
             for multi-shard queries */
      
          if (includeHitCount) {
            totalHitCount = hitCountCollector.getTotalHits();
          }
      

      Attachments

        1. SolrGroupTest-5.2.1.tgz
          22 kB
          Eric Wheeler
        2. solrGroupTestEx.tgz
          23 kB
          Eric Wheeler

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ebwweb Eric Wheeler
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: