Skip to content

Instantly share code, notes, and snippets.

@bogn
Created April 19, 2013 08:41
Show Gist options
  • Save bogn/5418992 to your computer and use it in GitHub Desktop.
Save bogn/5418992 to your computer and use it in GitHub Desktop.
# multilingual analysis for title search taken from :
# http://jprante.github.com/lessons/2012/05/16/multilingual-analysis-for-title-search.html
# or alternatively here (where the used plugin comes from, is less descriptive but has more technical details)
# https://github.com/yakaz/elasticsearch-analysis-combo
analysis:
filter:
germansnow:
type: snowball
language: German2
ngram_filter:
type: nGram
max_gram: 10
min_gram: 3
url_stop:
type: "stop"
stopwords: ["http", "https"]
analyzer:
stripped_standard:
type: custom
tokenizer: standard
filter:
- standard
- lowercase
- stop
char_filter:
- html_strip
url:
type: custom
tokenizer: lowercase
filter: ["stop", "url_stop"]
ngram_analyzer:
type: custom
tokenizer: standard
filter:
- ngram_filter
char_filter:
- html_strip
german_text:
type: custom
tokenizer: standard
filter:
- germansnow
char_filter:
- html_strip
default_index:
type: combo
sub_analyzers:
- stripped_standard
- german_text
- ngram_analyzer
default_search:
type: combo
sub_analyzers:
- stripped_standard
- german_text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment