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

Erick Erickson edited comment on SOLR-5260 at 11/27/16 3:52 PM:
----------------------------------------------------------------

David:

Yeah, still not up to the Java8 Instant stuff, I'll put that in my bag of 
tricks.

About defining fields on the fly. One of my questions is whether this could be 
abstracted into a more consumable form and, maybe, put in SolrCloudTestCase? Or 
even static methods in a utility class? There was a lot of code there as you 
say just to get my fields defined. Some of the bloat is because I needed a way 
to predict what the sort order would be but still wanted some randomness, and 
partly I thought it a PoC....

And did I really check in code with //nocommit in it? Yes I did. Git and I are 
not friends, a merge problem 'cause trunk is OK.. Fixing shortly.


was (Author: erickerickson):
David:

Yeah, still not up to the Java8 Instant stuff, I'll put that in my bag of 
tricks.

About defining fields on the fly. One of my questions is whether this could be 
abstracted into a more consumable form and, maybe, put in SolrCloudTestCase? 
Because there was a lot of code there as you say just to get my fields defined. 
Some of the bloat is because I needed a way to predict what the sort order 
would be but still wanted some randomness.

And did I really check in code with //nocommit in it? Yes I did. Git and I are 
not friends. Fixing shortly.

> Faceting on a field in SolrCloud with docValues=true and indexed=false fails
> ----------------------------------------------------------------------------
>
>                 Key: SOLR-5260
>                 URL: https://issues.apache.org/jira/browse/SOLR-5260
>             Project: Solr
>          Issue Type: Bug
>          Components: search, SolrCloud
>    Affects Versions: 4.4
>            Reporter: Trym Møller
>            Assignee: Erick Erickson
>             Fix For: trunk, 6.4
>
>         Attachments: SOLR-5260-testfix.patch, SOLR-5260.patch
>
>
> I have a problem doing facet search on a doc value field in a multi shard 
> collection.
> My Solr schema specifies fieldA as a docvalue type and I have created a two 
> shard collection using Solr 4.4.0 (and the unreleased 4.5 branch).
> When I do a facet search on fieldA with a "large" facet.limit then the query 
> fails with the below exception
> A "large" facet.limit seems to be when (10 + (facet.limit * 1,5)) * number of 
> shards > rows matching my query
> The exception does not occur when I run with a single shard collection.
> It can easily be reproduced by indexing a single row and querying it, as the 
> default facet.limit is 100.
> The facet query received by Solr looks as follows:
> {noformat}
>     576793 [qtp170860084-18] INFO  org.apache.solr.core.SolrCore  ¦ 
> [trym_shard2_replica1] webapp=/solr path=/select 
>      
> params={facet=true&start=0&q=*:*&distrib=true&collection=trym&facet.field=fieldA&wt=javabin&version=2&rows=0}
>  
>      status=500 QTime=20
> {noformat}
> One of the "internal query" send by Solr to its shard looks like
> {noformat}
>     576783 [qtp170860084-19] INFO  org.apache.solr.core.SolrCore  ¦ 
> [trym_shard1_replica1] webapp=/solr path=/select 
>      
> params={facet=true&distrib=false&collection=trym&wt=javabin&version=2&rows=0&NOW=1379855011787
>     
>        
> &shard.url=192.168.56.1:8501/solr/trym_shard1_replica1/&df=text&fl=id,score&f.fieldA.facet.limit=160
>        &start=0&q=*:*&facet.field=fieldA&isShard=true&fsv=true} 
>      hits=1 status=500 QTime=2
> {noformat}
> The exception thrown by Solr is as follows
> {noformat}
> 576784 [qtp170860084-17] ERROR org.apache.solr.servlet.SolrDispatchFilter  ¦ 
> null:java.lang.IllegalStateException: 
>      Cannot use facet.mincount=0 on a field which is not indexed
>         at 
> org.apache.solr.request.NumericFacets.getCounts(NumericFacets.java:257)
>         at 
> org.apache.solr.request.SimpleFacets.getTermCounts(SimpleFacets.java:423)
>         at 
> org.apache.solr.request.SimpleFacets.getFacetFieldCounts(SimpleFacets.java:530)
>         at 
> org.apache.solr.request.SimpleFacets.getFacetCounts(SimpleFacets.java:259)
>         at 
> org.apache.solr.handler.component.FacetComponent.process(FacetComponent.java:78)
>         at 
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:208)
>         at 
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
>         at org.apache.solr.core.SolrCore.execute(SolrCore.java:1904)
>         at 
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:659)
>         at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:362)
>         at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:158)
>         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:235)
>         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:724)
> {noformat}
> My schema.xml contains the following lines (among others :-))
> {noformat}
>     <dynamicField name="*A" type="dlong" indexed="false" stored="true" 
> docValues="true" required="true"/>
>     ...
>     <fieldType name="dlong" class="solr.TrieLongField" docValuesFormat="Disk" 
> precisionStep="0" positionIncrementGap="0"/>
> {noformat}
>       



--
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