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 Andrew Clegg <an...@gmail.com> on 2010/05/09 21:20:41 UTC
Fixed: Solritas on multicore Solr, using standard query handler
(was Re: ClassNotFoundException:
org.apache.solr.response.VelocityResponseWriter)
Don't worry Erik -- I figured this one out.
For the benefit of future searchers, you need
<str name="defType">lucene</str>
And to avoid the NullPointerException from the /solr/CORENAME/itas page, you
actually need to supply a
?q=blah
initial query.
I just assumed it would give you a blank search page if you didn't supply a
query.
N.B. In case this catches anyone out -- there's also a few places where you
need to put the core name into the templates in the conf/velocity directory
for the core. They don't pick this up automatically so you need to find any
references to /solr/admin or /solr/itas and insert your core name in the
middle.
(Does anyone know if there'd be a simple way to make that automatic?)
Andrew Clegg wrote:
>
>
> Erik Hatcher-4 wrote:
>>
>> What version of Solr? Try switching to
>> class="solr.VelocityResponseWriter", and if that doesn't work use
>> class="org.apache.solr.request.VelocityResponseWriter". The first
>> form is the recommended way to do it. The actual package changed in
>> trunk not too long ago.
>>
>
> Hi Erik,
>
> This is with vanilla Solr 1.4
>
> I got it working with solr.VelocityResponseWriter -- thanks.
>
> However, I'm having trouble with the defType parameter. I want to use the
> standard query type so people can used nested booleans etc. in the
> queries. When I tried this in solrconfig:
>
> <str name="defType">standard</str>
>
> I got this from the Solritas page:
>
>
> HTTP ERROR: 400
>
> Unknown query type 'standard'
>
> RequestURI=/solr/twitter/itas
>
> Powered by Jetty://
>
>
> However when I tried this:
>
> <str name="defType">standard</str>
>
> I got this exception:
>
>
> HTTP ERROR: 500
>
> null
>
> java.lang.NullPointerException
> at java.io.StringReader.<init>(StringReader.java:33)
> at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:197)
> at
> org.apache.solr.search.LuceneQParser.parse(LuceneQParserPlugin.java:78)
> at org.apache.solr.search.QParser.getQuery(QParser.java:131)
> at
> org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:89)
> at
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:174)
> at
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.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(SolrDispatchFilter.java:241)
> 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)
>
> RequestURI=/solr/twitter/itas
>
> Powered by Jetty://
>
>
> Do you know what the right way to do this is?
>
> Thanks,
>
> Andrew.
>
>
--
:: http://biotext.org.uk/ ::
--
View this message in context: http://lucene.472066.n3.nabble.com/ClassNotFoundException-org-apache-solr-response-VelocityResponseWriter-tp787256p787589.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Fixed: Solritas on multicore Solr, using standard query handler (was Re: ClassNotFoundException: org.apache.solr.response.VelocityResponseWriter)
Posted by Erik Hatcher <er...@gmail.com>.
On May 9, 2010, at 3:20 PM, Andrew Clegg wrote:
> N.B. In case this catches anyone out -- there's also a few places
> where you
> need to put the core name into the templates in the conf/velocity
> directory
> for the core. They don't pick this up automatically so you need to
> find any
> references to /solr/admin or /solr/itas and insert your core name in
> the
> middle.
>
> (Does anyone know if there'd be a simple way to make that automatic?)
Yeah. Eric Pugh mentioned it here:
<https://issues.apache.org/jira/browse/SOLR-1894?focusedCommentId=12861800&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_12861800
>
Use ${request.core.name} wherever you need the core name.
Erik