You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Tomás Fernández Löbbe (JIRA)" <ji...@apache.org> on 2014/08/26 19:09:59 UTC

[jira] [Commented] (SOLR-6024) StatsComponent does not work for docValues enabled multiValued fields

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

Tomás Fernández Löbbe commented on SOLR-6024:
---------------------------------------------

The added test fails if the codec is Lucene 4.0. Tested this on branch_4x and trunk:

{noformat}
   [junit4] ERROR   0.22s | StatsComponentTest.testFieldStatisticsDocValuesAndMultiValued <<<
   [junit4]    > Throwable #1: org.apache.solr.common.SolrException: java.lang.UnsupportedOperationException: Lucene 4.0 does not support SortedSet docvalues
   [junit4]    > 	at __randomizedtesting.SeedInfo.seed([D7B0D3D7FE664ABF:A5CE511C61788BCE]:0)
   [junit4]    > 	at org.apache.solr.util.TestHarness.update(TestHarness.java:247)
   [junit4]    > 	at org.apache.solr.util.BaseTestHarness.checkUpdateStatus(BaseTestHarness.java:282)
   [junit4]    > 	at org.apache.solr.util.BaseTestHarness.validateUpdate(BaseTestHarness.java:252)
   [junit4]    > 	at org.apache.solr.SolrTestCaseJ4.checkUpdateU(SolrTestCaseJ4.java:676)
   [junit4]    > 	at org.apache.solr.SolrTestCaseJ4.assertU(SolrTestCaseJ4.java:655)
   [junit4]    > 	at org.apache.solr.SolrTestCaseJ4.assertU(SolrTestCaseJ4.java:649)
   [junit4]    > 	at org.apache.solr.handler.component.StatsComponentTest.testFieldStatisticsDocValuesAndMultiValued(StatsComponentTest.java:449)
   [junit4]    > 	at java.lang.Thread.run(Thread.java:745)
   [junit4]    > Caused by: java.lang.UnsupportedOperationException: Lucene 4.0 does not support SortedSet docvalues
   [junit4]    > 	at org.apache.lucene.codecs.lucene40.Lucene40DocValuesWriter.addSortedSetField(Lucene40DocValuesWriter.java:540)
   [junit4]    > 	at org.apache.lucene.index.SortedSetDocValuesWriter.flush(SortedSetDocValuesWriter.java:164)
   [junit4]    > 	at org.apache.lucene.index.DefaultIndexingChain.writeDocValues(DefaultIndexingChain.java:142)
   [junit4]    > 	at org.apache.lucene.index.DefaultIndexingChain.flush(DefaultIndexingChain.java:96)
   [junit4]    > 	at org.apache.lucene.index.DocumentsWriterPerThread.flush(DocumentsWriterPerThread.java:442)
   [junit4]    > 	at org.apache.lucene.index.DocumentsWriter.doFlush(DocumentsWriter.java:510)
   [junit4]    > 	at org.apache.lucene.index.DocumentsWriter.flushAllThreads(DocumentsWriter.java:621)
   [junit4]    > 	at org.apache.lucene.index.IndexWriter.prepareCommitInternal(IndexWriter.java:2793)
   [junit4]    > 	at org.apache.lucene.index.IndexWriter.commitInternal(IndexWriter.java:2952)
   [junit4]    > 	at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:2919)
   [junit4]    > 	at org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:582)
   [junit4]    > 	at org.apache.solr.update.processor.RunUpdateProcessor.processCommit(RunUpdateProcessorFactory.java:95)
   [junit4]    > 	at org.apache.solr.update.processor.UpdateRequestProcessor.processCommit(UpdateRequestProcessor.java:64)
   [junit4]    > 	at org.apache.solr.update.processor.DistributedUpdateProcessor.doLocalCommit(DistributedUpdateProcessor.java:1650)
   [junit4]    > 	at org.apache.solr.update.processor.DistributedUpdateProcessor.processCommit(DistributedUpdateProcessor.java:1627)
   [junit4]    > 	at org.apache.solr.update.processor.LogUpdateProcessor.processCommit(LogUpdateProcessorFactory.java:157)
   [junit4]    > 	at org.apache.solr.handler.loader.XMLLoader.processUpdate(XMLLoader.java:267)
   [junit4]    > 	at org.apache.solr.handler.loader.XMLLoader.load(XMLLoader.java:174)
   [junit4]    > 	at org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:99)
   [junit4]    > 	at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74)
   [junit4]    > 	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
   [junit4]    > 	at org.apache.solr.core.SolrCore.execute(SolrCore.java:1985)
   [junit4]    > 	at org.apache.solr.servlet.DirectSolrConnection.request(DirectSolrConnection.java:131)
   [junit4]    > 	at org.apache.solr.util.TestHarness.update(TestHarness.java:243)
   [junit4]    > 	... 46 more
   [junit4]   2> 19528 T11 oas.SolrTestCaseJ4.deleteCore ###deleteCore

{noformat}

> 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.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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org