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

Hoss Man commented on SOLR-6024:
--------------------------------

ok ... so from an svn management standpoint, it looks like the cleanest thing 
to do is backport all of the commits to DocValuesStats.java from trunk to the 
4x branch (r1594441, r1594445, r1595259, r1600688, r1602997), combined with 
your modified version of StatsComponent.java to still conditionally use 
UnInvertedField.

i'm still not really comfortable calling this bug "fixed" w/o more tests 
thought -- in particular there is already plumbing in 
StatsComponentTest.doTestMVFieldStatisticsResult for testing that multivalued 
field stats -- we need to add multivalued=true+docValue=true+indexed=false 
versions of all the Trie types to the test schema and ensure that method works 
for them.

(we should also reach down into the schema like 
testStatsFacetMultivaluedErrorHandling() does to assert the SchemaField objects 
have all the properties we expect to help ensure no one changes the docValues 
or indexed setting and invalidates the test)

and of course: we should commit the tests to trunk and then backport to 4x.

> StatsComponent does not work for docValues enabled multiValued fields
> ---------------------------------------------------------------------
>
>                 Key: SOLR-6024
>                 URL: https://issues.apache.org/jira/browse/SOLR-6024
>             Project: Solr
>          Issue Type: Bug
>          Components: SearchComponents - other
>    Affects Versions: 4.8
>         Environment: java version "1.7.0_45"
> Mac OS X Version 10.7.5
>            Reporter: Ahmet Arslan
>              Labels: StatsComponent, docValues, multiValued
>             Fix For: 4.9
>
>         Attachments: SOLR-6024-trunk.patch, SOLR-6024-trunk.patch, 
> SOLR-6024-trunk.patch, SOLR-6024.patch, SOLR-6024.patch
>
>
> Harish Agarwal reported this in solr user mailing list : 
> http://search-lucene.com/m/QTPaoTJXV1
> It is east to re-produce with default example solr setup. Following types are 
> added example schema.xml. And exampledocs are indexed.
> {code:xml}
>  <field name="cat" type="string" indexed="true" stored="true" 
> docValues="true" multiValued="true"/>
>   <field name="popularity" type="int" indexed="true" stored="false" 
> docValues="true" multiValued="true"/>
> {code}
> When {{docValues="true"}} *and* {{multiValued="true"}} are used at the same 
> time, StatsComponent throws :
> {noformat}
> ERROR org.apache.solr.core.SolrCore  – org.apache.solr.common.SolrException: 
> Type mismatch: popularity was indexed as SORTED_SET
>       at 
> org.apache.solr.request.UnInvertedField.<init>(UnInvertedField.java:193)
>       at 
> org.apache.solr.request.UnInvertedField.getUnInvertedField(UnInvertedField.java:699)
>       at 
> org.apache.solr.handler.component.SimpleStats.getStatsFields(StatsComponent.java:319)
>       at 
> org.apache.solr.handler.component.SimpleStats.getStatsCounts(StatsComponent.java:290)
>       at 
> org.apache.solr.handler.component.StatsComponent.process(StatsComponent.java:78)
>       at 
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:221)
>       at 
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
>       at org.apache.solr.core.SolrCore.execute(SolrCore.java:1964)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to