Re: Null pointer exception in spell checker at addchecker method

2015-12-24 Thread JoeWang
Thank you! It really help me out. 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Null-pointer-exception-in-spell-checker-at-addchecker-method-tp4105489p4247203.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Null pointer exception in spell checker at addchecker method

2014-08-22 Thread nish
Great!! Worked for me too. Thanks a lot



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Null-pointer-exception-in-spell-checker-at-addchecker-method-tp4105489p4154403.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Null pointer exception in spell checker at addchecker method

2013-12-09 Thread sweety
yes, it worked.
And i got the reason for the error.
Thanks a lot.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Null-pointer-exception-in-spell-checker-at-addchecker-method-tp4105489p4105636.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Null pointer exception in spell checker at addchecker method

2013-12-08 Thread Areek Zillur
From the solrConfig provided it seems like you have only two named
spellcheckers defined (direct  wordbreak), but in your '/spell'
requestHandler you are setting three spellcheckers (direct, default 
wordbreak). As you do not have an unnamed spellchecker, there is no
spellchecker defined with the name 'default'.
Hence its erroring out when its trying to get config for the non-existent
'default' spellchecker. I think it should work if you remove str
name=spellcheck.dictionarydefault/str from your '/spell'
requestHandler?

Hope that helps,

Areek


On Fri, Dec 6, 2013 at 11:33 PM, sweety sweetyshind...@yahoo.com wrote:

 Im trying to use spell check component.
 My *schema* is:(i have included only fields necessary for spell check not
 the entire schema)
 fields

 field name=doc_id type=uuid indexed=true stored=true default=NEW
 multiValued=false/
 field name=id type=string indexed=true stored=true required=true
 multiValued=false/
 field name=contents type=text indexed=true stored=true
 multiValued=false/
 field name=author type=string indexed=true stored=true
 multiValued=true/
 field name=title type=text indexed=true stored=true/
 field name=_version_ type=long indexed=true stored=true
 multiValued=false/
 copyfield source=id dest=text /
 dynamicField name=ignored_* type=text indexed=false stored=false
 multiValued=true/

 field name=spelltext type=spell indexed=true stored=false
 multiValued=true /
 copyField source=contents dest=spelltext /
 /fields
 types
 fieldType name=spell class=solr.TextField 
 analyzer type=index
 tokenizer class=solr.WhitespaceTokenizerFactory/
 filter class=solr.LowerCaseFilterFactory /
 filter class=solr.EnglishMinimalStemFilterFactory /
 filter class=solr.SnowballPorterFilterFactory /
 filter class=solr.WordDelimiterFilterFactory generateWordParts=1
 splitOnCaseChange=1/
 /analyzer
 analyzer type=query
 tokenizer class=solr.WhitespaceTokenizerFactory/
 filter class=solr.EnglishMinimalStemFilterFactory /
 filter class=solr.SnowballPorterFilterFactory /
 /analyzer
 /fieldType
 /types

 My *solrconfig* is:

 searchComponent name=spellcheck class=solr.SpellCheckComponent
 str name=queryAnalyzerFieldTypetext/str
 lst name=spellchecker
 str name=namedirect/str
 str name=fieldcontents/str
 str name=classnamesolr.DirectSolrSpellChecker/str
 str name=distanceMeasureinternal/str
 float name=accuracy0.8/float
 int name=maxEdits1/int
 int name=minPrefix1/int
 int name=maxInspections5/int
 int name=minQueryLength3/int
 float name=maxQueryFrequency0.01/float
 /lst
 /searchComponent

 searchComponent name=spellcheck class=solr.SpellCheckComponent
   lst name=spellchecker
str name=namewordbreak/str
str name=classnamesolr.WordBreakSolrSpellChecker/str
str name=fieldcontents/str
str name=combineWordstrue/str
str name=breakWordstrue/str
int name=maxChanges10/int
  /lst
 /searchComponent

 requestHandler name=/spell class=solr.SearchHandler startup=lazy
 lst name=defaults
 str name=spellchecktrue/str
 str name=spellcheck.dictionarydirect/str
 str name=spellcheck.dictionarydefault/str
 str name=spellcheck.dictionarywordbreak/str
 str name=spellcheckon/str
 str name=spellcheck.extendedResultstrue/str
 str name=spellcheck.count5/str
 str name=spellcheck.collatetrue/str
 str name=spellcheck.collateExtendedResultstrue/str
 /lst
 arr name=last-components
 strspellcheck/str
 /arr
 /requestHandler

 I get this *error*:
 java.lang.NullPointerException at

 org.apache.solr.spelling.*ConjunctionSolrSpellChecker.addChecker*(ConjunctionSolrSpellChecker.java:58)
 at

 org.apache.solr.handler.component.SpellCheckComponent.getSpellChecker(SpellCheckComponent.java:475)
 at

 org.apache.solr.handler.component.SpellCheckComponent.prepare(SpellCheckComponent.java:106)
 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.RequestHandlers$LazyRequestHandlerWrapper.handleRequest(RequestHandlers.java:242)
 at org.apache.solr.core.SolrCore.execute(SolrCore.java:1797) at

 org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:637)
 at

 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:343)
 at

 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:141)
 at

 I know that the error might be in addchecker method,i read this method but
 the coding of this method is such that, for all the null values, default
 values are added.
 (eg: if (queryAnalyzer == null)
  queryAnalyzer = checker.getQueryAnalyzer(); )
 Now so i feel that the Null checker value is sent when
 /checkers.add(checker);/  is executed.

 If i am right tell me how to resolve this,else what has gone wrong.
 Thanks in advance.



 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/Null-pointer-exception-in-spell-checker-at-addchecker-method-tp4105489.html
 Sent from the Solr - User mailing

