# Show suggest result on Front end without hampering speed of ES

**URL:** https://discuss.elastic.co/t/show-suggest-result-on-front-end-without-hampering-speed-of-es/118351
**Category:** Elasticsearch
**Created:** [February 4, 2018, 3:49pm UTC](https://discuss.elastic.co/t/show-suggest-result-on-front-end-without-hampering-speed-of-es/118351 "2018-02-04T15:49:27Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Arpit\_Dadheech](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@Arpit\_Dadheech](https://discuss.elastic.co/u/Arpit_Dadheech)
#### Post date: [February 4, 2018, 3:49pm UTC](https://discuss.elastic.co/t/show-suggest-result-on-front-end-without-hampering-speed-of-es/118351/1 "2018-02-04T15:49:27Z")

</div>

I am using ES with angular 2.  
I am using suggester of ES. I am getting the results as I want.  
Like I type "A"

I get result set as  
["Alexander", "Alexander Ambrose", "Crown Victoria"]  
and  
["Cleo", "Cleo Walling","Aerostar"]

I want to show suggestion on frontend in angular 2 as  
Alexander  
Alexander Ambrose  
Aerostar

How to do it without affecting the speed of ES  
Any suggestions

Thanks In advance  
@kimchy @s1monw @Allwyn @dadoonet @rmuir @colings86

---

<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: [February 4, 2018, 4:53pm UTC](https://discuss.elastic.co/t/show-suggest-result-on-front-end-without-hampering-speed-of-es/118351/2 "2018-02-04T16:53:18Z")

</div>

Please don't ping people who are not part of the conversation already like you did.

Read [this](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and specifically the "Also be patient" part.

---

<div class="post-metadata">

### Author: ![Arpit\_Dadheech](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@Arpit\_Dadheech](https://discuss.elastic.co/u/Arpit_Dadheech)
#### Post date: [February 4, 2018, 5:04pm UTC](https://discuss.elastic.co/t/show-suggest-result-on-front-end-without-hampering-speed-of-es/118351/3 "2018-02-04T17:04:14Z")

</div>

So whome should I ping If I am stuck.

---

<div class="post-metadata">

### Author: ![Arpit\_Dadheech](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@Arpit\_Dadheech](https://discuss.elastic.co/u/Arpit_Dadheech)
#### Post date: [February 4, 2018, 5:06pm UTC](https://discuss.elastic.co/t/show-suggest-result-on-front-end-without-hampering-speed-of-es/118351/4 "2018-02-04T17:06:13Z")

</div>

Elasticsearch version 6.1  
Plugins installed: None  
JVM version 1.8  
OS version windows

I have used "Suggester" suggester.  
I have dumped data as:-

```
put datas/data/1
   {
         "first_name": "Demo",
          "last_name": "Demo",
        "nike_name": "Aero",
         "suggest" : ["Demo", "Demo", "Aero"]
     }

put datas/data/2
 {
         "first_name": "Alex",
          "last_name": "Alex Ambrose",
          "nike_name": "Demo",
          "suggest" : ["Alex", "Alex Ambrose", "Demo"]
 }

```

It give me output

```
"suggest": {
       "suggest": [
                   {
                       "text": "A",
                       "offset": 0,
                       "length": 1,
                       "options": [
                                          {
                                            "text": "Aero",
                                           "_index": "er_data",
                                            "_type": "data",
                                           "_id": "1",
                                           "_score": 1,
                                           "_source": {
                                               "suggest": [
                                                           "Demo",
                                                           "Demo",
                                                           "Aero"
                                                ]  
                                             } 
                                          },
                                         {
                                           "text": "Alex",
                                           "_index": "er_data",
                                           "_type": "data",
                                           "_id": "2",
                                           "_score": 1,
                                           "_source": {
                                                  "suggest": [
                                                       "Alex",
                                                        "Alex Ambrose",
                                                        "Demo"
                                                     ]
                                                  }
                                            }
                                        ]
                                   }

```

Two result set are correct why it does not give me "Alex Ambrose" in the output "Text" field as it returns me "Alex" and "Aero"

My search query is

```
"suggest": {
      'suggest': {
                'text':"A",
                 'completion': {
                             'field': 'suggest'
                  }
           }
  }

```

Can you please suggest about this as well ??

---

<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: [February 4, 2018, 5:45pm UTC](https://discuss.elastic.co/t/show-suggest-result-on-front-end-without-hampering-speed-of-es/118351/5 "2018-02-04T17:45:07Z")

</div>

> So whome should I ping If I am stuck

Nobody.

Let the community decide if someone wants to answer.  
As written in the page I linked to:

> There are no SLAs on responses to questions posted on this forum, if you require help with an SLA on responses you should look into purchasing a subscription package that includes support with an SLA such as those offered by Elastic.

---

<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: [February 4, 2018, 5:45pm UTC](https://discuss.elastic.co/t/show-suggest-result-on-front-end-without-hampering-speed-of-es/118351/6 "2018-02-04T17:45:27Z")

</div>

Please format your code using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and not the citation button. It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

Please edit your post.

---

<div class="post-metadata">

### Author: ![Arpit\_Dadheech](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@Arpit\_Dadheech](https://discuss.elastic.co/u/Arpit_Dadheech)
#### Post date: [February 4, 2018, 6:20pm UTC](https://discuss.elastic.co/t/show-suggest-result-on-front-end-without-hampering-speed-of-es/118351/7 "2018-02-04T18:20:27Z")

</div>

I have done editing. Can you please check now.

Sorry for inconvenience.

---

<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: [March 4, 2018, 6:20pm UTC](https://discuss.elastic.co/t/show-suggest-result-on-front-end-without-hampering-speed-of-es/118351/8 "2018-03-04T18:20:29Z")

</div>

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