Multi words suggestions broken by white space in query suggestion

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 -

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

The output is -

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

Hi @aditi_jain :wave:

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?

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