lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deshpande, Mukta" <mudes...@ptc.com>
Subject RE: Query regarding Spelling Suggestions
Date Tue, 13 Jan 2009 11:46:24 GMT
Hi Grant,

My spellcheck is now working fine with the following configuration:

<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
   <lst name="spellchecker">
      <str name="fieldType">word</str>
      <str name="classname">solr.IndexBasedSpellChecker</str>
      <str name="field">word</str>
      <str name="characterEncoding">UTF-8</str>
      <str
name="sourceLocation">d:\solr-tomcat\solr\data\syn_index</str>
      <str name="spellcheckIndexDir">./spellcheckerFile1</str>
   </lst>
 </searchComponent>

Earlier I configured the lucene-index (dictionary) "syn_index" to the
spellcheckIndexDir as interpreted from the wiki page.
Then I was looking into the file IndexBasedSpellChecker.java and found
the usage of "sourceLocation". 
When I configured my lucene-index (dictionary) "syn_index" as
"sourceLocation" the IndexBasedSpellChecker worked.

I have following question / observation : (just to ensure that my
configurations are correct)

The lucene-index (dictionary) "syn_index" is already an index so do we
have to specify the spellcheckIndexDir again?
    (If I do not give the spellcheckIndexDir I do not get any
suggestions.)
When I give the build command the spellcheckIndexDir gets populated
reading the "syn_index". Can we avoid this duplication?

If the "sourceLocation" is mandatory when using a third party index for
spelling suggestions, may I update the Solr WIKI to include this
important information.

Thanks & Best Regards,
~Mukta

-----Original Message-----
From: Grant Ingersoll [mailto:gsingers@apache.org] 
Sent: Monday, January 12, 2009 10:15 PM
To: solr-user@lucene.apache.org
Subject: Re: Query regarding Spelling Suggestions

Solr 1.3 doesn't use Log4J, it uses Java Utility Logging (JUL).  I
believe the info level in the logs is sufficient.  Let's start by
posting what you have?

Also, are you able to get the sample spellchecking to work?

On Jan 12, 2009, at 2:16 AM, Deshpande, Mukta wrote:

> Hi,
>
> Could you please send me the needful entries in log4j.properties to 
> enable logging, explicitly for SpellCheckComponent.
>
> My current log4j.properties looks like:
>
> log4j.rootLogger=INFO,console
> log4j.appender.console=org.apache.log4j.ConsoleAppender
> log4j.appender.console.target=System.err
> log4j.appender.console.layout=org.apache.log4j.PatternLayout
> log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd
> HH:mm:ss} %p
> %c{2}: %m%n
> log4j.logger.org.apache.solr=DEBUG
>
> With these settings I can only see the INFO level logs.
>
> I tried to change the log level for SpellCheckComponent to "FINE"  
> using
> the admin logging page http://localhost:8080/solr/admin/logging but 
> did not see any difference in logging.
>
> Thanks,
> ~Mukta
>
> -----Original Message-----
> From: Grant Ingersoll [mailto:gsingers@apache.org]
> Sent: Monday, January 12, 2009 3:22 AM
> To: solr-user@lucene.apache.org
> Subject: Re: Query regarding Spelling Suggestions
>
> Can you send the full log?
>
> On Jan 11, 2009, at 1:51 PM, Deshpande, Mukta wrote:
>
>> I am using the example schema that comes with the Solr installation 
>> downloaded from http://www.mirrorgeek.com/apache.org/lucene/solr/.
>> I have added the "word"  field with "textSpell" fieldtype in the 
>> schema.xml file, as specified in the below mail.
>>
>> My spelling index exist under <SOLR HOME>/data/ If I open my index in

>> Luke  I can see the entries against "word"
>> field.
>>
>> Thanks,
>> ~Mukta
>>
>>
>> ________________________________
>>
>> From: Grant Ingersoll [mailto:gsingers@apache.org]
>> Sent: Fri 1/9/2009 8:29 AM
>> To: solr-user@lucene.apache.org
>> Subject: Re: Query regarding Spelling Suggestions
>>
>>
>>
>> Can you put the full log (as short as possibly demonstrates the
>> problem) somewhere where I can take a look?  Likewise, can you share 
>> your schema?
>>
>> Also, does the spelling index exist under <SOLR HOME>/data/index?  If

