lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Müller <mm4...@googlemail.com>
Subject Re: Stop Words in SpellCheckComponent
Date Fri, 01 Jun 2012 05:44:11 GMT
> <str name="field">spellcheck_de</str>
>
> That should reference a field, not a field type.

Thanks for your help. But I did that, too.

Here I'll show that even the solr example webapp makes suggestions for
stopwords: I've ...

1. added "the" to the stopwords.txt
2. added "thex" to an example document (field name)
3. startet solr
4. indexed the example files (sh post.sh *.xml)
5. searched for "the solr"
http://myhost:8983/solr/select?q=the+solr&spellcheck=true&wt=json
6. got the desired result, but also the wrong suggestion "thex"

{ "response" : { "docs" : [ {...  "name" : "Solr, thex Enterprise
Search Server", ..  } ],
      "numFound" : 1,
...  },
...
  "spellcheck" : { "suggestions" : [ "the",
          {...            "suggestion" : [ "thex" ]  }
        ] }
}


Here's the complete diff between the original download and my 3 modifications:

diff -r apache-solr-3.6.0/example/exampledocs/solr.xml
apache-solr-3.6.0x/example/exampledocs/solr.xml
21c21
<   <field name="name">Solr, the Enterprise Search Server</field>
---
>   <field name="name">Solr, thex Enterprise Search Server</field>
diff -r apache-solr-3.6.0/example/solr/conf/solrconfig.xml
apache-solr-3.6.0x/example/solr/conf/solrconfig.xml
781a782,785
>      <arr name="last-components">
>        <str>spellcheck</str>
>      </arr>
>
1122a1127
>       <str name="buildOnCommit">true</str>
diff -r apache-solr-3.6.0/example/solr/conf/stopwords.txt
apache-solr-3.6.0x/example/solr/conf/stopwords.txt
14a15,16
>
> the

Mime
View raw message