# Kibana Search Application Customize Returned Result

**URL:** https://discuss.elastic.co/t/kibana-search-application-customize-returned-result/372609
**Category:** Kibana
**Created:** [December 29, 2024, 11:54pm UTC](https://discuss.elastic.co/t/kibana-search-application-customize-returned-result/372609 "2024-12-29T23:54:06Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![samer\_saleh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samer_saleh/32/140154_2.png) [@samer\_saleh](https://discuss.elastic.co/u/samer_saleh)
#### Post date: [December 29, 2024, 11:54pm UTC](https://discuss.elastic.co/t/kibana-search-application-customize-returned-result/372609/1 "2024-12-29T23:54:06Z")

</div>

Hi ,

Im trying the Kibana Search Applications for the first time. Initially when I created the search application against a certain index I was getting all the fields displayed. After some reading I found that I can you update the search template behind the search application to include certain fields. the steps were as follows:

1- I went to the Kibana Deve Tools and made the following API call to update my search template and return the "text" field using the \_source config:

```auto
PUT /_application/search_application/my_api_search_application
{
  "indices": ["openai-chunk-index"],
  "template": {
    "script": {
      "source": {
      "query":{
      
                "sparse_vector": {
                            "field": "text_embedding",
                            "inference_id": "semantic_elser_model_2",
                            "query": "{{query_string}}"
                        }
                
      
               },
               "_source":"text"
      },
      
      
      "params": {
        "query_string": "*",
        "default_field": "text_embedding"
      }
    }
  }
}

```

2- Test the the updated Search Application by submitting query as follows:

```auto
POST _application/search_application/my_api_search_application/_search
{
  "params": {
    "query_string": "Some Query..."}
    
}

```

The response I got return the text field as expected:

```auto
{
  "took": 86,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 381,
      "relation": "eq"
    },
    "max_score": 18.074097,
    "hits": [
      {
        "_index": "openai-chunk-index",
        "_id": "Ll6gCJQBxHM1tEFFR1rj",
        "_score": 18.074097,
        "_source": {
          "text": """....Some Text"""
        }
      }

```

My problem is when I go back to the search application my\_api\_search\_application and open the view with the search bar I still get all the fields when I search for the same query 🙂

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/e/1ebc81cdc5e9e5a409980b3538906d8e670a8e23.png)

Why is that ? Can someone point me what am I doing wrong. I understand its Beta version and things might not work perfectly but is that the expected behavior or its a bug or am I missing something?

Thanks
