lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Umesh Prasad <umesh.i...@gmail.com>
Subject Re: CollapsingQParserPlugin throws Exception when useFilterForSortedQuery=true
Date Thu, 03 Jul 2014 02:05:19 GMT
Created the jira ..
https://issues.apache.org/jira/browse/SOLR-6222



On 30 June 2014 23:53, Joel Bernstein <joelsolr@gmail.com> wrote:

> Sure, go ahead create the ticket. I think there is more we can here as
> well. I suspect we can get the CollapsingQParserPlugin to work with
> useFilterForSortedQuery=true if scoring is not needed for the collapse.
> I'll take a closer look at this.
>
> Joel Bernstein
> Search Engineer at Heliosearch
>
>
> On Mon, Jun 30, 2014 at 1:43 AM, Umesh Prasad <umesh.iitk@gmail.com>
> wrote:
>
> > Hi Joel,
> >     Thanks a lot for clarification ..  An error message would indeed be a
> > good thing ..   Should I open a jira item for same ?
> >
> >
> >
> > On 28 June 2014 19:08, Joel Bernstein <joelsolr@gmail.com> wrote:
> >
> > > OK, I see the problem. When you use <useFilterForSortedQuery> true
> > > </useFilterForSortedQuery> Solr builds a docSet in a way that seems to
> be
> > > incompatible with the CollapsingQParserPlugin. With
> > > <useFilterForSortedQuery>
> > > true </useFilterForSortedQuery>, Solr doesn't run the main query again
> > when
> > > collecting the DocSet. The getDocSetScore() method is expecting the
> main
> > > query to present, because the CollapsingQParserPlugin may need the
> scores
> > > generated from the main query, to select the group head.
> > >
> > > I think trying to make <useFilterForSortedQuery> true
> > > </useFilterForSortedQuery> compatible with CollapsingQParsePlugin is
> > > probably not possible. So, a nice error message would be a good thing.
> > >
> > > Joel Bernstein
> > > Search Engineer at Heliosearch
> > >
> > >
> > > On Tue, Jun 24, 2014 at 3:31 AM, Umesh Prasad <umesh.iitk@gmail.com>
> > > wrote:
> > >
> > > > Hi ,
> > > >     Found another bug with CollapsignQParserPlugin. Not a critical
> one.
> > > >
> > > > It throws an exception when used with
> > > >
> > > > <useFilterForSortedQuery> true </useFilterForSortedQuery>
> > > >
> > > > Patch attached (against 4.8.1 but reproducible in other branches
> also)
> > > >
> > > >
> > > > 518 T11 C0 oasc.SolrCore.execute [collection1] webapp=null path=null
> > > >
> > >
> >
> params={q=*%3A*&fq=%7B%21collapse+field%3Dgroup_s%7D&defType=edismax&bf=field%28test_ti%29}
> > > > hits=2 status=0 QTime=99
> > > > 4557 T11 C0 oasc.SolrCore.execute [collection1] webapp=null path=null
> > > >
> > >
> >
> params={q=*%3A*&fq=%7B%21collapse+field%3Dgroup_s+nullPolicy%3Dexpand+min%3Dtest_tf%7D&defType=edismax&bf=field%28test_ti%29&sort=}
> > > > hits=4 status=0 QTime=15
> > > > 4587 T11 C0 oasc.SolrException.log ERROR
> > > > java.lang.UnsupportedOperationException: Query  does not implement
> > > > createWeight
> > > >         at org.apache.lucene.search.Query.createWeight(Query.java:80)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.search.IndexSearcher.createNormalizedWeight(IndexSearcher.java:684)
> > > >         at
> > > > org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297)
> > > >         at
> > > >
> > >
> >
> org.apache.solr.search.SolrIndexSearcher.getDocSetScore(SolrIndexSearcher.java:879)
> > > >         at
> > > >
> > >
> >
> org.apache.solr.search.SolrIndexSearcher.getDocSet(SolrIndexSearcher.java:902)
> > > >         at
> > > >
> > >
> >
> org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1381)
> > > >         at
> > > >
> > >
> >
> org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:478)
> > > >         at
> > > >
> > >
> >
> org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:461)
> > > >         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:1952)
> > > >         at
> org.apache.solr.util.TestHarness.query(TestHarness.java:295)
> > > >         at
> org.apache.solr.util.TestHarness.query(TestHarness.java:278)
> > > >         at
> > > org.apache.solr.SolrTestCaseJ4.assertQ(SolrTestCaseJ4.java:676)
> > > >         at
> > > org.apache.solr.SolrTestCaseJ4.assertQ(SolrTestCaseJ4.java:669)
> > > >         at
> > > >
> > >
> >
> org.apache.solr.search.TestCollapseQParserPlugin.testCollapseQueries(TestCollapseQParserPlugin.java:106)
> > > >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> > > >         at
> > > >
> > >
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> > > >         at
> > > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > > >         at java.lang.reflect.Method.invoke(Method.java:606)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1618)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:827)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:863)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:877)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule$1.evaluate(SystemPropertiesRestoreRule.java:53)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:50)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.util.TestRuleFieldCacheSanity$1.evaluate(TestRuleFieldCacheSanity.java:51)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:46)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.rules.SystemPropertiesInvariantRule$1.evaluate(SystemPropertiesInvariantRule.java:55)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:49)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:65)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:48)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:360)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:793)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:453)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:836)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.RandomizedRunner$3.evaluate(RandomizedRunner.java:738)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.RandomizedRunner$4.evaluate(RandomizedRunner.java:772)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:783)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule$1.evaluate(SystemPropertiesRestoreRule.java:53)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:46)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:42)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.rules.SystemPropertiesInvariantRule$1.evaluate(SystemPropertiesInvariantRule.java:55)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:39)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:39)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:43)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:48)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:65)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:55)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:360)
> > > >         at java.lang.Thread.run(Thread.java:745)
> > > >
> > > > 4588 T11 C0 oasc.SolrCore.execute [collection1] webapp=null path=null
> > > >
> > >
> >
> params={q=*%3A*&fq=%7B%21collapse+field%3Dgroup_s+nullPolicy%3Dcollapse+min%3Dfield%28test_ti%29%7D&sort=test_ti+desc}
> > > > status=500 QTime=22
> > > > 4591 T11 oasc.SolrException.log ERROR REQUEST FAILED:
> > > >
> > >
> >
> q=*%3A*&fq=%7B%21collapse+field%3Dgroup_s+nullPolicy%3Dcollapse+min%3Dfield%28test_ti%29%7D&sort=test_ti+desc:java.lang.UnsupportedOperationException:
> > > > Query  does not implement createWeight
> > > >         at org.apache.lucene.search.Query.createWeight(Query.java:80)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.search.IndexSearcher.createNormalizedWeight(IndexSearcher.java:684)
> > > >         at
> > > > org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297)
> > > >         at
> > > >
> > >
> >
> org.apache.solr.search.SolrIndexSearcher.getDocSetScore(SolrIndexSearcher.java:879)
> > > >         at
> > > >
> > >
> >
> org.apache.solr.search.SolrIndexSearcher.getDocSet(SolrIndexSearcher.java:902)
> > > >         at
> > > >
> > >
> >
> org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1381)
> > > >         at
> > > >
> > >
> >
> org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:478)
> > > >         at
> > > >
> > >
> >
> org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:461)
> > > >         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:1952)
> > > >         at
> org.apache.solr.util.TestHarness.query(TestHarness.java:295)
> > > >         at
> org.apache.solr.util.TestHarness.query(TestHarness.java:278)
> > > >         at
> > > org.apache.solr.SolrTestCaseJ4.assertQ(SolrTestCaseJ4.java:676)
> > > >         at
> > > org.apache.solr.SolrTestCaseJ4.assertQ(SolrTestCaseJ4.java:669)
> > > >         at
> > > >
> > >
> >
> org.apache.solr.search.TestCollapseQParserPlugin.testCollapseQueries(TestCollapseQParserPlugin.java:106)
> > > >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> > > >         at
> > > >
> > >
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> > > >         at
> > > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > > >         at java.lang.reflect.Method.invoke(Method.java:606)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1618)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:827)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:863)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:877)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule$1.evaluate(SystemPropertiesRestoreRule.java:53)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:50)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.util.TestRuleFieldCacheSanity$1.evaluate(TestRuleFieldCacheSanity.java:51)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:46)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.rules.SystemPropertiesInvariantRule$1.evaluate(SystemPropertiesInvariantRule.java:55)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:49)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:65)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:48)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:360)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:793)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:453)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:836)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.RandomizedRunner$3.evaluate(RandomizedRunner.java:738)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.RandomizedRunner$4.evaluate(RandomizedRunner.java:772)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:783)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule$1.evaluate(SystemPropertiesRestoreRule.java:53)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:46)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:42)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.rules.SystemPropertiesInvariantRule$1.evaluate(SystemPropertiesInvariantRule.java:55)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:39)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:39)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:43)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:48)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:65)
> > > >         at
> > > >
> > >
> >
> org.apache.lucene.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:55)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> > > >         at
> > > >
> > >
> >
> com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:360)
> > > >         at java.lang.Thread.run(Thread.java:745)
> > > >
> > > >
> > > >
> > > >
> > > > ---
> > > > Thanks & Regards
> > > > Umesh Prasad
> > > >
> > > >
> > > >
> > >
> >
> >
> >
> > --
> > ---
> > Thanks & Regards
> > Umesh Prasad
> >
>



-- 
---
Thanks & Regards
Umesh Prasad

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message