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 Otis Gospodnetic <ot...@yahoo.com> on 2009/04/01 05:20:21 UTC

Re: Spelling Component

Hi,

The $SOLR_URL/solr/biblio/ looks suspicious.  Should that be $SOLR_URL/solr/ ?
Also note that you are using the old SpellCheck RequestHandler, and we not have a SpellCheckComponent - http://wiki.apache.org/solr/SpellCheckComponent

Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



----- Original Message ----
> From: Anoop Atre <an...@mnsu.edu>
> To: "solr-user@lucene.apache.org" <so...@lucene.apache.org>
> Sent: Monday, March 30, 2009 2:58:58 PM
> Subject: Spelling Component
> 
> Hi all, I'm new to Solr and have been reading up as much as possible,
> especially about implementing the spellcheck feature.
> 
> The instructions I'm looking at are on the following links:
> > http://wiki.apache.org/solr/SpellCheckComponent
> > http://snipurl.com/elxmr [vufind tech list]
> 
> Error I get when I try to build the index using
> $SOLR_URL/solr/biblio/spellCheckCompRH?q=*:*&spellcheck.q=hell&spellcheck=true&spellcheck.build=true
> 
>   NOT_FOUND
>   RequestURI=/solr/biblio/spellCheckCompRH
>   Powered by Jetty://
> 
> I've tried it with a separate request handler "/spellCheckCompRH" and
> also integrating it into the regular one "/search" but it just doesn't
> want to work. Do I need to restart something after changes to
> schema/solrconfig files? I looked through the docs and mailing lists but
> couldn't figure out what I'm doing wrong and I don't think any restart
> is required.
> 
> I've attached my schema & solrconfig hoping it's useful...any help will
> be appreciated! : )
> 
> -- 
> 
> - - - - - - - - - - - - - - - - - - - - - - - - -
> Anoop Atre
> IS Developer & Integrator, MnPALS
> PH: 507.389.5060
> OF: 3022 Memorial Library (Office-ML 3022)
> --
> "Mit der Dummheit kämpfen Götter selbst vergebens"
> ~ Johann Christoph Friedrich von Schiller


Re: Spelling Component

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Hi,

