[ 
https://issues.apache.org/jira/browse/SOLR-14821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17190701#comment-17190701
 ] 

Jason Gerlowski commented on SOLR-14821:
----------------------------------------

We do have a test for this it turns out, here's the relevant bit from 
TestTermsQParserPlugin:

{code}
  @Test
  public void testTermsMethodEquivalency() {
    // Run queries with a variety of 'method' and postfilter options.
    final TermsParams[] methods = new TermsParams[] {
        ...
        new TermsParams("docValuesTermsFilter", true),
        new TermsParams("docValuesTermsFilter", false),
        new TermsParams("docValuesTermsFilterTopLevel", true),
        new TermsParams("docValuesTermsFilterTopLevel", false),
        new TermsParams("docValuesTermsFilterPerSegment", true),
        new TermsParams("docValuesTermsFilterPerSegment", false)
    };

    for (TermsParams method : methods) {
      // Single-valued field, single term value
      ModifiableSolrParams params = new ModifiableSolrParams();
      params.add("q", method.buildQuery("author_s", "Robert Jordan"));
      params.add("sort", "id asc");
      assertQ(req(params, "indent", "on"), "*[count(//doc)=2]",
          "//result/doc[1]/str[@name='id'][.='2']",
          "//result/doc[2]/str[@name='id'][.='3']"
      );

      // Single-valued field, multiple term values
      params = new ModifiableSolrParams();
      params.add("q", method.buildQuery("author_s", "Robert Jordan,Isaac 
Asimov"));
      params.add("sort", "id asc");
      assertQ(req(params, "indent", "on"), "*[count(//doc)=3]",
          "//result/doc[1]/str[@name='id'][.='2']",
          "//result/doc[2]/str[@name='id'][.='3']",
          "//result/doc[3]/str[@name='id'][.='7']"
      );
      ...
    }
  }
{code}

I'm not able to reproduce locally on master either.  Do you have an easy way to 
reproduce this [~anatolii_siuniaev]?

> docValuesTermsFilter should support single-valued docValues fields
> ------------------------------------------------------------------
>
>                 Key: SOLR-14821
>                 URL: https://issues.apache.org/jira/browse/SOLR-14821
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: query parsers
>            Reporter: Anatolii Siuniaev
>            Assignee: Jason Gerlowski
>            Priority: Minor
>         Attachments: SOLR-14821.patch
>
>
> SOLR-13890 introduced a post-filter implementation for docValuesTermsFilter 
> in  TermsQParserPlugin. But now it supports only multi-valued docValues 
> fields (i.e. SORTED_SET type DocValues)
> It doesn't work for single-valued docValues fields (i.e. SORTED type 
> DocValues), though it should. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to