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

Reply via email to