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

Crawdaddy commented on SOLR-7214:
---------------------------------

I encountered a bug/incompatibility with JSON faceting on (multi-valued) fields 
w/DocValues.  Multi-valued in parentheses since I don't know if the bug is 
exclusive to that or not.  Issue seems similar to SOLR-6024.

My use case requires the Facet API/Analytics capabilities, and I both require 
and desire DocValues due to the high cardinality of the values I store, and the 
associated performance increase I get when faceting on them.  Without 
DocValues, I get the dreaded "Too many values for UnInvertedField faceting on 
field" error.

Possible there's a quick fix you could propose, [~yo...@apache.org], that I 
could back-port into Heliosearch until this stuff is available in Solr?

Example schema field:
<field name="keywords"  type="string"  indexed="true"  stored="true" 
multiValued="true" docValues="true"/>

Traditional Solr faceting on this field works:
[...]/select?rows=0&q=toyota&facet=true&facet.field=keywords

JSON faceting returns "Type mismatch: keywords was indexed as SORTED_SET":
[...]/select?rows=0&q=toyota&json.facet={keywords:{terms:{field:keywords}}}

ERROR - 2015-03-30 10:52:05.806; org.apache.solr.common.SolrException; 
org.apache.solr.common.SolrException: Type mismatch: keywords was indexed as 
SORTED_SET
at org.apache.solr.search.facet.UnInvertedField.<init>(UnInvertedField.java:201)
at 
org.apache.solr.search.facet.UnInvertedField.getUnInvertedField(UnInvertedField.java:964)
at 
org.apache.solr.search.facet.FacetFieldProcessorUIF.findStartAndEndOrds(FacetField.java:463)
at 
org.apache.solr.search.facet.FacetFieldProcessorFCBase.getFieldCacheCounts(FacetField.java:203)
at 
org.apache.solr.search.facet.FacetFieldProcessorFCBase.process(FacetField.java:186)
at 
org.apache.solr.search.facet.FacetProcessor.fillBucketSubs(FacetRequest.java:176)
at 
org.apache.solr.search.facet.FacetProcessor.processSubs(FacetRequest.java:288)
at org.apache.solr.search.facet.FacetProcessor.fillBucket(FacetRequest.java:266)
at org.apache.solr.search.facet.FacetQueryProcessor.process(FacetQuery.java:56)
at org.apache.solr.search.facet.FacetModule.process(FacetModule.java:87)
at 
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218)
at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1966)
at 
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:777)
at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418)
at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
at 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
at 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at 
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at 
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:368)
at 
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
at 
org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
at 
org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:953)
at 
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1014)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
at 
org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
at 
org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
at 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at 
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:745)

> JSON Facet API
> --------------
>
>                 Key: SOLR-7214
>                 URL: https://issues.apache.org/jira/browse/SOLR-7214
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Yonik Seeley
>            Assignee: Yonik Seeley
>             Fix For: 5.1
>
>         Attachments: SOLR-7214.patch
>
>
> Overview is here: http://yonik.com/json-facet-api/
> The structured nature of nested sub-facets are more naturally expressed in a 
> nested structure like JSON rather than the flat structure that normal query 
> parameters provide.
> Goals:
> - First class JSON support
> - Easier programmatic construction of complex nested facet commands
> - Support a much more canonical response format that is easier for clients to 
> parse
> - First class analytics support
> - Support a cleaner way to do distributed faceting
> - Support better integration with other search features



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to