You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by cyang2010 <ys...@hotmail.com> on 2011/05/03 00:57:49 UTC
How to debug if termsComponent is used
Hi, I defined a searchHanlder just for the sake of autosuggest, using
TermsComponent.
<searchComponent name="terms"
class="org.apache.solr.handler.component.TermsComponent" >
</searchComponent>
<requestHandler name="/terms"
class="org.apache.solr.handler.component.SearchHandler">
<lst name="defaults">
<str name="echoParams">explicit</str>
</lst>
<arr name="components">
<str>terms</str>
<str>debug</str>
</arr>
This configuration might not even make sense, to configure "terms" and
"debug" component together. Is "debug" component must be wired up with
"query" component? I just need a requestHanlder where i can run
termsComponent, and debug on it. How do I achieve that?
Thanks,
cy
</requestHandler>
--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-debug-if-termsComponent-is-used-tp2891735p2891735.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: How to debug if termsComponent is used
Posted by cyang2010 <ys...@hotmail.com>.
Sorry i didn't mean to give random reply. It is just today my solr
configuration/schema is different now and can't get the error message.
Anyway, i rerun the test.
Basically by specifying such searchcomponent and requesthandler, you won't
get any error.
When you query this it is fine without any debug message (of course, since
no debug parameter is defined in query).
http://localhost:8080/solr/titles/terms?terms=true&terms.fl=autosuggest&terms.prefix=andy&terms.mincount=1&
As soon as i specify the only debug parameter i know, "debugQuery" the solr
server give this error:
http://localhost:8080/solr/titles/terms?terms=true&terms.fl=autosuggest&terms.prefix=andy&terms.mincount=1&debugQuery=true
May 3, 2011 1:27:37 PM org.apache.solr.core.SolrCore execute
INFO: [titles] webapp=/solr path=/terms
params={debugQuery=true&terms.mincount=1
&terms.fl=autosuggest&terms=true&terms.prefix=andy} status=500 QTime=641
May 3, 2011 1:27:37 PM org.apache.solr.common.SolrException log
SEVERE: java.lang.NullPointerException
at
org.apache.solr.handler.component.DebugComponent.process(DebugCompone
nt.java:54)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(Sea
rchHandler.java:203)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandl
erBase.java:131)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)
at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter
.java:338)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilte
r.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
568)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:845)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
7)
at java.lang.Thread.run(Thread.java:619)
That is all i get. Let me know if i use the wrong parameter or what.
Thanks.
cy
--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-debug-if-termsComponent-is-used-tp2891735p2895897.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: How to debug if termsComponent is used
Posted by Erick Erickson <er...@gmail.com>.
Saying "it does not work" doesn't give us much to go on. Can you describe
what you've tried? *How* it fails? Have you looked in the log for any clues?
You might review this page:
http://wiki.apache.org/solr/UsingMailingLists
Best
Erick
On Tue, May 3, 2011 at 3:35 PM, cyang2010 <ys...@hotmail.com> wrote:
> I tried it. It just does not work. the debug component only works when
> query component is there, and it is just showing debugging information for
> query result, not term match result.
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/How-to-debug-if-termsComponent-is-used-tp2891735p2895647.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
Re: How to debug if termsComponent is used
Posted by cyang2010 <ys...@hotmail.com>.
I tried it. It just does not work. the debug component only works when
query component is there, and it is just showing debugging information for
query result, not term match result.
--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-debug-if-termsComponent-is-used-tp2891735p2895647.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: How to debug if termsComponent is used
Posted by Otis Gospodnetic <ot...@yahoo.com>.
Hi,
That looks about right, but I don't know without checking around if debug
component really needs query component, or if it can work with just terms
component.
Have you tried it? Did it not work?
You may save yourself a lot of work and get something better than terms
component with http://sematext.com/products/autocomplete/index.html btw. Or if
you are using Solr trunk, with Suggester.
Otis
----
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
Lucene ecosystem search :: http://search-lucene.com/
----- Original Message ----
> From: cyang2010 <ys...@hotmail.com>
> To: solr-user@lucene.apache.org
> Sent: Mon, May 2, 2011 6:57:49 PM
> Subject: How to debug if termsComponent is used
>
> Hi, I defined a searchHanlder just for the sake of autosuggest, using
> TermsComponent.
>
> <searchComponent name="terms"
> class="org.apache.solr.handler.component.TermsComponent" >
> </searchComponent>
>
>
> <requestHandler name="/terms"
> class="org.apache.solr.handler.component.SearchHandler">
> <lst name="defaults">
> <str name="echoParams">explicit</str>
> </lst>
>
> <arr name="components">
> <str>terms</str>
> <str>debug</str>
> </arr>
>
>
> This configuration might not even make sense, to configure "terms" and
> "debug" component together. Is "debug" component must be wired up with
> "query" component? I just need a requestHanlder where i can run
> termsComponent, and debug on it. How do I achieve that?
>
> Thanks,
>
> cy
> </requestHandler>
>
> --
> View this message in context:
>http://lucene.472066.n3.nabble.com/How-to-debug-if-termsComponent-is-used-tp2891735p2891735.html
>
> Sent from the Solr - User mailing list archive at Nabble.com.
>