Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

There is a smal problem with solr. When I try to search text containing the word 'this' by issuing 'this' in the search console, solr doesn't find anything. However there are no problems with other words. Is it sort of reserved word or something like that?

share|improve this question
add comment

2 Answers

Yes, 'this' is included in the list of default stop words. Please see the section titled solr.StopFilterFactory in the docs. Please also see the solr.KeepWordFilterFactory section.

share|improve this answer
    
jscott: thank you! now I know that it is not a bug :) so, I found the file solr/conf/stopwords.txt with the list of these stop words. Also I found the following lines in schema.xml <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" /> So I guess Solr reads the list of these words from stopwords.txt. But when I delete the word 'this' from stopwords.txt and then restart solr nothing actually happens - I'm still not able to find anything by issuing 'this' in search console. And by the way, what is the point in using stop words? –  s.arlashin May 25 '10 at 19:23
add comment

The point of stopwords are that they are very common words that aren't very useful to search for (nearly every document will contain 'the').

The reason you still can't find 'this' is probably because you were using the StopFilter when indexing the stop words weren't indexed.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.