May I respectfully refer again to a question I posted last week? Thank you very much and a nice day to you all!
Sebastian --------------------------------------------------------- Hi all, Tested on Solr 6.1.0 (as well as 5.4.0 and 5.5.0) using the "techproducts" example the following query throws the same exception as in my original question: To reproduce: 1) set up the techproducts example: solr start -e techproducts -noprompt 2) go to Solr Admin: http://localhost:8983/solr/#/techproducts/query 3) in "Raw Query Parameters" enter: group=true&group.facet=true&group.ngroups=true&group.field=manu_id_s&facet=true&facet.field=popularity 4) Hit "Execute Query" [..] "error":{ "metadata":[ "error-class","org.apache.solr.common.SolrException", "root-error-class","java.lang.IllegalStateException"], "msg":"Exception during facet.field: popularity", "trace":"org.apache.solr.common.SolrException: Exception during facet.field: popularity\r\n\tat org.apache.solr.request.SimpleFacets.lambda$getFacetFieldCounts$50(SimpleFacets.java:739)\r\n\tat org.apache.solr.request.SimpleFacets$$Lambda$37/2022187546.call(Unknown Source)\r\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\n\tat org.apache.solr.request.SimpleFacets$2.execute(SimpleFacets.java:672)\r\n\tat org.apache.solr.request.SimpleFacets.getFacetFieldCounts(SimpleFacets.java:748)\r\n\tat org.apache.solr.handler.component.FacetComponent.getFacetCounts(FacetComponent.java:321)\r\n\tat org.apache.solr.handler.component.FacetComponent.process(FacetComponent.java:265)\r\n\tat org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:293)\r\n\tat org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:156)\r\n\tat org.apache.solr.core.SolrCore.execute(SolrCore.java:2036)\r\n\tat org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:657)\r\n\tat org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:464)\r\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:257)\r\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:208)\r\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)\r\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)\r\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\r\n\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)\r\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)\r\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1160)\r\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)\r\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\r\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1092)\r\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\r\n\tat org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)\r\n\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)\r\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)\r\n\tat org.eclipse.jetty.server.Server.handle(Server.java:518)\r\n\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308)\r\n\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:244)\r\n\tat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)\r\n\tat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)\r\n\tat org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)\r\n\tat org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:246)\r\n\tat org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:156)\r\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)\r\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\nCaused by: java.lang.IllegalStateException: unexpected docvalues type NUMERIC for field 'popularity' (expected=SORTED). Use UninvertingReader or index with docvalues.\r\n\tat org.apache.lucene.index.DocValues.checkField(DocValues.java:212)\r\n\tat org.apache.lucene.index.DocValues.getSorted(DocValues.java:264)\r\n\tat org.apache.lucene.search.grouping.term.TermGroupFacetCollector$SV.doSetNextReader(TermGroupFacetCollector.java:129)\r\n\tat org.apache.lucene.search.SimpleCollector.getLeafCollector(SimpleCollector.java:33)\r\n\tat org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:660)\r\n\tat org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:473)\r\n\tat org.apache.solr.request.SimpleFacets.getGroupedCounts(SimpleFacets.java:638)\r\n\tat org.apache.solr.request.SimpleFacets.getTermCounts(SimpleFacets.java:443)\r\n\tat org.apache.solr.request.SimpleFacets.getTermCounts(SimpleFacets.java:380)\r\n\tat org.apache.solr.request.SimpleFacets.lambda$getFacetFieldCounts$50(SimpleFacets.java:733)\r\n\t... 37 more\r\n", "code":500}} Could anyone please explain if this is expected behaviour, point out what I am doing wrong, or confirm that this is not expected behaviour? Many thanks and best regards, Sebastian -----Ursprüngliche Nachricht----- Von: Sebastian Riemer [mailto:s.rie...@littera.eu] Gesendet: Freitag, 8. Juli 2016 14:55 An: solr-user@lucene.apache.org Betreff: group.facet=true and facet on field of type int -> org.apache.solr.common.SolrException: Exception during facet.field Hi all, are there any limitations in regard to retrieval of facet information, when grouping? When I send the following query where the field to facet ("m_pt_14_s_ns") on is of type "string", everything works fine. "q": "*:*", "facet.field": "m_pt_14_s_ns", "indent": "true", "group.facet": "true", "fq": "m_id_l:[* TO *]", "wt": "json", "facet": "true", "group.field": "m_id_l", "group": "true", [..] "facet_fields": { "m_pt_14_s_ns": [ "zahlr. Ill.", 7, "Ill.", 4, "Ill., graph. Darst.", 2, "zahlr. Ill. (z.T. farb.))", 2, "überw. Ill.", 1, "zahlr. Cartoons jetzt durchgehend zweifarbig illustriert", 1, "zahlr. Ill., Kt.", 1, "zahlr. Ill., graph. Darst.", 1, "überw. Ill.", 1 ] }, When I try the same with a field of type “int” (m_pt_27_i_ns), I get the following exception: "q": "*:*", "facet.field": "m_pt_27_i_ns", "indent": "true", "group.facet": "true", "fq": "m_id_l:[* TO *]", "wt": "json", "facet": "true", "group.field": "m_id_l", "group": "true", [..] "error": { "metadata": [ "error-class", "org.apache.solr.common.SolrException", "root-error-class", "java.lang.IllegalStateException" ], "msg": "Exception during facet.field: m_pt_27_i_ns", "trace": "org.apache.solr.common.SolrException: Exception during facet.field: m_pt_27_i_ns\r\n\tat org.apache.solr.request.SimpleFacets$3.call(SimpleFacets.java:700)\r\n\tat org.apache.solr.request.SimpleFacets$3.call(SimpleFacets.java:685)\r\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\n\tat org.apache.solr.request.SimpleFacets$2.execute(SimpleFacets.java:639)\r\n\tat org.apache.solr.request.SimpleFacets.getFacetFieldCounts(SimpleFacets.java:710)\r\n\tat org.apache.solr.handler.component.FacetComponent.getFacetCounts(FacetComponent.java:294)\r\n\tat org.apache.solr.handler.component.FacetComponent.process(FacetComponent.java:256)\r\n\tat org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:272)\r\n\tat org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:155)\r\n\tat org.apache.solr.core.SolrCore.execute(SolrCore.java:2082)\r\n\tat org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:670)\r\n\tat org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:458)\r\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:225)\r\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:183)\r\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)\r\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)\r\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\r\n\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)\r\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)\r\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)\r\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)\r\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\r\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)\r\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\r\n\tat org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)\r\n\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)\r\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)\r\n\tat org.eclipse.jetty.server.Server.handle(Server.java:499)\r\n\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)\r\n\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)\r\n\tat org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)\r\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)\r\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\nCaused by: java.lang.IllegalStateException: unexpected docvalues type NUMERIC for field 'm_pt_27_i_ns' (expected=SORTED). Use UninvertingReader or index with docvalues.\r\n\tat org.apache.lucene.index.DocValues.checkField(DocValues.java:208)\r\n\tat org.apache.lucene.index.DocValues.getSorted(DocValues.java:264)\r\n\tat org.apache.lucene.search.grouping.term.TermGroupFacetCollector$SV.doSetNextReader(TermGroupFacetCollector.java:129)\r\n\tat org.apache.lucene.search.SimpleCollector.getLeafCollector(SimpleCollector.java:33)\r\n\tat org.apache.solr.request.SimpleFacets$1.getLeafCollector(SimpleFacets.java:601)\r\n\tat org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:812)\r\n\tat org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:535)\r\n\tat org.apache.solr.request.SimpleFacets.getGroupedCounts(SimpleFacets.java:597)\r\n\tat org.apache.solr.request.SimpleFacets.getTermCounts(SimpleFacets.java:464)\r\n\tat org.apache.solr.request.SimpleFacets.getTermCounts(SimpleFacets.java:382)\r\n\tat org.apache.solr.request.SimpleFacets$3.call(SimpleFacets.java:694)\r\n\t... 33 more\r\n", "code": 500 } Additional note: The second query runs without exception, if I remove the parameter "group.facet": "true" Thanks for any help on this, P.S.: Is it normal that any formatting is lost when sending mails to the mailing list? I’d really like to use a smaller font and different font type for code lines … Sebastian