Re: Null pointer exception in spell checker at addchecker method

2013-12-08 Thread ??????
how can i unsubscribe




-- Original --
From:  Areek Zillur;areek...@gmail.com;
Date:  Mon, Dec 9, 2013 02:26 PM
To:  solr-usersolr-user@lucene.apache.org; 

Subject:  Re: Null pointer exception in spell checker at addchecker method



From the solrConfig provided it seems like you have only two named
spellcheckers defined (direct  wordbreak), but in your '/spell'
requestHandler you are setting three spellcheckers (direct, default 
wordbreak). As you do not have an unnamed spellchecker, there is no
spellchecker defined with the name 'default'.
Hence its erroring out when its trying to get config for the non-existent
'default' spellchecker. I think it should work if you remove str
name=spellcheck.dictionarydefault/str from your '/spell'
requestHandler?

Hope that helps,

Areek


On Fri, Dec 6, 2013 at 11:33 PM, sweety sweetyshind...@yahoo.com wrote:

 Im trying to use spell check component.
 My *schema* is:(i have included only fields necessary for spell check not
 the entire schema)
 fields

 field name=doc_id type=uuid indexed=true stored=true default=NEW
 multiValued=false/
 field name=id type=string indexed=true stored=true required=true
 multiValued=false/
 field name=contents type=text indexed=true stored=true
 multiValued=false/
 field name=author type=string indexed=true stored=true
 multiValued=true/
 field name=title type=text indexed=true stored=true/
 field name=_version_ type=long indexed=true stored=true
 multiValued=false/
 copyfield source=id dest=text /
 dynamicField name=ignored_* type=text indexed=false stored=false
 multiValued=true/

 field name=spelltext type=spell indexed=true stored=false
 multiValued=true /
 copyField source=contents dest=spelltext /
 /fields
 types
 fieldType name=spell class=solr.TextField 
 analyzer type=index
 tokenizer class=solr.WhitespaceTokenizerFactory/
 filter class=solr.LowerCaseFilterFactory /
 filter class=solr.EnglishMinimalStemFilterFactory /
 filter class=solr.SnowballPorterFilterFactory /
 filter class=solr.WordDelimiterFilterFactory generateWordParts=1
 splitOnCaseChange=1/
 /analyzer
 analyzer type=query
 tokenizer class=solr.WhitespaceTokenizerFactory/
 filter class=solr.EnglishMinimalStemFilterFactory /
 filter class=solr.SnowballPorterFilterFactory /
 /analyzer
 /fieldType
 /types

 My *solrconfig* is:

 searchComponent name=spellcheck class=solr.SpellCheckComponent
 str name=queryAnalyzerFieldTypetext/str
 lst name=spellchecker
 str name=namedirect/str
 str name=fieldcontents/str
 str name=classnamesolr.DirectSolrSpellChecker/str
 str name=distanceMeasureinternal/str
 float name=accuracy0.8/float
 int name=maxEdits1/int
 int name=minPrefix1/int
 int name=maxInspections5/int
 int name=minQueryLength3/int
 float name=maxQueryFrequency0.01/float
 /lst
 /searchComponent

 searchComponent name=spellcheck class=solr.SpellCheckComponent
   lst name=spellchecker
str name=namewordbreak/str
str name=classnamesolr.WordBreakSolrSpellChecker/str
str name=fieldcontents/str
str name=combineWordstrue/str
str name=breakWordstrue/str
int name=maxChanges10/int
  /lst
 /searchComponent

 requestHandler name=/spell class=solr.SearchHandler startup=lazy
 lst name=defaults
 str name=spellchecktrue/str
 str name=spellcheck.dictionarydirect/str
 str name=spellcheck.dictionarydefault/str
 str name=spellcheck.dictionarywordbreak/str
 str name=spellcheckon/str
 str name=spellcheck.extendedResultstrue/str
 str name=spellcheck.count5/str
 str name=spellcheck.collatetrue/str
 str name=spellcheck.collateExtendedResultstrue/str
 /lst
 arr name=last-components
 strspellcheck/str
 /arr
 /requestHandler

 I get this *error*:
 java.lang.NullPointerException at

 org.apache.solr.spelling.*ConjunctionSolrSpellChecker.addChecker*(ConjunctionSolrSpellChecker.java:58)
 at

 org.apache.solr.handler.component.SpellCheckComponent.getSpellChecker(SpellCheckComponent.java:475)
 at

 org.apache.solr.handler.component.SpellCheckComponent.prepare(SpellCheckComponent.java:106)
 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.RequestHandlers$LazyRequestHandlerWrapper.handleRequest(RequestHandlers.java:242)
 at org.apache.solr.core.SolrCore.execute(SolrCore.java:1797) at

 org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:637)
 at

 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:343)
 at

 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:141)
 at

 I know that the error might be in addchecker method,i read this method but
 the coding of this method is such that, for all the null values, default
 values are added.
 (eg: if (queryAnalyzer == null)
  queryAnalyzer = checker.getQueryAnalyzer(); )
 Now so i feel that the Null checker value is sent when
 /checkers.add(checker);/  is executed.

 If i am

