# Filter split issue

**URL:** <https://discuss.elastic.co/t/filter-split-issue/54152>\
**Category:** Elasticsearch\
**Created:** [June 28, 2016, 10:53am UTC](https://discuss.elastic.co/t/filter-split-issue/54152 "2016-06-28T10:53:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanjeevrathaur](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@sanjeevrathaur](https://discuss.elastic.co/u/sanjeevrathaur)\
**Post date:** [June 28, 2016, 10:53am UTC](https://discuss.elastic.co/t/filter-split-issue/54152/1 "2016-06-28T10:53:13Z")

</div>

I am using elasticsearch 1.4 . I am facing problem in filters in elasticssearch as :

If I write "20 Inch", I will create filter two filter with same product counter like 🙂

20 (7)  
Inch(7)  
So basically it will spit on space. How do i solve it. Here is my code snippet.

```
 private String getProductMappings() {
	XContentBuilder builder = null;

	try {
	    builder = XContentFactory.jsonBuilder().startObject().startObject("product")
		    .startObject("properties");
	    			builder.startObject("title").field("type", "multi_field").field("include_in_root", true)
	    					.startObject("fields")
	    						.startObject("title").field("type", "string").field("analyzer", "title_full_ana").endObject()
	    						.startObject("title_partial").field("type", "string").field("search_analyzer", "title_full_ana").field("index_analyzer", "title_partial_ana").endObject()
	    					.endObject()
	    			.endObject()
	    			.startObject("vendor").field("type", "nested").field("include_in_root", true)
	    				.startObject("properties").startObject("address").field("type", "nested").field("include_in_root", true)
	    									.startObject("properties")
	    										.startObject("geoLocation").field("type", "geo_point").field("include_in_root", true).endObject()
	    									.endObject()
	    							 .endObject()
	    				.endObject()
	    			.endObject()
	    			.startObject("menuSection").field("type", "nested").field("include_in_root", true).field("store", "yes")
	    				.startObject("sectionName").field("type","string").field("tokenizer","keyword").field("index","not_analyzed").field("store","yes").endObject()
	    				.endObject()
	    			.startObject("customProperties").field("type", "nested").field("include_in_root", true).field("store", "yes").endObject()
	    			.startObject("inventoryItems").field("type", "nested").field("include_in_root", true).field("store", "yes")
	    				.startObject("properties")
	    					.startObject("sellingPrice").field("type","double").field("store","yes").endObject()
	    					.startObject("size").field("type","string").field("store","yes").field("tokenizer","keyword").field("index","not_analyzed").endObject()
	    				.endObject()
	    			.endObject()
	    			.startObject("parentCategories").field("type", "nested").field("include_in_root", true).field("store", "yes")
	    				.startObject("properties")
	    					.startObject("sectionName").field("type","string").field("include_in_root", true).field("index_analyzer","whitespace_analyzer").field("search_analyzer","whitespace_analyzer").endObject()
	    				/*.startObject("sectionName").field("tokenizer","lowercase").field("type","string").field("index","not_analyzed").field("store","yes").endObject()*/
	    				.endObject()
	    			.endObject()
	    			.startObject("path").field("type","string").field("index_analyzer","hierarchy_analyzer").field("include_in_root", true).field("search_analyzer","standard").field("store","yes").endObject()
	    		.endObject()
	    	.endObject().endObject();
	    return builder.string();
	} catch (IOException e) {
	 e.printStackTrace();
	}

	return null;

    }
```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 28, 2016, 11:11am UTC](https://discuss.elastic.co/t/filter-split-issue/54152/2 "2016-06-28T11:11:09Z")

</div>

May be if you give a full REST example we could understand better what the problem is?

Read this for an example: [About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21)

---

<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 5, 2017, 10:39pm UTC](https://discuss.elastic.co/t/filter-split-issue/54152/3 "2017-07-05T22:39:56Z")

</div>


