# Multi words suggestions broken by white space in query suggestion

**URL:** <https://discuss.elastic.co/t/multi-words-suggestions-broken-by-white-space-in-query-suggestion/246067>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [August 24, 2020, 7:41am UTC](https://discuss.elastic.co/t/multi-words-suggestions-broken-by-white-space-in-query-suggestion/246067 "2020-08-24T07:41:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aditi\_jain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aditi_jain/32/74383_2.png) [@aditi\_jain](https://discuss.elastic.co/u/aditi_jain)\
**Post date:** [August 24, 2020, 7:41am UTC](https://discuss.elastic.co/t/multi-words-suggestions-broken-by-white-space-in-query-suggestion/246067/1 "2020-08-24T07:41:12Z")

</div>

I am using app search for query suggestions. I want to search the query term from 4 fields as shown in the query below. But in the output the suggested term gets divided into three different suggestions based on the white space.  
Eg - productcategory field has only one term as "bread and bakery" in the documents but in the output it gives three results as given in the output below.  
How can I get only one complete suggestion, i.e. - "bread and bakery"?  
**My query is -**

```auto
    {
    	"query": "Bre",
    	"types": {
    		"documents": {
    			"fields": [
    				"productcategory",
    				"productsubcategory",
    				"producttype",
    				"productnamesearch"
				
			]
		}
	},
    	"size": 20
    }

```

**The output is -**

```auto
    "results": {
            "documents": [
                {
                    "suggestion": "bread"
                },
                {
                    "suggestion": "bread and"
                },
                {
                    "suggestion": "bread and bakery"
                }
            ]
        }

```

---

<div class="post-metadata">

**Author:** ![orhantoy](https://avatars.discourse-cdn.com/v4/letter/o/c5a1d2/32.png) [@orhantoy](https://discuss.elastic.co/u/orhantoy)\
**Post date:** [August 27, 2020, 1:31pm UTC](https://discuss.elastic.co/t/multi-words-suggestions-broken-by-white-space-in-query-suggestion/246067/2 "2020-08-27T13:31:17Z")

</div>

Hi @aditi_jain 👋

This is how the feature was designed: to give suggestions to queries, sort of like autocomplete.  
It sounds like you want to do a regular search instead; did you try that?

---

<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:** [September 24, 2020, 1:32pm UTC](https://discuss.elastic.co/t/multi-words-suggestions-broken-by-white-space-in-query-suggestion/246067/3 "2020-09-24T13:32:07Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
