Jean-Marc,

This might not solve the particular problem you're having, but to get 
spellcheck to work properly in a distributed enviornment, be sure to set the 
"shards.qt" parameter to the name of your request handler.  See 
http://wiki.apache.org/solr/SpellCheckComponent#Distributed_Search_Support .

James Dyer
Ingram Content Group
(615) 213-4311


-----Original Message-----
From: Jean-Marc Desprez [mailto:jm.desp...@gmail.com] 
Sent: Tuesday, November 12, 2013 8:57 AM
To: solr-user@lucene.apache.org
Subject: [Spellcheck] NullPointerException on QueryComponent.mergeIds

Hello,

I'm following this tutorial : http://wiki.apache.org/solr/SolrCloud with a
SolR 4.5.0

I'm at the very first step, only two replica and two shard and I have only
*one* document in the index.

When I try to get a spellcheck, I have this error :
java.lang.NullPointerException
    at
org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:843)

I do not understand what I'm doing wrong and how I can get an error on
mergeIds with only one document in the index (merge this doc with ... ??)

Some technical details :
URL :
http://127.0.0.1:8983/solr/bench/select?shards.qt=ri_spell_fr_FR&q=sistem&distrib=true
If I set "distrib" to false, no error.

My uniqueKey is indexed and stored :

<field name="ref" type="string" indexed="true" stored="true"
multiValued="false" />
<uniqueKey>ref</uniqueKey>


My conf :
<requestHandler name="ri_spell_fr_FR" class="solr.SearchHandler"
lazy="true">
  <lst name="defaults">
    <bool name="spellcheck">true</bool>
    <str  name="spellcheck.onlyMorePopular">true</str>
    <str  name="spellcheck.extendedResults">true</str>
    <str  name="spellcheck.collateExtendedResults">true</str>
    <str  name="spellcheck.maxCollationTries">3</str>
    <str  name="spellcheck.collate">true</str>
    <str  name="spellcheck.count">5</str>
    <str  name="spellcheck.dictionary">ri_spell_fr_FR</str>
    <str  name="spellcheck.build">false</str>
  </lst>

  <arr name="components">
    <str>spellcheck_fr_FR</str>
  </arr>
</requestHandler>

<searchComponent name="spellcheck_fr_FR" class="solr.SpellCheckComponent">
  <str name="queryAnalyzerFieldType">suggest_fr_FR</str>

  <lst name="spellchecker">
    <str name="name">ri_spell_fr_FR</str>
    <str name="field">spell_fr_FR</str>
    <str name="spellcheckIndexDir">./spellchecker_fr_FR</str>
    <str
name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
  </lst>

  ...

</searchComponent>

With this URL :
http://127.0.0.1:8983/solr/bench/select?qt=ri_spell_fr_FR&q=sistem

I have no error but the response is empty :
<response><lst name="responseHeader"><int name="status">0</int><int
name="QTime">1</int></lst></response>


Thanks
Jean-Marc

Reply via email to