Hi Tomás! Many thanks for responding - I agree, I'd say https://issues.apache.org/jira/browse/SOLR-7495 is definitely the same issue. I am working around that issue by using a STR-Field and copyField.
Thanks again, Sebastian -----Ursprüngliche Nachricht----- Von: Tomás Fernández Löbbe [mailto:tomasflo...@gmail.com] Gesendet: Dienstag, 19. Juli 2016 12:59 An: solr-user@lucene.apache.org Betreff: Re: AW: group.facet=true and facet on field of type int -> org.apache.solr.common.SolrException: Exception during facet.field Hi Sebastian, This looks like https://issues.apache.org/jira/browse/SOLR-7495 On Jul 19, 2016 3:46 AM, "Sebastian Riemer" <s.rie...@littera.eu> wrote: > 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&f > acet=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(Sim > pleFacets.java:739)\r\n\tat > org.apache.solr.request.SimpleFacets$$Lambda$37/2022187546.call(Unknow > n > 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(FacetC > omponent.java:321)\r\n\tat > org.apache.solr.handler.component.FacetComponent.process(FacetComponen > t.java:265)\r\n\tat > org.apache.solr.handler.component.SearchHandler.handleRequestBody(Sear > chHandler.java:293)\r\n\tat > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandle > rBase.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\t > at > 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(ServletH > andler.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.ja > va:143)\r\n\tat > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java > :548)\r\n\tat > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandle > r.java:226)\r\n\tat > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandle > r.java:1160)\r\n\tat > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:5 > 11)\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.ja > va:141)\r\n\tat > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(Conte > xtHandlerCollection.java:213)\r\n\tat > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerColle > ction.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(Abstrac > tConnection.java:273)\r\n\tat > org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)\r\n\t > at > org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint > .java:93)\r\n\tat > org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAn > dRun(ExecuteProduceConsume.java:246)\r\n\tat > org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(Execu > teProduceConsume.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\t > at > org.apache.lucene.index.DocValues.getSorted(DocValues.java:264)\r\n\ta > t > org.apache.lucene.search.grouping.term.TermGroupFacetCollector$SV.doSe > tNextReader(TermGroupFacetCollector.java:129)\r\n\tat > org.apache.lucene.search.SimpleCollector.getLeafCollector(SimpleCollec > tor.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.jav > a:638)\r\n\tat > org.apache.solr.request.SimpleFacets.getTermCounts(SimpleFacets.java:4 > 43)\r\n\tat > org.apache.solr.request.SimpleFacets.getTermCounts(SimpleFacets.java:3 > 80)\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(FacetC > omponent.java:294)\r\n\tat > org.apache.solr.handler.component.FacetComponent.process(FacetComponen > t.java:256)\r\n\tat > org.apache.solr.handler.component.SearchHandler.handleRequestBody(Sear > chHandler.java:272)\r\n\tat > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandle > rBase.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\t > at > 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(ServletH > andler.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.ja > va:143)\r\n\tat > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java > :577)\r\n\tat > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandle > r.java:223)\r\n\tat > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandle > r.java:1127)\r\n\tat > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:5 > 15)\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.ja > va:141)\r\n\tat > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(Conte > xtHandlerCollection.java:215)\r\n\tat > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerColle > ction.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\t > at > org.apache.lucene.index.DocValues.getSorted(DocValues.java:264)\r\n\ta > t > org.apache.lucene.search.grouping.term.TermGroupFacetCollector$SV.doSe > tNextReader(TermGroupFacetCollector.java:129)\r\n\tat > org.apache.lucene.search.SimpleCollector.getLeafCollector(SimpleCollec > tor.java:33)\r\n\tat > org.apache.solr.request.SimpleFacets$1.getLeafCollector(SimpleFacets.j > ava: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.jav > a:597)\r\n\tat > org.apache.solr.request.SimpleFacets.getTermCounts(SimpleFacets.java:4 > 64)\r\n\tat > org.apache.solr.request.SimpleFacets.getTermCounts(SimpleFacets.java:3 > 82)\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 >