The spellcheck.q parameter is optional. However, the q parameter is
compulsory. So you can write q=macrosoft and avoid spellcheck.q altogether.
The difference behind it is that spellcheck.q is used if present and it uses
the query analyzer of the Solr field used to build the index whereas, the q
parameter uses a WhitespaceAnalyzer on the queries.

Also note that you'll need to specify spellcheck.build=true only on the
first request when it will build the spell check index. The subsequent
requests need not have spellcheck.build=true.

On Tue, Jul 8, 2008 at 9:03 PM, <[EMAIL PROTECTED]> wrote:

> Hi,
>
> Thanks for your help.
>
> I can't understand the part when Geoff says that "I've never seen it happen
> with just the q or just the spellcheck.q fields in my query".
>
> That's means that I can do, for example:
>        http://192.168.92.5:8080/solr/spellCheckCompRH?
> spellcheck.q=macrosoft&spellcheck=true&spellcheck.build=true<http://192.168.92.5:8080/solr/spellCheckCompRH?spellcheck.q=macrosoft&spellcheck=true&spellcheck.build=true>
>
> I usually do things like:
>
>
> http://192.168.92.5:8080/solr/spellCheckCompRH?q=a&spellcheck.q=macrosoft&sp
> ellcheck=true&spellcheck.build=true<http://192.168.92.5:8080/solr/spellCheckCompRH?q=a&spellcheck.q=macrosoft&spellcheck=true&spellcheck.build=true>
>
> I don't know if I am understanding correctly but if I try the first thing I
> have this exception:
>
> Estado HTTP 500 - null java.lang.NullPointerException at
> org.apache.solr.common.util.StrUtils.splitSmart(StrUtils.java:36) at
> org.apache.solr.search.OldLuceneQParser.parse(LuceneQParserPlugin.java:104)
> at org.apache.solr.search.QParser.getQuery(QParser.java:87) at
>
> org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java
> :82) at
>
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHand
> ler.java:135) at
>
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.
> java:128) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1025) at
>
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:3
> 38) at
>
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:
> 272) at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:235) at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:206) at
>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:233) at
>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> va:175) at
>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128
> ) at
>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102
> ) at
>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> :109) at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
> at
>
> org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:
> 852) at
>
> org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(H
> ttp11AprProtocol.java:584) at
> org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508) at
> java.lang.Thread.run(Unknown Source)
>
>
> I hope this help you.
> If you need some kind of test don't doubt to tell me.
>
> Rober.
>
> -----Mensaje original-----
> De: Geoffrey Young [mailto:[EMAIL PROTECTED]
> Enviado el: martes, 08 de julio de 2008 16:58
> Para: solr-user@lucene.apache.org
> Asunto: Re: problems with SpellCheckComponent
>
>
>
> Shalin Shekhar Mangar wrote:
> > Hi Geoff,
> >
> > I can't find anything in the code which would give this exception when
> both
> > q and spellcheck.q is specified. Though, this exception is certainly
> > possible when you restart solr. Anyways, I'll look into it more deeply.
>
> great, thanks.
>
> >
> > There are a few ways in which we can improve this component. For example
> a
> > lot of this trouble can go away if we can reload the spell index on
> startup
> > if it exists or build it if it does not exist (SOLR-593 would need to be
> > resolved for this). With SOLR-605 committed, we can now add an option to
> > re-build the index (built from Solr fields) on commits by adding a
> listener
> > using the API. There are a few issues with collation which are being
> handled
> > in SOLR-606.
> >
> > I'll open new issues to track these items. Please bear with us since this
> is
> > a new component and may take a few iterations to stabilize. Thank you for
> > helping us find these issues :)
>
> np - this is a great feature to have and it's going to save me some
> effort as we prepare for deployment, so it's worth taking the time to
> work out the bugs.
>
> thanks for your effort.
>
> --Geoff
>
>


-- 
Regards,
Shalin Shekhar Mangar.

Reply via email to