You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org> on 2015/06/26 19:07:05 UTC

[jira] [Resolved] (SOLR-6686) facet.threads can return wrong results when using facet.prefix multiple times on same field

     [ https://issues.apache.org/jira/browse/SOLR-6686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shalin Shekhar Mangar resolved SOLR-6686.
-----------------------------------------
       Resolution: Fixed
    Fix Version/s: Trunk
                   5.3

Thanks Michael and Tim!

> facet.threads can return wrong results when using facet.prefix multiple times on same field
> -------------------------------------------------------------------------------------------
>
>                 Key: SOLR-6686
>                 URL: https://issues.apache.org/jira/browse/SOLR-6686
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 4.9
>            Reporter: Michael Ryan
>            Assignee: Shalin Shekhar Mangar
>             Fix For: 5.3, Trunk
>
>         Attachments: SOLR-6686.patch, SOLR-6686.patch, SOLR-6686.patch
>
>
> When using facet.threads, SimpleFacets can return the wrong results when using facet.prefix multiple times on the same field.
> The problem is that SimpleFacets essentially stores the prefix value in a global variable, rather than passing the current prefix value into the Callable. So, the prefix value that is used when getting the term counts is whichever one was the last one parsed.
> STEPS TO REPRODUCE:
> # Create a document with a string field named "myFieldName" and value "foo"
> # Create another document with a string field named "myFieldName" and value "bar"
> # Run this query: {noformat}q=*:*&rows=0&facet=true&facet.field={!key=key1 facet.prefix=foo}myFieldName&facet.field={!key=key2 facet.prefix=bar}myFieldName&facet.threads=1{noformat}
> EXPECTED:
> {noformat}<lst name="facet_fields">
>   <lst name="key1">
>     <int name="foo">1</int>
>   </lst>
>   <lst name="key2">
>     <int name="bar">1</int>
>   </lst>
> </lst>{noformat}
> ACTUAL:
> {noformat}<lst name="facet_fields">
>   <lst name="key1">
>     <int name="bar">1</int>
>   </lst>
>   <lst name="key2">
>     <int name="bar">1</int>
>   </lst>
> </lst>{noformat}
> I'm using 4.9, but I think this affects all versions.
> A user previously reported this here:
> http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201405.mbox/%3CBAY169-W52CEF09187A88286DE5417D5270@phx.gbl%3E
> I think this affects parameters other than facet.prefix, but I have not tried that yet.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org