karmi/tire — Issue #260: Setting up analyzer with no stopword detection
Author: joshcutler
Created: 2012-03-04 20:36:31+00:00
State: open

This isn't a problem with tire, so if there is a better place for me to ask please let me know and close this issue out.

I had an existing index on text that had the standard analyzer being used. I recently realized that the stopword list includes "will" which is bad because much of the text that is being searched is peoples' names and will is fairly common.

I am trying to create a custom analyzer that doesn't use the stopword filter like so:

````ruby
include Tire::Model::Search
include Tire::Model::Callbacks
tire.settings :analysis => {
:analyzer => {
:no_stopwords => {
"type" => "custom",
"tokenizer" => "standard",
"filter" => ["standard", "lowercase"]
}
}
} do
tire.mapping do
indexes :keywords, :analyzer => "no_stopwords"
end
end
````

And it does not seem to be working. My questions are:

A) Is this properly specified?
B) What do I need to do to get this reflected in my index. Do I need to destroy and recreate my index?

Thanks,
-=Josh