spellchecking even the key is true....

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

spellchecking even the key is true....

satya swaroop-2
Hi All,
        can we get the spellchecking results even when the keyword is true.
As for spellchecking will give only to the wrong keywords, cant we get
similar and near words of the keyword though the spellcheck.q is true..
as an example
http://localhost:8080/solr/spellcheck?q=java&spellcheck=true&spellcheck.count=5
the result will be

1)-
<response>
-
<lst name="spellcheck">
<lst name="suggestions"/>
</lst>
</response>


can we get the result as
2)
<response>
-
<lst name="spellcheck">
<lst name="suggestions">
<str>javax</str>
<str>javac</str>
<str>javabean</str>
<str>javascript</str>
</lst>
</response>

NOTE:: all the keywords in the 2nd result is are in index...

Regards,
satya
Reply | Threaded
Open this post in threaded view
|

RE: spellchecking even the key is true....

Dyer, James
Add spellcheck.onlyMorePopular=true to your query and I think it'll do what you want.  See http://wiki.apache.org/solr/SpellCheckComponent#spellcheck.onlyMorePopular for more info.

One caveat is if you use spellcheck.collate, this will likely result in useless, nonsensical collations most of the time.

James Dyer
E-Commerce Systems
Ingram Content Group
(615) 213-4311


-----Original Message-----
From: satya swaroop [mailto:[hidden email]]
Sent: Monday, January 17, 2011 10:32 AM
To: [hidden email]
Subject: spellchecking even the key is true....

Hi All,
        can we get the spellchecking results even when the keyword is true.
As for spellchecking will give only to the wrong keywords, cant we get
similar and near words of the keyword though the spellcheck.q is true..
as an example
http://localhost:8080/solr/spellcheck?q=java&spellcheck=true&spellcheck.count=5
the result will be

1)-
<response>
-
<lst name="spellcheck">
<lst name="suggestions"/>
</lst>
</response>


can we get the result as
2)
<response>
-
<lst name="spellcheck">
<lst name="suggestions">
<str>javax</str>
<str>javac</str>
<str>javabean</str>
<str>javascript</str>
</lst>
</response>

NOTE:: all the keywords in the 2nd result is are in index...

Regards,
satya