# Definition of analyzers with a language?

**URL:** <https://discuss.elastic.co/t/definition-of-analyzers-with-a-language/4323>\
**Category:** Elasticsearch\
**Created:** [May 2, 2011, 8:30am UTC](https://discuss.elastic.co/t/definition-of-analyzers-with-a-language/4323 "2011-05-02T08:30:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jasper\_van\_Wanrooy\_C](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasper_van_wanrooy_c/32/2494_2.png) [@Jasper\_van\_Wanrooy\_C](https://discuss.elastic.co/u/Jasper_van_Wanrooy_C)\
**Post date:** [May 2, 2011, 8:30am UTC](https://discuss.elastic.co/t/definition-of-analyzers-with-a-language/4323/1 "2011-05-02T08:30:09Z")

</div>

Hi,

I'm indexing documents in four languages. Each document has a language flag in it. I'm figuring out the best way to construct my analyzer config and keep it maintainable. Right now I have a separate analyzer for each language. However, for some fields I need some additional filters to strip out HTML. How can I best achieve that, without creating 4 new analyzers for each language? Can you add an extra filter on a field on a document (on indexing)?

The analyzer config I use right now is displayed below.

Thanks,  
Jasper

index:  
analysis:  
analyzer:  
english\_analyzer:  
type: snowball  
language: English  
tokenizer: default\_tokenizer

```
		german_analyzer:
			type: snowball
			language: German2
			tokenizer: default_tokenizer
		
		dutch_analyzer:
			type: snowball
			language: Dutch
			tokenizer: default_tokenizer
		
		french_analyzer:
			type: snowball
			language: French
			tokenizer: default_tokenizer
		
		# Analyzer which is used when indexing the category_path
		path_index_analyzer:
			type: custom
			tokenizer: path_tokenizer
		
		# Analyzer which is used when searched on the category_path
		path_search_analyzer:
			type: keyword
		
	tokenizer:
		default_tokenizer:
			type: standard
		
		# Used for the category path to split each level into seperate tokens.
		path_tokenizer:
			type: path_hierarchy
			delimiter: /
```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:07am UTC](https://discuss.elastic.co/t/definition-of-analyzers-with-a-language/4323/2 "2017-07-06T04:07:11Z")

</div>


