lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rohan Thakur <rohan.i...@gmail.com>
Subject search request handler error
Date Fri, 15 Mar 2013 14:01:08 GMT
hi all

please someone help me with this I am getting search request handler when I
modified the /select request handler to add spell correction in it
I am using solr4.1

*error:*
INFO: Initializing spell checkers
Mar 15, 2013 7:21:19 PM org.apache.solr.core.QuerySenderListener newSearcher
INFO: QuerySenderListener sending requests to
Searcher@6ce7ce4cmain{StandardDirectoryReader(segments_e4:2003
_qp(4.1):C1063)}
Mar 15, 2013 7:21:19 PM org.apache.solr.common.SolrException log
SEVERE: java.lang.NullPointerException
        at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:181)
        at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1816)
        at
org.apache.solr.core.QuerySenderListener.newSearcher(QuerySenderListener.java:64)
        at org.apache.solr.core.SolrCore$5.call(SolrCore.java:1594)
        at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:679)

Mar 15, 2013 7:21:19 PM org.apache.solr.core.SolrCore close
INFO: [collection1]  CLOSING SolrCore org.apache.solr.core.SolrCore@641cab18
Mar 15, 2013 7:21:19 PM org.apache.solr.update.DirectUpdateHandler2 close
INFO: closing DirectUpdateHandler2{commits=0,autocommit
maxTime=15000ms,autocommits=0,soft
autocommits=0,optimizes=0,rollbacks=0,expungeDeletes=0,docsPending=0,adds=0,deletesById=0,deletesByQuery=0,errors=0,cumulative_adds=0,cumulative_deletesById=0,cumulative_deletesByQuery=0,cumulative_errors=0}
Mar 15, 2013 7:21:19 PM org.apache.solr.core.SolrCore execute
INFO: [collection1] webapp=null path=null
params={event=firstSearcher&q=static+firstSearcher+warming+in+solrconfig.xml&distrib=false}
status=500 QTime=7
Mar 15, 2013 7:21:19 PM org.apache.solr.core.QuerySenderListener newSearcher
INFO: QuerySenderListener done.
Mar 15, 2013 7:21:19 PM org.apache.solr.core.SolrCore decrefSolrCoreState
INFO: Closing SolrCoreState
Mar 15, 2013 7:21:19 PM org.apache.solr.update.DefaultSolrCoreState
closeIndexWriter
INFO: SolrCoreState ref count has reached 0 - closing IndexWriter
Mar 15, 2013 7:21:19 PM org.apache.solr.update.DefaultSolrCoreState
closeIndexWriter
INFO: closing IndexWriter with IndexWriterCloser
Mar 15, 2013 7:21:19 PM org.apache.solr.core.SolrCore registerSearcher
INFO: [collection1] Registered new searcher
Searcher@6ce7ce4cmain{StandardDirectoryReader(segments_e4:2003
_qp(4.1):C1063)}
Mar 15, 2013 7:21:20 PM org.apache.solr.core.SolrCore closeSearcher
INFO: [collection1] Closing main searcher on request.
Mar 15, 2013 7:21:20 PM org.apache.solr.core.CachingDirectoryFactory close
INFO: Releasing
directory:/root/rohan/solr-4.1.0/example/solr/collection1/data/index
Mar 15, 2013 7:21:20 PM org.apache.solr.core.CachingDirectoryFactory close
INFO: Closing directory when closing
factory:/root/rohan/solr-4.1.0/example/solr/collection1/data
Mar 15, 2013 7:21:20 PM org.apache.solr.core.CachingDirectoryFactory
closeDirectory
INFO: Closing directory:/root/rohan/solr-4.1.0/example/solr/collection1/data
Mar 15, 2013 7:21:20 PM org.apache.solr.core.CachingDirectoryFactory close
INFO: Closing directory when closing
factory:/root/rohan/solr-4.1.0/example/solr/collection1/data/index
Mar 15, 2013 7:21:20 PM org.apache.solr.core.CachingDirectoryFactory
closeDirectory
INFO: Closing
directory:/root/rohan/solr-4.1.0/example/solr/collection1/data/index
Mar 15, 2013 7:21:20 PM org.apache.solr.core.CoreContainer recordAndThrow
SEVERE: Unable to create core: collection1
org.apache.solr.common.SolrException: java.lang.Float cannot be cast to
java.lang.String
        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:794)
        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:607)
        at
org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:1003)
        at
org.apache.solr.core.CoreContainer.create(CoreContainer.java:1033)
        at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:629)
        at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:624)
        at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.ClassCastException: java.lang.Float cannot be cast to
java.lang.String
        at
org.apache.solr.spelling.AbstractLuceneSpellChecker.init(AbstractLuceneSpellChecker.java:97)
        at
org.apache.solr.spelling.IndexBasedSpellChecker.init(IndexBasedSpellChecker.java:57)
        at
org.apache.solr.handler.component.SpellCheckComponent.inform(SpellCheckComponent.java:597)
        at
org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:590)
        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:789)
        ... 13 more
Mar 15, 2013 7:21:20 PM org.apache.solr.common.SolrException log
SEVERE: null:org.apache.solr.common.SolrException: Unable to create core:
collection1
        at
org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:1654)
        at
org.apache.solr.core.CoreContainer.create(CoreContainer.java:1039)
        at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:629)
        at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:624)
        at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:679)
