This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<requestHandler name="/select" class="solr.SearchHandler"> | |
<lst name="defaults"> | |
<int name="rows">10</int> | |
<str name="df">name</str> | |
</lst> | |
<arr name="last-components"> | |
<str>spellcheck</str> | |
</arr> | |
</requestHandler> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://localhost:8983/solr/collection1/select?q=name:(ipod%20AND%20aple)&spellcheck=true&fl=name&spellcheck.collate=true&spellcheck.collateExtendedResults=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<response> | |
<lst name="responseHeader"> | |
<int name="status">0</int> | |
<int name="QTime">18</int> | |
<str name="q">name:(ipod AND aple)</str> | |
</lst> | |
<result name="response" numFound="0" start="0"/> | |
<lst name="spellcheck"> | |
<lst name="suggestions"> | |
<lst name="aple"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.List; | |
import org.apache.lucene.search.spell.JaroWinklerDistance; | |
import org.apache.lucene.search.spell.LevensteinDistance; | |
import org.apache.lucene.search.spell.NGramDistance; | |
import org.apache.lucene.search.spell.StringDistance; | |
public class TestLuceneDistanceImplementations | |
{ | |
public static void main(String[] args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class org.apache.lucene.search.spell.LevensteinDistance | |
misspelled=notebuk word=notebook distance=0.75 | |
misspelled=notebuk word=notebooks distance=0.6666666 | |
misspelled=notebuk word=netbook distance=0.4285714 | |
class org.apache.lucene.search.spell.JaroWinklerDistance | |
misspelled=notebuk word=notebook distance=0.9345238 | |
misspelled=notebuk word=notebooks distance=0.92063487 | |
misspelled=notebuk word=netbook distance=0.76857144 |