Null pointer exception in spell checker at addchecker method

2013-12-06 Thread sweety
Im trying to use spell check component.
My *schema* is:(i have included only fields necessary for spell check not
the entire schema)
fields 

field name=doc_id type=uuid indexed=true stored=true default=NEW
multiValued=false/
field name=id type=string indexed=true stored=true required=true
multiValued=false/
field name=contents type=text indexed=true stored=true
multiValued=false/
field name=author type=string indexed=true stored=true
multiValued=true/
field name=title type=text indexed=true stored=true/
field name=_version_ type=long indexed=true stored=true
multiValued=false/
copyfield source=id dest=text /
dynamicField name=ignored_* type=text indexed=false stored=false
multiValued=true/

field name=spelltext type=spell indexed=true stored=false
multiValued=true /
copyField source=contents dest=spelltext /
/fields 
types
fieldType name=spell class=solr.TextField 
analyzer type=index
tokenizer class=solr.WhitespaceTokenizerFactory/
filter class=solr.LowerCaseFilterFactory /
filter class=solr.EnglishMinimalStemFilterFactory /
filter class=solr.SnowballPorterFilterFactory / 
filter class=solr.WordDelimiterFilterFactory generateWordParts=1
splitOnCaseChange=1/
/analyzer
analyzer type=query
tokenizer class=solr.WhitespaceTokenizerFactory/
filter class=solr.EnglishMinimalStemFilterFactory /
filter class=solr.SnowballPorterFilterFactory / 
/analyzer
/fieldType
/types

My *solrconfig* is:

searchComponent name=spellcheck class=solr.SpellCheckComponent
str name=queryAnalyzerFieldTypetext/str
lst name=spellchecker
str name=namedirect/str
str name=fieldcontents/str
str name=classnamesolr.DirectSolrSpellChecker/str
str name=distanceMeasureinternal/str
float name=accuracy0.8/float
int name=maxEdits1/int
int name=minPrefix1/int
int name=maxInspections5/int
int name=minQueryLength3/int
float name=maxQueryFrequency0.01/float
/lst
/searchComponent  

searchComponent name=spellcheck class=solr.SpellCheckComponent
  lst name=spellchecker
   str name=namewordbreak/str
   str name=classnamesolr.WordBreakSolrSpellChecker/str
   str name=fieldcontents/str
   str name=combineWordstrue/str
   str name=breakWordstrue/str
   int name=maxChanges10/int
 /lst
/searchComponent  

requestHandler name=/spell class=solr.SearchHandler startup=lazy
lst name=defaults
str name=spellchecktrue/str
str name=spellcheck.dictionarydirect/str 
str name=spellcheck.dictionarydefault/str
str name=spellcheck.dictionarywordbreak/str 
str name=spellcheckon/str
str name=spellcheck.extendedResultstrue/str
str name=spellcheck.count5/str
str name=spellcheck.collatetrue/str 
str name=spellcheck.collateExtendedResultstrue/str
/lst
arr name=last-components
strspellcheck/str
/arr
/requestHandler

I get this *error*:
java.lang.NullPointerException at
org.apache.solr.spelling.*ConjunctionSolrSpellChecker.addChecker*(ConjunctionSolrSpellChecker.java:58)
at
org.apache.solr.handler.component.SpellCheckComponent.getSpellChecker(SpellCheckComponent.java:475)
at
org.apache.solr.handler.component.SpellCheckComponent.prepare(SpellCheckComponent.java:106)
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.RequestHandlers$LazyRequestHandlerWrapper.handleRequest(RequestHandlers.java:242)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1797) at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:637)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:343)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:141)
at 

I know that the error might be in addchecker method,i read this method but
the coding of this method is such that, for all the null values, default
values are added.
(eg: if (queryAnalyzer == null) 
 queryAnalyzer = checker.getQueryAnalyzer(); )
Now so i feel that the Null checker value is sent when  
/checkers.add(checker);/  is executed.

If i am right tell me how to resolve this,else what has gone wrong.
Thanks in advance.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Null-pointer-exception-in-spell-checker-at-addchecker-method-tp4105489.html
Sent from the Solr - User mailing list archive at Nabble.com.