I believe the reason is b/c when onlyMP is false, if the word itself is already in the index, it short circuits out. When onlyMP is true, it checks to see if there are more frequently occurring variations.

However, I don't have the code in front of me at the moment, so I can't verify.

-Grant

On Feb 12, 2009, at 8:07 AM, Marcus Stratmann wrote:

Hello,

I have another question concerning the spell checking mechanism.
Setting onlyMorePopular=true and using the parameters

spellcheck =true&spellcheck.q=gran&q=gran&spellcheck.onlyMorePopular=true

I get the result

<lst name="spellcheck">
<lst name="suggestions">
 <lst name="gran">
  <int name="numFound">1</int>
  <int name="startOffset">0</int>
  <int name="endOffset">4</int>
  <int name="origFreq">13</int>
  <lst name="suggestion">
   <int name="frequency">32</int>
   <str name="word">grand</str>
  </lst>
 </lst>
 <bool name="correctlySpelled">true</bool>
</lst>
</lst>

which is okay.
But when I turn off onlyMorePopular

spellcheck =true&spellcheck.q=gran&q=gran&spellcheck.onlyMorePopular=false

the output is

<lst name="spellcheck">
<lst name="suggestions"/>
</lst>

I was expecting to get *more* results when I turn off onlyMorePopular and to get all of the results contained in the result without onlyMorePopular ("grand") plus some more. Instead I get no spell check results at all. Why is that?

Thanks,
Marcus

Reply via email to