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 sameer <sa...@trideal.in> on 2014/04/05 10:24:00 UTC
Not Able to Build Spellcheck index - SpellCheckComponent.prepare
500 Error
Hi
I am trying to use spellcheck in solr with below config but it throwing with
error while using spellcheck build or reload
it works fine otherwise for indexed search, can someone please help
implementing spellcheck corectly
schema.xml:
// fieldType declaration
<fieldType name="textSpell" class="solr.TextField"
positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="misspelled_words.txt"/>
<filter class="solr.PatternReplaceFilterFactory" pattern="([^a-z])"
replacement="" replace="all"/>
<filter class="solr.LengthFilterFactory" min="2" max="50"/>
</analyzer>
</fieldType>
//field name
<field name="spell" type="textSpell" indexed="true" stored="true"
multiValued="true"/>
//copyFields
<copyField source="dealName" dest="spell"/>
<copyField source="dealUri" dest="spell"/>
<copyField source="merchantName" dest="spell"/>
<copyField source="categoryName" dest="spell"/>
<copyField source="dealTitle" dest="spell"/>
<copyField source="highlights" dest="spell"/>
<copyField source="seoTags" dest="spell"/>
<copyField source="description" dest="spell"/>
<copyField source="text" dest="spell"/>
solrconfig.xml:
//searchComponent
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
<str name="queryAnalyzerFieldType">textSpell</str>
<lst name="spellchecker">
<str name="classname">solr.IndexBasedSpellChecker</str>
<str name="name">default</str>
<str name="spellcheckIndexDir">./spellchecker</str>
<str
name="field">categoryName,dealName,seoTags,description,dealTitle,merchantName,dealUri,highlights</str>
<str name="buildOnCommit">true</str>
<str name="accuracy">0.9</str>
</lst>
</searchComponent>
//default requestHandler
<requestHandler name="standard" class="solr.StandardRequestHandler"
default="true">
<lst name="defaults">
<str name="echoParams">explicit</str>
<str name="spellcheck">true</str>
<str name="spellcheck.dictionary">direct</str>
<str name="spellcheck">on</str>
<str name="spellcheck.extendedResults">true</str>
<str name="spellcheck.count">5</str>
<str name="spellcheck.collate">true</str>
<str name="spellcheck.collateExtendedResults">true</str>
</lst>
<arr name="last-components">
<str>spellcheck</str>
</arr>
</requestHandler>
// URL params
select?q=*%3A*&wt=php&indent=true&spellcheck=true&spellcheck.build=true
//output
array(
'responseHeader'=>array(
'status'=>500,
'QTime'=>4,
'params'=>array(
'spellcheck'=>'true',
'indent'=>'true',
'q'=>'*:*',
'_'=>'1396684768649',
'wt'=>'php',
'spellcheck.build'=>'true')),
'error'=>array(
'trace'=>'java.lang.NullPointerException
at
org.apache.solr.handler.component.SpellCheckComponent.prepare(SpellCheckComponent.java:125)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:187)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1859)
at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:710)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:413)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:197)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:767)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.handler.DebugHandler.handle(DebugHandler.java:77)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
',
'code'=>500))
--
View this message in context: http://lucene.472066.n3.nabble.com/Not-Able-to-Build-Spellcheck-index-SpellCheckComponent-prepare-500-Error-tp4129368.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Not Able to Build Spellcheck index -
SpellCheckComponent.prepare 500 Error
Posted by sameer <sa...@trideal.in>.
its solr-4.6.0
--
View this message in context: http://lucene.472066.n3.nabble.com/Not-Able-to-Build-Spellcheck-index-SpellCheckComponent-prepare-500-Error-tp4129368p4129392.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Not Able to Build Spellcheck index - SpellCheckComponent.prepare
500 Error
Posted by Alexandre Rafalovitch <ar...@gmail.com>.
It's a null pointer exception. Either something is not defined
correctly or you are hitting a funny unexpected.
Which version of Solr is it?
Regards,
Alex.
Personal website: http://www.outerthoughts.com/
Current project: http://www.solr-start.com/ - Accelerating your Solr proficiency
On Sat, Apr 5, 2014 at 3:24 PM, sameer <sa...@trideal.in> wrote:
> Hi
> I am trying to use spellcheck in solr with below config but it throwing with
> error while using spellcheck build or reload