It looks like your spellchecker index did get created (doesn't it get created automatically when Solr starts?), but it looks rather empty. :)

Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



----- Original Message ----
> From: Anoop Atre <an...@mnsu.edu>
> To: "solr-user@lucene.apache.org" <so...@lucene.apache.org>
> Sent: Friday, April 3, 2009 3:46:10 PM
> Subject: Re: Spelling Component
> 
> Shalin, I "think" I did build the spellcheck index, I made the changes
> to solrconfig and schema, restarted, passed a &spellcheck.build=true
> which created the index.
> 
> ls -ltr ./spellchecker
> -rw-r--r-- 1 XXX users 20 2009-04-03 13:23 segments.gen
> -rw-r--r-- 1 XXX users 28 2009-04-03 13:23 segments_f
> 
> Hmm...how would I know if the word is in the index? As for the threshold
> do you mean reduce the 0.7 entry in
> solrconfig? Thanks!
> 
> Shalin Shekhar Mangar wrote:
> > On Sat, Apr 4, 2009 at 12:01 AM, Anoop Atre wrote:
> > 
> >> I still don't get any suggestions when I do
> >> /spellCheckCompRH?q=helultrashar&spellcheck=true&spellcheck.collate=true
> >>
> >>
> > Did you build the spellcheck index? Try specifying a correct word which you
> > know is in the index. See if spellchecker returns it. If it does, then it
> > might be that no suggestions are available or there are no suggestions above
> > the configured threshold.


Re: Spelling Component

Posted by Anoop Atre <an...@mnsu.edu>.
Shalin, I "think" I did build the spellcheck index, I made the changes
to solrconfig and schema, restarted, passed a &spellcheck.build=true
which created the index.

ls -ltr ./spellchecker
-rw-r--r-- 1 XXX users 20 2009-04-03 13:23 segments.gen
-rw-r--r-- 1 XXX users 28 2009-04-03 13:23 segments_f

Hmm...how would I know if the word is in the index? As for the threshold
do you mean reduce the <str name="accuracy">0.7</str> entry in
solrconfig? Thanks!

Shalin Shekhar Mangar wrote:
> On Sat, Apr 4, 2009 at 12:01 AM, Anoop Atre <an...@mnsu.edu> wrote:
> 
>> I still don't get any suggestions when I do
>> /spellCheckCompRH?q=helultrashar&spellcheck=true&spellcheck.collate=true
>>
>>
> Did you build the spellcheck index? Try specifying a correct word which you
> know is in the index. See if spellchecker returns it. If it does, then it
> might be that no suggestions are available or there are no suggestions above
> the configured threshold.

Re: Spelling Component

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Sat, Apr 4, 2009 at 12:01 AM, Anoop Atre <an...@mnsu.edu> wrote:

> I still don't get any suggestions when I do
> /spellCheckCompRH?q=helultrashar&spellcheck=true&spellcheck.collate=true
>
>
Did you build the spellcheck index? Try specifying a correct word which you
know is in the index. See if spellchecker returns it. If it does, then it
might be that no suggestions are available or there are no suggestions above
the configured threshold.

-- 
Regards,
Shalin Shekhar Mangar.

Re: Spelling Component

Posted by Anoop Atre <an...@mnsu.edu>.
Otis, Thanks for getting back...I did have to restart for the
schema/config changes to take effect which I'd guessed. : )

I am using the SpellCheckComponent and following the directions on the
wiki. It says to do a set it up using the component AND the RequestHandler.
> http://wiki.apache.org/solr/SpellCheckComponent

I still don't get any suggestions when I do
/spellCheckCompRH?q=helultrashar&spellcheck=true&spellcheck.collate=true

What I do get is:

<response>
 <lst name="responseHeader">
  <int name="status">0</int>
  <int name="QTime">30</int>
 </lst>
<result name="response" numFound="0" start="0"/>
 <lst name="spellcheck">
 <lst name="suggestions"/>
 </lst>
</response>

I see the current time stamp when I ask to do a build so something is
happening...just not sure why I'm not getting the proper result.

When I add &spellcheck.extendedResults=true to the URL I get a response:

<response>
 <lst name="responseHeader">
  <int name="status">0</int>
  <int name="QTime">2</int>
 </lst>
<result name="response" numFound="0" start="0"/>
  <lst name="spellcheck">
  <lst name="suggestions">
   <bool name="correctlySpelled">true</bool>
  </lst>
  </lst>
</response>

Any ideas folks?

~

Otis Gospodnetic wrote:
> Hi,
> 
> The $SOLR_URL/solr/biblio/ looks suspicious.  Should that be $SOLR_URL/solr/ ?
> Also note that you are using the old SpellCheck RequestHandler, and we not have a SpellCheckComponent - http://wiki.apache.org/solr/SpellCheckComponent
> 
> Otis
> --
> Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
> 
> 
> 
> ----- Original Message ----
>> From: Anoop Atre <an...@mnsu.edu>
>> To: "solr-user@lucene.apache.org" <so...@lucene.apache.org>
>> Sent: Monday, March 30, 2009 2:58:58 PM
>> Subject: Spelling Component
>>
>> Hi all, I'm new to Solr and have been reading up as much as possible,
>> especially about implementing the spellcheck feature.
>>
>> The instructions I'm looking at are on the following links:
>>> http://wiki.apache.org/solr/SpellCheckComponent
>>> http://snipurl.com/elxmr [vufind tech list]
>> Error I get when I try to build the index using
>> $SOLR_URL/solr/biblio/spellCheckCompRH?q=*:*&spellcheck.q=hell&spellcheck=true&spellcheck.build=true
>>
>>   NOT_FOUND
>>   RequestURI=/solr/biblio/spellCheckCompRH
>>   Powered by Jetty://