Return-Path: Delivered-To: apmail-lucene-solr-dev-archive@locus.apache.org Received: (qmail 75844 invoked from network); 9 Jan 2009 11:45:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jan 2009 11:45:26 -0000 Received: (qmail 39851 invoked by uid 500); 9 Jan 2009 11:45:25 -0000 Delivered-To: apmail-lucene-solr-dev-archive@lucene.apache.org Received: (qmail 39817 invoked by uid 500); 9 Jan 2009 11:45:24 -0000 Mailing-List: contact solr-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-dev@lucene.apache.org Delivered-To: mailing list solr-dev@lucene.apache.org Received: (qmail 39806 invoked by uid 99); 9 Jan 2009 11:45:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Jan 2009 03:45:24 -0800 X-ASF-Spam-Status: No, hits=-1998.5 required=10.0 tests=ALL_TRUSTED,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Jan 2009 11:45:21 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8D41E234C485 for ; Fri, 9 Jan 2009 03:44:59 -0800 (PST) Message-ID: <2124587235.1231501499564.JavaMail.jira@brutus> Date: Fri, 9 Jan 2009 03:44:59 -0800 (PST) From: "Jayson Minard (JIRA)" To: solr-dev@lucene.apache.org Subject: [jira] Commented: (SOLR-951) Distributed query fails with tag / exclude pattern used for facets that are multi-valued. In-Reply-To: <602738315.1231500659524.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SOLR-951?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12662337#action_12662337 ] Jayson Minard commented on SOLR-951: ------------------------------------ Ok, looking at QueryParsing.java and ... parseLocalParams() finds the start of an ID and then calls getId() to retrieve it, but getId() doesn't know when to end (i.e. on "=" or "}") so it eats until it hits an unexpected java identifier character (in this case "=") and bombs with the exception. THere either needs to be a special getId() function that knows when to quit nicely, or getId() changed to have valid end tokens where it stops politely rather than as an error. I'm testing the quick variant function just for the localParams to work around this for now. > Distributed query fails with tag / exclude pattern used for facets that are multi-valued. > ----------------------------------------------------------------------------------------- > > Key: SOLR-951 > URL: https://issues.apache.org/jira/browse/SOLR-951 > Project: Solr > Issue Type: Bug > Components: search > Affects Versions: 1.3.1 > Reporter: Jayson Minard > Priority: Critical > > Running this query: > {code} > http://testserver:8985/solr/select/?q=*%3A*&version=2.2&start=0&rows=10&indent=on&facet=true& > facet.field={!ex=t1}SubjectTerms_mfacet&fq={!tag=t1}SubjectTerms_mfacet:(testvalue)& > shards=test1:8985/solr,test2:8985/solr > {code} > causes this exception: > {code} > java.lang.NullPointerException > at org.apache.solr.handler.component.FacetComponent.refineFacets(FacetComponent.java:330) > at org.apache.solr.handler.component.FacetComponent.handleResponses(FacetComponent.java:231) > at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:266) > at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131) > at org.apache.solr.core.SolrCore.execute(SolrCore.java:1325) > at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:303) > at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:232) > at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089) > at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365) > at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) > at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) > at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) > at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) > at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211) > at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) > at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) > at org.mortbay.jetty.Server.handle(Server.java:285) > at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502) > at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:821) > at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513) > at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208) > at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378) > at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226) > at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) > {code} > which is at this area of the code in the aggregator, but not the root cause... > {code} > private void refineFacets(ResponseBuilder rb, ShardRequest sreq) { > FacetInfo fi = rb._facetInfo; > for (ShardResponse srsp: sreq.responses) { > // int shardNum = rb.getShardNum(srsp.shard); > NamedList facet_counts = (NamedList)srsp.getSolrResponse().getResponse().get("facet_counts"); > NamedList facet_fields = (NamedList)facet_counts.get("facet_fields"); > for (int i=0; i String key = facet_fields.getName(i); > DistribFieldFacet dff = (DistribFieldFacet)fi.facets.get(key); > if (dff == null) continue; > NamedList shardCounts = (NamedList)facet_fields.getVal(i); > for (int j=0; j String name = shardCounts.getName(j); > long count = ((Number)shardCounts.getVal(j)).longValue(); > ShardFacetCount sfc = dff.counts.get(name); > sfc.count += count; > } > } > } > } > {code} > The shard actually has an error on it, which is: > {code} > Jan 9, 2009 6:15:31 AM org.apache.solr.core.SolrCore execute > INFO: [] webapp=/solr path=/select params={facet=true&f.SubjectTerms_mfacet.facet.limit=160&wt=javabin&rows=10& > version=2.2&fl=id,score&start=0&q=*:*& > facet.field={!ex%3Dt1}SubjectTerms_mfacet&isShard=true&fq={!tag%3Dt1}SubjectTerms_mfacet:(testvalue)& > fsv=true} hits=0 status=0 QTime=265 > Jan 9, 2009 6:15:31 AM org.apache.solr.common.SolrException log > SEVERE: Exception during facet counts:org.apache.lucene.queryParser.ParseException: Expected identifier at pos 37 str='{!terms=$SubjectTerms_mfacet__termsex=t1}SubjectTerms_mfacet' > at org.apache.solr.search.QueryParsing$StrParser.getId(QueryParsing.java:564) > at org.apache.solr.search.QueryParsing.parseLocalParams(QueryParsing.java:135) > at org.apache.solr.search.QueryParsing.getLocalParams(QueryParsing.java:191) > at org.apache.solr.request.SimpleFacets.parseParams(SimpleFacets.java:91) > at org.apache.solr.request.SimpleFacets.getFacetFieldCounts(SimpleFacets.java:275) > at org.apache.solr.request.SimpleFacets.getFacetCounts(SimpleFacets.java:170) > at org.apache.solr.handler.component.FacetComponent.process(FacetComponent.java:71) > at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:171) > at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131) > at org.apache.solr.core.SolrCore.execute(SolrCore.java:1325) > at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:303) > at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:232) > at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089) > at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365) > at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) > at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) > at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) > at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) > at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211) > at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) > at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) > at org.mortbay.jetty.Server.handle(Server.java:285) > at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502) > at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:835) > at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:641) > at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:202) > at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378) > at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226) > at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) > Jan 9, 2009 6:15:31 AM org.apache.solr.core.SolrCore execute > INFO: [] webapp=/solr path=/select params={facet=true&q=*:*& > facet.field={!terms%3D$SubjectTerms_mfacet__termsex%3Dt1}SubjectTerms_mfacet&isShard=true& > wt=javabin& > fq={!tag%3Dt1}SubjectTerms_mfacet:(testvalue)& > rows=0& > SubjectTerms_mfacet__terms=mathematical+models,mathematical+analysis& > version=2.2} hits=0 status=0 QTime=2 > {code} > Other related information: > * The facet being selected is a multi-valued field > * The facet is a dynamic field and passes a dynamic rule > * The facet exists and the log shows the 2nd follow-on querying asking for shard values > * When running a query for a single valued field it seems to work fine, only multi-valued fields seem to fail. Not completely verified, but a few tests hint at this. > * Tried facet names that were simple such as "ISBN" and if multi-valued, produces same error. > * Tried facet names with underscores to see if that was at issue, and if single valued, it succeeded. > * In a non-distributed search, the tag/exclude works fine for the same facets. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.