Hello,

I'm trying to learn how to use the spell checkers of solr (1.3). I found out that FileBasedSpellChecker and IndexBasedSpellChecker produce different outputs.

IndexBasedSpellChecker says

<lst name="spellcheck">
        <lst name="suggestions">
                <lst name="gane">
                        <int name="numFound">1</int>
                        <int name="startOffset">0</int>
                        <int name="endOffset">4</int>
                        <int name="origFreq">0</int>
                        <lst name="suggestion">
                                <int name="frequency">85</int>
                                <str name="word">game</str>
                        </lst>
                </lst>
                <bool name="correctlySpelled">false</bool>
        </lst>
</lst>

whereas FileBasedSpellChecker returns

<lst name="spellcheck">
        <lst name="suggestions">
                <lst name="gane">
                        <int name="numFound">1</int>
                        <int name="startOffset">0</int>
                        <int name="endOffset">4</int>
                        <arr name="suggestion">
                                <str>game</str>
                        </arr>
                </lst>
        </lst>
</lst>

The differences are the usage of <lst> respectively <arr> for markup of the suggestions, missing frequences and missing "correctlySpelled" in FileBasedSpellChecker. Is that a bug or a feature? Or are there simply no universal rules for the format of the ouput? The differences make parsing more difficult if you use IndexBasedSpellChecker and FileBasedSpellChecker.

Thanks,
Marcus

Reply via email to