# Configuring filters for analysis and search

**URL:** <https://discuss.elastic.co/t/configuring-filters-for-analysis-and-search/3807>\
**Category:** Elasticsearch\
**Created:** [January 19, 2011, 12:14pm UTC](https://discuss.elastic.co/t/configuring-filters-for-analysis-and-search/3807 "2011-01-19T12:14:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mauricio\_Linhares](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mauricio_linhares/32/880_2.png) [@Mauricio\_Linhares](https://discuss.elastic.co/u/Mauricio_Linhares)\
**Post date:** [January 19, 2011, 12:14pm UTC](https://discuss.elastic.co/t/configuring-filters-for-analysis-and-search/3807/1 "2011-01-19T12:14:06Z")

</div>

Hello guys,

I've just jumped the wagon and I'm a bit lost on how to configure the  
fields to my liking. Given that I have a product document that would  
look like this:

{  
name: "some name here",  
description : "big description here"  
category\_id : 1,  
price : 20.00  
}

I'd like to analyse "name" and "description" with the common tokenizer  
then apply the lowercase, stop words, ascii folding for accents and  
edge ngram filters. When searching I'd like to apply the same filters,  
excluding only the edge ngram. I can push the document o ES, but I  
can't figure out a way to configure this index to behave as I have  
just explained. My real goal is to write a new version of this  
tutorial ( [http://codeshooter.wordpress.com/2011/01/13/full-text-search-in-in-rails-with-sunspot-and-solr/](http://codeshooter.wordpress.com/2011/01/13/full-text-search-in-in-rails-with-sunspot-and-solr/)  
) using ES.

Ideas?

- 

Maurício Linhares

> **[Maurício Linhares on about.me](https://about.me/mauricio.linhares)**
>
> I live in João Pessoa, Paraíba, Brazil.

---

<div class="post-metadata">

**Author:** ![Karussell1](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@Karussell1](https://discuss.elastic.co/u/Karussell1)\
**Post date:** [January 19, 2011, 2:56pm UTC](https://discuss.elastic.co/t/configuring-filters-for-analysis-and-search/3807/2 "2011-01-19T14:56:39Z")

</div>

Do you mean the filter chain? something like this?

{  
"index" : {  
"analysis" : {  
"analyzer" : {  
"myanalyzer" : {  
"tokenizer" : "standard",  
"filter" : ["standard", "lowercase", "stop"]  
}  
}  
}  
}  
}

you'll need to put it into the elasticsearch.json under esHOME/config

which can then be referenced either in mapping definitions

and take a look here:

[http://www.elasticsearch.com/docs/elasticsearch/index\_modules/analysis/](http://www.elasticsearch.com/docs/elasticsearch/index_modules/analysis/)

On 19 Jan., 13:14, Maurício Linhares [mauricio.linha...@gmail.com](mailto:mauricio.linha...@gmail.com)  
wrote:

> Hello guys,
> 
> I've just jumped the wagon and I'm a bit lost on how to configure the  
> fields to my liking. Given that I have a product document that would  
> look like this:
> 
> {  
> name: "some name here",  
> description : "big description here"  
> category\_id : 1,  
> price : 20.00
> 
> }
> 
> I'd like to analyse "name" and "description" with the common tokenizer  
> then apply the lowercase, stop words, ascii folding for accents and  
> edge ngram filters. When searching I'd like to apply the same filters,  
> excluding only the edge ngram. I can push the document o ES, but I  
> can't figure out a way to configure this index to behave as I have  
> just explained. My real goal is to write a new version of this  
> tutorial ([Full text search in in Rails with Sunspot and Solr | Codeshooter's Weblog](http://codeshooter.wordpress.com/2011/01/13/full-text-search-in-in-ra)...  
> ) using ES.
> 
> Ideas?
> 
> - 
> 
> Maurício Linhareshttp://about.me/mauricio.linhares

---

<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:13am UTC](https://discuss.elastic.co/t/configuring-filters-for-analysis-and-search/3807/3 "2017-07-06T04:13:30Z")

</div>