Caused by: org.apache.solr.common.SolrException: java.lang.Float cannot be
cast to java.lang.String
        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:794)
        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:607)
        at
org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:1003)
        at
org.apache.solr.core.CoreContainer.create(CoreContainer.java:1033)
        ... 10 more
Caused by: java.lang.ClassCastException: java.lang.Float cannot be cast to
java.lang.String
        at
org.apache.solr.spelling.AbstractLuceneSpellChecker.init(AbstractLuceneSpellChecker.java:97)
        at
org.apache.solr.spelling.IndexBasedSpellChecker.init(IndexBasedSpellChecker.java:57)
        at
org.apache.solr.handler.component.SpellCheckComponent.inform(SpellCheckComponent.java:597)
        at
org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:590)
        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:789)



*this was the error and following are the changes in solrcongif.xml*
<requestHandler name="/select" class="solr.SearchHandler">
    <!-- default values for query parameters can be specified, these
         will be overridden by parameters in the request
      -->
     <lst name="defaults">
       <str name="echoParams">explicit</str>
       <int name="rows">10</int>
       <str name="indent">true</str>
       <str name="wt">json</str>
       <str name="defType">edismax</str>
       <str name="qf">
           title^30.0 url^10.0
       </str>
       <str name="df">title</str>
        <!-- Spell checking defaults -->
       <str name="spellcheck">on</str>
       <str name="spellcheck.dictionary">default</str>
       <str name="spellcheck.dictionary">wordbreak</str>
       <str name="spellcheck.onlyMorePopular">false</str>
       <str name="spellcheck.extendedResults">false</str>
       <str name="spellcheck.count">3</str>
       <str name="spellcheck.alternativeTermCount">2</str>
       <str name="spellcheck.maxResultsForSuggest">5</str>
       <str name="spellcheck.collate">true</str>
       <str name="spellcheck.collateExtendedResults">true</str>
       <str name="spellcheck.maxCollationTries">5</str>
       <str name="spellcheck.maxCollations">3</str>
     </lst>

     <arr name="last-components">
      <str>spellcheck</str>
     </arr>


*search components are:*

 <searchComponent name="spellcheck" class="solr.SpellCheckComponent">



    <!-- Multiple "Spell Checkers" can be declared and used by this
         component
      -->

    <!-- a spellchecker built from a field of the main index -->
    <lst name="spellchecker">
      <str name="name">default</str>

      <str name="classname">solr.IndexBasedSpellChecker</str>
      <!-- the spellcheck distance measure used, the default is the
internal levenshtein -->
      <str name="field">spell</str>
      <str name="distanceMeasure">internal</str>
      <!-- minimum accuracy needed to be considered a valid spellcheck
suggestion -->
      <float name="accuracy">0.5</float>
      <!-- the maximum #edits we consider when enumerating terms: can be 1
or 2 -->
      <int name="maxEdits">2</int>
      <!-- the minimum shared prefix when enumerating terms -->
      <int name="minPrefix">1</int>
      <!-- maximum number of inspections per result. -->
      <int name="maxInspections">5</int>
      <!-- minimum length of a query term to be considered for correction
-->
      <int name="minQueryLength">4</int>
      <!-- maximum threshold of documents a query term can appear to be
considered for correction -->
      <float name="maxQueryFrequency">0.01</float>
      <!-- uncomment this to require suggestions to occur in 1% of the
documents
        <float name="thresholdTokenFrequency">.01</float>
      -->
    </lst>

    <!-- a spellchecker that can break or combine words.  See "/spell"
handler below for usage -->
    <lst name="spellchecker">
      <str name="name">wordbreak</str>
      <str name="classname">solr.WordBreakSolrSpellChecker</str>
      <str name="field">spell</str>
      <str name="combineWords">true</str>
      <str name="breakWords">true</str>
      <int name="maxChanges">5</int>
    </lst>

    <!-- a spellchecker that uses a different distance measure -->

       <lst name="spellchecker">
         <str name="name">jarowinkler</str>
         <str name="field">spell</str>
         <str name="classname">solr.DirectSolrSpellChecker</str>
         <str
name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
       </lst>
          <str name="queryAnalyzerFieldType">textSpell</str>
  </searchComponent>

  <!--
    The SpellingQueryConverter to convert raw (CommonParams.Q) queries into
tokens.  Uses a simple regular expression
    to strip off field markup, boosts, ranges, etc. but it is not
guaranteed to match an exact parse from the query parser.

    Optional, defaults to solr.SpellingQueryConverter
   -->
  <queryConverter name="queryConverter"
class="solr.SpellingQueryConverter"/>


*changes in schema.xml :*
<fieldType name="textSpell" class="solr.TextField"
positionIncrementGap="100" omitNorms="true">
      <analyzer type="index">
          <charFilter class="solr.PatternReplaceCharFilterFactory"
pattern="\\\[\]\(\)\-\,\/\+" replacement=" "/>
          <tokenizer class="solr.WhitespaceTokenizerFactory"/>
          <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
          <filter class="solr.LowerCaseFilterFactory"/>
          <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
       </analyzer>
       <analyzer type="query">
          <tokenizer class="solr.WhitespaceTokenizerFactory"/>
          <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
          <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
          <filter class="solr.LowerCaseFilterFactory"/>
          <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
       </analyzer>
     </fieldType>

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