>> you open it w/ Luke, does it have entries?
>>
>> Thanks,
>> Grant
>>
>> On Jan 8, 2009, at 11:30 PM, Deshpande, Mukta wrote:
>>
>>>
>>> Yes. I send the build command as:
>>> http://localhost:8080/solr/select/? 
>>> q=documnet&spellcheck=true&spellch
>>> eck
>>> .build
>>> =true&spellcheck.count=2&spellcheck.q=parfect&spellcheck.dictionar
>>> y=dict
>>>
>>> The Tomcat log shows:
>>> Jan 9, 2009 9:55:19 AM org.apache.solr.core.SolrCore execute
>>> INFO: [] webapp=/solr path=/select/
>>> params
>>> ={spellcheck=true&q=documnet&spellcheck.q=parfect&spellcheck.dicti
>>> onary=dict&spellcheck.count=2&spellcheck.build=true} hits=0 status=0
>>> QTime=141
>>>
>>> Even after sending the build command I do not get any suggestions.
>>> Can you please check.
>>>
>>> Thanks,
>>> ~Mukta
>>>
>>> -----Original Message-----
>>> From: Grant Ingersoll [mailto:gsingers@apache.org]
>>> Sent: Thursday, January 08, 2009 7:42 PM
>>> To: solr-user@lucene.apache.org
>>> Subject: Re: Query regarding Spelling Suggestions
>>>
>>> Did you send in the build command?  See 
>>> http://wiki.apache.org/solr/SpellCheckComponent
>>>
>>> On Jan 8, 2009, at 5:14 AM, Deshpande, Mukta wrote:
>>>
>>>> Hi,
>>>>
>>>> I am using Wordnet dictionary for spelling suggestions.
>>>>
>>>> The dictionary is converted to Solr index  with only one field 
>>>> "word"
>>>> and stored in location <solr-home>/data/syn_index, using 
>>>> syns2Index.java program available at 
>>>> http://www.tropo.com/techno/java/lucene/wordnet.html
>>>>
>>>> I have added the "word" field in my "schema.xml" as <field 
>>>> name="word"
>>>
>>>> type="textSpell" indexed="true" stored="true"/>
>>>>
>>>> My application data indexes are in <solr-home>/data
>>>>
>>>> I am trying to use solr.IndexBasedSpellChecker to get spelling 
>>>> suggestions.
>>>>
>>>> My spell check component is configured as:
>>>>
>>>> <searchComponent name="spellcheck"  
>>>> class="solr.SpellCheckComponent">
>
>>>> <str name="queryAnalyzerFieldType">textSpell</str>
>>>> <lst name="spellchecker">
>>>>   <str name="name">dict</str>
>>>>   <str name="classname">solr.IndexBasedSpellChecker</str>
>>>>   <str name="field">word</str>
>>>>   <str name="characterEncoding">UTF-8</str>
>>>>   <str name="spellcheckIndexDir">./syn_index</str>
>>>> </lst>
>>>> </searchComponent>
>>>>
>>>> I have added this component to my standard request handler as:
>>>>
>>>> <requestHandler name="standard" class="solr.StandardRequestHandler"
>>>> default="true">
>>>>  <lst name="defaults">
>>>>      <str name="echoParams">explicit</str>  </lst>  <arr

>>>> name="last-components">
>>>>      <str>spellcheck</str>
>>>>  </arr>
>>>> </requestHandler>
>>>>
>>>> With the above configuration, I do not get any spelling 
>>>> suggestions.
>>>> Can
>>>> somebody help ASAP.
>>>>
>>>> Thanks,
>>>> ~Mukta
>>>
>>>
>
>
>
>
>
>
>

--------------------------
Grant Ingersoll

Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ











Mime
View raw message