123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821 |
- [[analysis-lang-analyzer]]
- === Language Analyzers
- A set of analyzers aimed at analyzing specific language text. The
- following types are supported:
- <<arabic-analyzer,`arabic`>>,
- <<armenian-analyzer,`armenian`>>,
- <<basque-analyzer,`basque`>>,
- <<bengali-analyzer,`bengali`>>,
- <<brazilian-analyzer,`brazilian`>>,
- <<bulgarian-analyzer,`bulgarian`>>,
- <<catalan-analyzer,`catalan`>>,
- <<cjk-analyzer,`cjk`>>,
- <<czech-analyzer,`czech`>>,
- <<danish-analyzer,`danish`>>,
- <<dutch-analyzer,`dutch`>>,
- <<english-analyzer,`english`>>,
- <<estonian-analyzer,`estonian`>>,
- <<finnish-analyzer,`finnish`>>,
- <<french-analyzer,`french`>>,
- <<galician-analyzer,`galician`>>,
- <<german-analyzer,`german`>>,
- <<greek-analyzer,`greek`>>,
- <<hindi-analyzer,`hindi`>>,
- <<hungarian-analyzer,`hungarian`>>,
- <<indonesian-analyzer,`indonesian`>>,
- <<irish-analyzer,`irish`>>,
- <<italian-analyzer,`italian`>>,
- <<latvian-analyzer,`latvian`>>,
- <<lithuanian-analyzer,`lithuanian`>>,
- <<norwegian-analyzer,`norwegian`>>,
- <<persian-analyzer,`persian`>>,
- <<portuguese-analyzer,`portuguese`>>,
- <<romanian-analyzer,`romanian`>>,
- <<russian-analyzer,`russian`>>,
- <<sorani-analyzer,`sorani`>>,
- <<spanish-analyzer,`spanish`>>,
- <<swedish-analyzer,`swedish`>>,
- <<turkish-analyzer,`turkish`>>,
- <<thai-analyzer,`thai`>>.
- ==== Configuring language analyzers
- ===== Stopwords
- All analyzers support setting custom `stopwords` either internally in
- the config, or by using an external stopwords file by setting
- `stopwords_path`. Check <<analysis-stop-analyzer,Stop Analyzer>> for
- more details.
- ===== Excluding words from stemming
- The `stem_exclusion` parameter allows you to specify an array
- of lowercase words that should not be stemmed. Internally, this
- functionality is implemented by adding the
- <<analysis-keyword-marker-tokenfilter,`keyword_marker` token filter>>
- with the `keywords` set to the value of the `stem_exclusion` parameter.
- The following analyzers support setting custom `stem_exclusion` list:
- `arabic`, `armenian`, `basque`, `bengali`, `bulgarian`, `catalan`, `czech`,
- `dutch`, `english`, `finnish`, `french`, `galician`,
- `german`, `hindi`, `hungarian`, `indonesian`, `irish`, `italian`, `latvian`,
- `lithuanian`, `norwegian`, `portuguese`, `romanian`, `russian`, `sorani`,
- `spanish`, `swedish`, `turkish`.
- ==== Reimplementing language analyzers
- The built-in language analyzers can be reimplemented as `custom` analyzers
- (as described below) in order to customize their behaviour.
- NOTE: If you do not intend to exclude words from being stemmed (the
- equivalent of the `stem_exclusion` parameter above), then you should remove
- the `keyword_marker` token filter from the custom analyzer configuration.
- [[arabic-analyzer]]
- ===== `arabic` analyzer
- The `arabic` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /arabic_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "arabic_stop": {
- "type": "stop",
- "stopwords": "_arabic_" <1>
- },
- "arabic_keywords": {
- "type": "keyword_marker",
- "keywords": ["مثال"] <2>
- },
- "arabic_stemmer": {
- "type": "stemmer",
- "language": "arabic"
- }
- },
- "analyzer": {
- "rebuilt_arabic": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "decimal_digit",
- "arabic_stop",
- "arabic_normalization",
- "arabic_keywords",
- "arabic_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"arabic_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: arabic_example, first: arabic, second: rebuilt_arabic}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[armenian-analyzer]]
- ===== `armenian` analyzer
- The `armenian` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /armenian_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "armenian_stop": {
- "type": "stop",
- "stopwords": "_armenian_" <1>
- },
- "armenian_keywords": {
- "type": "keyword_marker",
- "keywords": ["օրինակ"] <2>
- },
- "armenian_stemmer": {
- "type": "stemmer",
- "language": "armenian"
- }
- },
- "analyzer": {
- "rebuilt_armenian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "armenian_stop",
- "armenian_keywords",
- "armenian_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"armenian_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: armenian_example, first: armenian, second: rebuilt_armenian}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[basque-analyzer]]
- ===== `basque` analyzer
- The `basque` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /basque_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "basque_stop": {
- "type": "stop",
- "stopwords": "_basque_" <1>
- },
- "basque_keywords": {
- "type": "keyword_marker",
- "keywords": ["Adibidez"] <2>
- },
- "basque_stemmer": {
- "type": "stemmer",
- "language": "basque"
- }
- },
- "analyzer": {
- "rebuilt_basque": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "basque_stop",
- "basque_keywords",
- "basque_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"basque_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: basque_example, first: basque, second: rebuilt_basque}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[bengali-analyzer]]
- ===== `bengali` analyzer
- The `bengali` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /bengali_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "bengali_stop": {
- "type": "stop",
- "stopwords": "_bengali_" <1>
- },
- "bengali_keywords": {
- "type": "keyword_marker",
- "keywords": ["উদাহরণ"] <2>
- },
- "bengali_stemmer": {
- "type": "stemmer",
- "language": "bengali"
- }
- },
- "analyzer": {
- "rebuilt_bengali": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "decimal_digit",
- "bengali_keywords",
- "indic_normalization",
- "bengali_normalization",
- "bengali_stop",
- "bengali_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"bengali_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: bengali_example, first: bengali, second: rebuilt_bengali}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[brazilian-analyzer]]
- ===== `brazilian` analyzer
- The `brazilian` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /brazilian_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "brazilian_stop": {
- "type": "stop",
- "stopwords": "_brazilian_" <1>
- },
- "brazilian_keywords": {
- "type": "keyword_marker",
- "keywords": ["exemplo"] <2>
- },
- "brazilian_stemmer": {
- "type": "stemmer",
- "language": "brazilian"
- }
- },
- "analyzer": {
- "rebuilt_brazilian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "brazilian_stop",
- "brazilian_keywords",
- "brazilian_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"brazilian_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: brazilian_example, first: brazilian, second: rebuilt_brazilian}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[bulgarian-analyzer]]
- ===== `bulgarian` analyzer
- The `bulgarian` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /bulgarian_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "bulgarian_stop": {
- "type": "stop",
- "stopwords": "_bulgarian_" <1>
- },
- "bulgarian_keywords": {
- "type": "keyword_marker",
- "keywords": ["пример"] <2>
- },
- "bulgarian_stemmer": {
- "type": "stemmer",
- "language": "bulgarian"
- }
- },
- "analyzer": {
- "rebuilt_bulgarian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "bulgarian_stop",
- "bulgarian_keywords",
- "bulgarian_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"bulgarian_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: bulgarian_example, first: bulgarian, second: rebuilt_bulgarian}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[catalan-analyzer]]
- ===== `catalan` analyzer
- The `catalan` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /catalan_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "catalan_elision": {
- "type": "elision",
- "articles": [ "d", "l", "m", "n", "s", "t"],
- "articles_case": true
- },
- "catalan_stop": {
- "type": "stop",
- "stopwords": "_catalan_" <1>
- },
- "catalan_keywords": {
- "type": "keyword_marker",
- "keywords": ["example"] <2>
- },
- "catalan_stemmer": {
- "type": "stemmer",
- "language": "catalan"
- }
- },
- "analyzer": {
- "rebuilt_catalan": {
- "tokenizer": "standard",
- "filter": [
- "catalan_elision",
- "lowercase",
- "catalan_stop",
- "catalan_keywords",
- "catalan_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"catalan_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: catalan_example, first: catalan, second: rebuilt_catalan}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[cjk-analyzer]]
- ===== `cjk` analyzer
- NOTE: You may find that `icu_analyzer` in the ICU analysis plugin works better
- for CJK text than the `cjk` analyzer. Experiment with your text and queries.
- The `cjk` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /cjk_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "english_stop": {
- "type": "stop",
- "stopwords": [ <1>
- "a", "and", "are", "as", "at", "be", "but", "by", "for",
- "if", "in", "into", "is", "it", "no", "not", "of", "on",
- "or", "s", "such", "t", "that", "the", "their", "then",
- "there", "these", "they", "this", "to", "was", "will",
- "with", "www"
- ]
- }
- },
- "analyzer": {
- "rebuilt_cjk": {
- "tokenizer": "standard",
- "filter": [
- "cjk_width",
- "lowercase",
- "cjk_bigram",
- "english_stop"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"cjk_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: cjk_example, first: cjk, second: rebuilt_cjk}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters. The default stop words are
- *almost* the same as the `_english_` set, but not exactly
- the same.
- [[czech-analyzer]]
- ===== `czech` analyzer
- The `czech` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /czech_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "czech_stop": {
- "type": "stop",
- "stopwords": "_czech_" <1>
- },
- "czech_keywords": {
- "type": "keyword_marker",
- "keywords": ["příklad"] <2>
- },
- "czech_stemmer": {
- "type": "stemmer",
- "language": "czech"
- }
- },
- "analyzer": {
- "rebuilt_czech": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "czech_stop",
- "czech_keywords",
- "czech_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"czech_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: czech_example, first: czech, second: rebuilt_czech}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[danish-analyzer]]
- ===== `danish` analyzer
- The `danish` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /danish_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "danish_stop": {
- "type": "stop",
- "stopwords": "_danish_" <1>
- },
- "danish_keywords": {
- "type": "keyword_marker",
- "keywords": ["eksempel"] <2>
- },
- "danish_stemmer": {
- "type": "stemmer",
- "language": "danish"
- }
- },
- "analyzer": {
- "rebuilt_danish": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "danish_stop",
- "danish_keywords",
- "danish_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"danish_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: danish_example, first: danish, second: rebuilt_danish}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[dutch-analyzer]]
- ===== `dutch` analyzer
- The `dutch` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /dutch_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "dutch_stop": {
- "type": "stop",
- "stopwords": "_dutch_" <1>
- },
- "dutch_keywords": {
- "type": "keyword_marker",
- "keywords": ["voorbeeld"] <2>
- },
- "dutch_stemmer": {
- "type": "stemmer",
- "language": "dutch"
- },
- "dutch_override": {
- "type": "stemmer_override",
- "rules": [
- "fiets=>fiets",
- "bromfiets=>bromfiets",
- "ei=>eier",
- "kind=>kinder"
- ]
- }
- },
- "analyzer": {
- "rebuilt_dutch": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "dutch_stop",
- "dutch_keywords",
- "dutch_override",
- "dutch_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"dutch_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: dutch_example, first: dutch, second: rebuilt_dutch}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[english-analyzer]]
- ===== `english` analyzer
- The `english` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /english_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "english_stop": {
- "type": "stop",
- "stopwords": "_english_" <1>
- },
- "english_keywords": {
- "type": "keyword_marker",
- "keywords": ["example"] <2>
- },
- "english_stemmer": {
- "type": "stemmer",
- "language": "english"
- },
- "english_possessive_stemmer": {
- "type": "stemmer",
- "language": "possessive_english"
- }
- },
- "analyzer": {
- "rebuilt_english": {
- "tokenizer": "standard",
- "filter": [
- "english_possessive_stemmer",
- "lowercase",
- "english_stop",
- "english_keywords",
- "english_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"english_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: english_example, first: english, second: rebuilt_english}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[estonian-analyzer]]
- ===== `estonian` analyzer
- The `estonian` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /estonian_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "estonian_stop": {
- "type": "stop",
- "stopwords": "_estonian_" <1>
- },
- "estonian_keywords": {
- "type": "keyword_marker",
- "keywords": ["näide"] <2>
- },
- "estonian_stemmer": {
- "type": "stemmer",
- "language": "estonian"
- }
- },
- "analyzer": {
- "rebuilt_estonian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "estonian_stop",
- "estonian_keywords",
- "estonian_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"estonian_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: estonian_example, first: estonian, second: rebuilt_estonian}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[finnish-analyzer]]
- ===== `finnish` analyzer
- The `finnish` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /finnish_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "finnish_stop": {
- "type": "stop",
- "stopwords": "_finnish_" <1>
- },
- "finnish_keywords": {
- "type": "keyword_marker",
- "keywords": ["esimerkki"] <2>
- },
- "finnish_stemmer": {
- "type": "stemmer",
- "language": "finnish"
- }
- },
- "analyzer": {
- "rebuilt_finnish": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "finnish_stop",
- "finnish_keywords",
- "finnish_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"finnish_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: finnish_example, first: finnish, second: rebuilt_finnish}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[french-analyzer]]
- ===== `french` analyzer
- The `french` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /french_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "french_elision": {
- "type": "elision",
- "articles_case": true,
- "articles": [
- "l", "m", "t", "qu", "n", "s",
- "j", "d", "c", "jusqu", "quoiqu",
- "lorsqu", "puisqu"
- ]
- },
- "french_stop": {
- "type": "stop",
- "stopwords": "_french_" <1>
- },
- "french_keywords": {
- "type": "keyword_marker",
- "keywords": ["Example"] <2>
- },
- "french_stemmer": {
- "type": "stemmer",
- "language": "light_french"
- }
- },
- "analyzer": {
- "rebuilt_french": {
- "tokenizer": "standard",
- "filter": [
- "french_elision",
- "lowercase",
- "french_stop",
- "french_keywords",
- "french_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"french_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: french_example, first: french, second: rebuilt_french}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[galician-analyzer]]
- ===== `galician` analyzer
- The `galician` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /galician_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "galician_stop": {
- "type": "stop",
- "stopwords": "_galician_" <1>
- },
- "galician_keywords": {
- "type": "keyword_marker",
- "keywords": ["exemplo"] <2>
- },
- "galician_stemmer": {
- "type": "stemmer",
- "language": "galician"
- }
- },
- "analyzer": {
- "rebuilt_galician": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "galician_stop",
- "galician_keywords",
- "galician_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"galician_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: galician_example, first: galician, second: rebuilt_galician}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[german-analyzer]]
- ===== `german` analyzer
- The `german` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /german_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "german_stop": {
- "type": "stop",
- "stopwords": "_german_" <1>
- },
- "german_keywords": {
- "type": "keyword_marker",
- "keywords": ["Beispiel"] <2>
- },
- "german_stemmer": {
- "type": "stemmer",
- "language": "light_german"
- }
- },
- "analyzer": {
- "rebuilt_german": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "german_stop",
- "german_keywords",
- "german_normalization",
- "german_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"german_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: german_example, first: german, second: rebuilt_german}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[greek-analyzer]]
- ===== `greek` analyzer
- The `greek` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /greek_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "greek_stop": {
- "type": "stop",
- "stopwords": "_greek_" <1>
- },
- "greek_lowercase": {
- "type": "lowercase",
- "language": "greek"
- },
- "greek_keywords": {
- "type": "keyword_marker",
- "keywords": ["παράδειγμα"] <2>
- },
- "greek_stemmer": {
- "type": "stemmer",
- "language": "greek"
- }
- },
- "analyzer": {
- "rebuilt_greek": {
- "tokenizer": "standard",
- "filter": [
- "greek_lowercase",
- "greek_stop",
- "greek_keywords",
- "greek_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"greek_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: greek_example, first: greek, second: rebuilt_greek}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[hindi-analyzer]]
- ===== `hindi` analyzer
- The `hindi` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /hindi_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "hindi_stop": {
- "type": "stop",
- "stopwords": "_hindi_" <1>
- },
- "hindi_keywords": {
- "type": "keyword_marker",
- "keywords": ["उदाहरण"] <2>
- },
- "hindi_stemmer": {
- "type": "stemmer",
- "language": "hindi"
- }
- },
- "analyzer": {
- "rebuilt_hindi": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "decimal_digit",
- "hindi_keywords",
- "indic_normalization",
- "hindi_normalization",
- "hindi_stop",
- "hindi_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"hindi_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: hindi_example, first: hindi, second: rebuilt_hindi}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[hungarian-analyzer]]
- ===== `hungarian` analyzer
- The `hungarian` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /hungarian_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "hungarian_stop": {
- "type": "stop",
- "stopwords": "_hungarian_" <1>
- },
- "hungarian_keywords": {
- "type": "keyword_marker",
- "keywords": ["példa"] <2>
- },
- "hungarian_stemmer": {
- "type": "stemmer",
- "language": "hungarian"
- }
- },
- "analyzer": {
- "rebuilt_hungarian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "hungarian_stop",
- "hungarian_keywords",
- "hungarian_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"hungarian_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: hungarian_example, first: hungarian, second: rebuilt_hungarian}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[indonesian-analyzer]]
- ===== `indonesian` analyzer
- The `indonesian` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /indonesian_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "indonesian_stop": {
- "type": "stop",
- "stopwords": "_indonesian_" <1>
- },
- "indonesian_keywords": {
- "type": "keyword_marker",
- "keywords": ["contoh"] <2>
- },
- "indonesian_stemmer": {
- "type": "stemmer",
- "language": "indonesian"
- }
- },
- "analyzer": {
- "rebuilt_indonesian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "indonesian_stop",
- "indonesian_keywords",
- "indonesian_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"indonesian_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: indonesian_example, first: indonesian, second: rebuilt_indonesian}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[irish-analyzer]]
- ===== `irish` analyzer
- The `irish` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /irish_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "irish_hyphenation": {
- "type": "stop",
- "stopwords": [ "h", "n", "t" ],
- "ignore_case": true
- },
- "irish_elision": {
- "type": "elision",
- "articles": [ "d", "m", "b" ],
- "articles_case": true
- },
- "irish_stop": {
- "type": "stop",
- "stopwords": "_irish_" <1>
- },
- "irish_lowercase": {
- "type": "lowercase",
- "language": "irish"
- },
- "irish_keywords": {
- "type": "keyword_marker",
- "keywords": ["sampla"] <2>
- },
- "irish_stemmer": {
- "type": "stemmer",
- "language": "irish"
- }
- },
- "analyzer": {
- "rebuilt_irish": {
- "tokenizer": "standard",
- "filter": [
- "irish_hyphenation",
- "irish_elision",
- "irish_lowercase",
- "irish_stop",
- "irish_keywords",
- "irish_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"irish_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: irish_example, first: irish, second: rebuilt_irish}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[italian-analyzer]]
- ===== `italian` analyzer
- The `italian` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /italian_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "italian_elision": {
- "type": "elision",
- "articles": [
- "c", "l", "all", "dall", "dell",
- "nell", "sull", "coll", "pell",
- "gl", "agl", "dagl", "degl", "negl",
- "sugl", "un", "m", "t", "s", "v", "d"
- ],
- "articles_case": true
- },
- "italian_stop": {
- "type": "stop",
- "stopwords": "_italian_" <1>
- },
- "italian_keywords": {
- "type": "keyword_marker",
- "keywords": ["esempio"] <2>
- },
- "italian_stemmer": {
- "type": "stemmer",
- "language": "light_italian"
- }
- },
- "analyzer": {
- "rebuilt_italian": {
- "tokenizer": "standard",
- "filter": [
- "italian_elision",
- "lowercase",
- "italian_stop",
- "italian_keywords",
- "italian_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"italian_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: italian_example, first: italian, second: rebuilt_italian}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[latvian-analyzer]]
- ===== `latvian` analyzer
- The `latvian` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /latvian_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "latvian_stop": {
- "type": "stop",
- "stopwords": "_latvian_" <1>
- },
- "latvian_keywords": {
- "type": "keyword_marker",
- "keywords": ["piemērs"] <2>
- },
- "latvian_stemmer": {
- "type": "stemmer",
- "language": "latvian"
- }
- },
- "analyzer": {
- "rebuilt_latvian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "latvian_stop",
- "latvian_keywords",
- "latvian_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"latvian_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: latvian_example, first: latvian, second: rebuilt_latvian}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[lithuanian-analyzer]]
- ===== `lithuanian` analyzer
- The `lithuanian` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /lithuanian_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "lithuanian_stop": {
- "type": "stop",
- "stopwords": "_lithuanian_" <1>
- },
- "lithuanian_keywords": {
- "type": "keyword_marker",
- "keywords": ["pavyzdys"] <2>
- },
- "lithuanian_stemmer": {
- "type": "stemmer",
- "language": "lithuanian"
- }
- },
- "analyzer": {
- "rebuilt_lithuanian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "lithuanian_stop",
- "lithuanian_keywords",
- "lithuanian_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"lithuanian_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: lithuanian_example, first: lithuanian, second: rebuilt_lithuanian}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[norwegian-analyzer]]
- ===== `norwegian` analyzer
- The `norwegian` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /norwegian_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "norwegian_stop": {
- "type": "stop",
- "stopwords": "_norwegian_" <1>
- },
- "norwegian_keywords": {
- "type": "keyword_marker",
- "keywords": ["eksempel"] <2>
- },
- "norwegian_stemmer": {
- "type": "stemmer",
- "language": "norwegian"
- }
- },
- "analyzer": {
- "rebuilt_norwegian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "norwegian_stop",
- "norwegian_keywords",
- "norwegian_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"norwegian_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: norwegian_example, first: norwegian, second: rebuilt_norwegian}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[persian-analyzer]]
- ===== `persian` analyzer
- The `persian` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /persian_example
- {
- "settings": {
- "analysis": {
- "char_filter": {
- "zero_width_spaces": {
- "type": "mapping",
- "mappings": [ "\\u200C=>\\u0020"] <1>
- }
- },
- "filter": {
- "persian_stop": {
- "type": "stop",
- "stopwords": "_persian_" <2>
- }
- },
- "analyzer": {
- "rebuilt_persian": {
- "tokenizer": "standard",
- "char_filter": [ "zero_width_spaces" ],
- "filter": [
- "lowercase",
- "decimal_digit",
- "arabic_normalization",
- "persian_normalization",
- "persian_stop"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: persian_example, first: persian, second: rebuilt_persian}\nendyaml\n/]
- <1> Replaces zero-width non-joiners with an ASCII space.
- <2> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- [[portuguese-analyzer]]
- ===== `portuguese` analyzer
- The `portuguese` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /portuguese_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "portuguese_stop": {
- "type": "stop",
- "stopwords": "_portuguese_" <1>
- },
- "portuguese_keywords": {
- "type": "keyword_marker",
- "keywords": ["exemplo"] <2>
- },
- "portuguese_stemmer": {
- "type": "stemmer",
- "language": "light_portuguese"
- }
- },
- "analyzer": {
- "rebuilt_portuguese": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "portuguese_stop",
- "portuguese_keywords",
- "portuguese_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"portuguese_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: portuguese_example, first: portuguese, second: rebuilt_portuguese}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[romanian-analyzer]]
- ===== `romanian` analyzer
- The `romanian` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /romanian_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "romanian_stop": {
- "type": "stop",
- "stopwords": "_romanian_" <1>
- },
- "romanian_keywords": {
- "type": "keyword_marker",
- "keywords": ["exemplu"] <2>
- },
- "romanian_stemmer": {
- "type": "stemmer",
- "language": "romanian"
- }
- },
- "analyzer": {
- "rebuilt_romanian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "romanian_stop",
- "romanian_keywords",
- "romanian_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"romanian_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: romanian_example, first: romanian, second: rebuilt_romanian}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[russian-analyzer]]
- ===== `russian` analyzer
- The `russian` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /russian_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "russian_stop": {
- "type": "stop",
- "stopwords": "_russian_" <1>
- },
- "russian_keywords": {
- "type": "keyword_marker",
- "keywords": ["пример"] <2>
- },
- "russian_stemmer": {
- "type": "stemmer",
- "language": "russian"
- }
- },
- "analyzer": {
- "rebuilt_russian": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "russian_stop",
- "russian_keywords",
- "russian_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"russian_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: russian_example, first: russian, second: rebuilt_russian}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[sorani-analyzer]]
- ===== `sorani` analyzer
- The `sorani` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /sorani_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "sorani_stop": {
- "type": "stop",
- "stopwords": "_sorani_" <1>
- },
- "sorani_keywords": {
- "type": "keyword_marker",
- "keywords": ["mînak"] <2>
- },
- "sorani_stemmer": {
- "type": "stemmer",
- "language": "sorani"
- }
- },
- "analyzer": {
- "rebuilt_sorani": {
- "tokenizer": "standard",
- "filter": [
- "sorani_normalization",
- "lowercase",
- "decimal_digit",
- "sorani_stop",
- "sorani_keywords",
- "sorani_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"sorani_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: sorani_example, first: sorani, second: rebuilt_sorani}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[spanish-analyzer]]
- ===== `spanish` analyzer
- The `spanish` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /spanish_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "spanish_stop": {
- "type": "stop",
- "stopwords": "_spanish_" <1>
- },
- "spanish_keywords": {
- "type": "keyword_marker",
- "keywords": ["ejemplo"] <2>
- },
- "spanish_stemmer": {
- "type": "stemmer",
- "language": "light_spanish"
- }
- },
- "analyzer": {
- "rebuilt_spanish": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "spanish_stop",
- "spanish_keywords",
- "spanish_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"spanish_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: spanish_example, first: spanish, second: rebuilt_spanish}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[swedish-analyzer]]
- ===== `swedish` analyzer
- The `swedish` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /swedish_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "swedish_stop": {
- "type": "stop",
- "stopwords": "_swedish_" <1>
- },
- "swedish_keywords": {
- "type": "keyword_marker",
- "keywords": ["exempel"] <2>
- },
- "swedish_stemmer": {
- "type": "stemmer",
- "language": "swedish"
- }
- },
- "analyzer": {
- "rebuilt_swedish": {
- "tokenizer": "standard",
- "filter": [
- "lowercase",
- "swedish_stop",
- "swedish_keywords",
- "swedish_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"swedish_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: swedish_example, first: swedish, second: rebuilt_swedish}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[turkish-analyzer]]
- ===== `turkish` analyzer
- The `turkish` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /turkish_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "turkish_stop": {
- "type": "stop",
- "stopwords": "_turkish_" <1>
- },
- "turkish_lowercase": {
- "type": "lowercase",
- "language": "turkish"
- },
- "turkish_keywords": {
- "type": "keyword_marker",
- "keywords": ["örnek"] <2>
- },
- "turkish_stemmer": {
- "type": "stemmer",
- "language": "turkish"
- }
- },
- "analyzer": {
- "rebuilt_turkish": {
- "tokenizer": "standard",
- "filter": [
- "apostrophe",
- "turkish_lowercase",
- "turkish_stop",
- "turkish_keywords",
- "turkish_stemmer"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"turkish_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: turkish_example, first: turkish, second: rebuilt_turkish}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
- <2> This filter should be removed unless there are words which should
- be excluded from stemming.
- [[thai-analyzer]]
- ===== `thai` analyzer
- The `thai` analyzer could be reimplemented as a `custom` analyzer as follows:
- [source,console]
- ----------------------------------------------------
- PUT /thai_example
- {
- "settings": {
- "analysis": {
- "filter": {
- "thai_stop": {
- "type": "stop",
- "stopwords": "_thai_" <1>
- }
- },
- "analyzer": {
- "rebuilt_thai": {
- "tokenizer": "thai",
- "filter": [
- "lowercase",
- "decimal_digit",
- "thai_stop"
- ]
- }
- }
- }
- }
- }
- ----------------------------------------------------
- // TEST[s/"thai_keywords",//]
- // TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: thai_example, first: thai, second: rebuilt_thai}\nendyaml\n/]
- <1> The default stopwords can be overridden with the `stopwords`
- or `stopwords_path` parameters.
|