Created
June 8, 2012 20:14
-
-
Save letsbreelhere/2897931 to your computer and use it in GitHub Desktop.
tire ngram analyzer
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
settings analysis: { | |
filter: { | |
ngram_filter: { | |
type: "nGram", | |
min_gram: 3, | |
max_gram: 8 | |
} | |
}, | |
analyzer: { | |
ngram_analyzer: { | |
tokenizer: "lowercase", | |
filter: ["ngram_filter"], | |
type: "custom" | |
} | |
} | |
} do | |
mapping do | |
[:name, :email, :company].each do |attribute| | |
indexes attribute, type: 'string', analyzer: 'ngram_analyzer' | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment