lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson (JIRA)" <>
Subject [jira] [Commented] (SOLR-5260) Facet search on a docvalue field in a multi shard collection
Date Fri, 28 Oct 2016 22:20:58 GMT


Erick Erickson commented on SOLR-5260:

This is on trunk, fresh pull.

I was looking at this today and it's a problem indeed. Since we're advocating using docValues
for faceting failing sometimes and succeeding others is disconcerting.

I have a field indexed="false" docValues="true". Sometimes it works and sometimes it doesn't,
it depends as Trym says, on how many docs are in the result set and the number of shards.
The error is reported as Trym indicated, even on a current trunk.

Caused by: java.lang.IllegalStateException: Cannot use facet.mincount=0 on field eoe which
is not indexed
	at org.apache.solr.request.NumericFacets.getCounts(
	at org.apache.solr.request.SimpleFacets.getTermCounts(

json facets work with mincount>0. If mincount=0 it fails with an error message (on the
client and the server) something like:
"Numeric fields do not support facet mincount=0; try indexing as terms".

Anyway, I'm surely not going to get to this in the near  future, so un-assigning it to myself.
Not something for 6.3 as it's been around for a long time.

> Facet search on a docvalue field in a multi shard collection
> ------------------------------------------------------------
>                 Key: SOLR-5260
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: search, SolrCloud
>    Affects Versions: 4.4
>            Reporter: Trym Møller
>            Assignee: Erick Erickson
> 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=,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(
>         at org.apache.solr.request.SimpleFacets.getTermCounts(
>         at org.apache.solr.request.SimpleFacets.getFacetFieldCounts(
>         at org.apache.solr.request.SimpleFacets.getFacetCounts(
>         at org.apache.solr.handler.component.FacetComponent.process(
>         at org.apache.solr.handler.component.SearchHandler.handleRequestBody(
>         at org.apache.solr.handler.RequestHandlerBase.handleRequest(
>         at org.apache.solr.core.SolrCore.execute(
>         at org.apache.solr.servlet.SolrDispatchFilter.execute(
>         at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
>         at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
>         at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(
>         at org.eclipse.jetty.servlet.ServletHandler.doHandle(
>         at org.eclipse.jetty.server.handler.ScopedHandler.handle(
>         at
>         at org.eclipse.jetty.server.session.SessionHandler.doHandle(
>         at org.eclipse.jetty.server.handler.ContextHandler.doHandle(
>         at org.eclipse.jetty.servlet.ServletHandler.doScope(
>         at org.eclipse.jetty.server.session.SessionHandler.doScope(
>         at org.eclipse.jetty.server.handler.ContextHandler.doScope(
>         at org.eclipse.jetty.server.handler.ScopedHandler.handle(
>         at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(
>         at org.eclipse.jetty.server.handler.HandlerCollection.handle(
>         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
>         at org.eclipse.jetty.server.Server.handle(
>         at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(
>         at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(
>         at org.eclipse.jetty.server.AbstractHttpConnection.content(
>         at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(
>         at org.eclipse.jetty.http.HttpParser.parseNext(
>         at org.eclipse.jetty.http.HttpParser.parseAvailable(
>         at org.eclipse.jetty.server.BlockingHttpConnection.handle(
>         at$
>         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
>         at org.eclipse.jetty.util.thread.QueuedThreadPool$
>         at
> {noformat}
> My schema.xml contains the following lines (among others :-))
> {noformat}
>     <dynamicField name="*A" type="dlong" indexed="false" stored="true" docValues="true"
>     ...
>     <fieldType name="dlong" class="solr.TrieLongField" docValuesFormat="Disk" precisionStep="0"
> {noformat}

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message