# App Search UI Display Character Limit

**URL:** <https://discuss.elastic.co/t/app-search-ui-display-character-limit/335486>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [June 8, 2023, 12:58am UTC](https://discuss.elastic.co/t/app-search-ui-display-character-limit/335486 "2023-06-08T00:58:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aisyaharifin](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@aisyaharifin](https://discuss.elastic.co/u/aisyaharifin)\
**Post date:** [June 8, 2023, 12:58am UTC](https://discuss.elastic.co/t/app-search-ui-display-character-limit/335486/1 "2023-06-08T00:58:51Z")

</div>

Hello,

I want to ask, is there a character limit to display in the App Search UI?

I have problem where I have a long character value of data and I realized the UI does not display all of the character.

When I configure the Result Settings, the limit is no limit already.

Let say for example I use the national park data, the description field have a long character and should display until 'elevations' :

 ![Default Long Char](https://us1.discourse-cdn.com/elastic/original/3X/9/9/99692337b19b5af91171824452d0f6f30fa2a5f1.png)

However, the UI only display until 'Appalachian' :

 ![Half Display](https://us1.discourse-cdn.com/elastic/original/3X/f/6/f6edd2793905999015d3b5d5f56d4da20cc7921a.png)

It does not display everything as the character is too long, how should I fix this?

Thank you.

---

<div class="post-metadata">

**Author:** ![joemcelroy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joemcelroy/32/103757_2.png) [@joemcelroy](https://discuss.elastic.co/u/joemcelroy)\
**Post date:** [June 8, 2023, 7:38am UTC](https://discuss.elastic.co/t/app-search-ui-display-character-limit/335486/2 "2023-06-08T07:38:21Z")

</div>

hi there @aisyaharifin

Are you using snippet or raw for the display? AFAIK, raw should return the full value of the field rather than snippet which is by default limited to 100 characters.

Its likely you're using snippet for something like description.

See docs for more information. [Search API result fields | App Search documentation [8.8] | Elastic](https://www.elastic.co/guide/en/app-search/current/result-fields-highlights.html#result-fields-highlights)

Thanks  
Joe

---

<div class="post-metadata">

**Author:** ![aisyaharifin](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@aisyaharifin](https://discuss.elastic.co/u/aisyaharifin)\
**Post date:** [June 13, 2023, 3:21am UTC](https://discuss.elastic.co/t/app-search-ui-display-character-limit/335486/3 "2023-06-13T03:21:01Z")

</div>

Hi @joemcelroy ,

Thank you for your reply.

Apparently, all the display already set in raw for all the fields, its by default ones and never changed.

 ![Screenshot 2023-06-13 at 11.00.33 AM](https://us1.discourse-cdn.com/elastic/original/3X/b/0/b0e61a4848b6c3ccfd8fbd0fcd79fd69c2594e9f.png)

But it still not displaying all the characters, it is crucial for me to display it to achieve the searching purpose.

It might be the css style issue, can I know which part I need to adjust the script in order for it to show full display of the characters value of data?

Not sure if its under `config-helper.js` , but it seems like the `raw` one it not delimited :

```auto
const resultFields = (config.resultFields || config.fields || []).reduce(
    (acc, n) => {
      acc = acc || {};
      acc[n] = {
        raw: {},
        snippet: {
          size: 100,
          fallback: true
        }
      };
      return acc;

```

Thank you for your assistance.

---

<div class="post-metadata">

**Author:** ![joemcelroy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joemcelroy/32/103757_2.png) [@joemcelroy](https://discuss.elastic.co/u/joemcelroy)\
**Post date:** [June 13, 2023, 9:24am UTC](https://discuss.elastic.co/t/app-search-ui-display-character-limit/335486/4 "2023-06-13T09:24:54Z")

</div>

Hi there,

Raw is the original value of the field and will not contain highlighting attributes. Snippet will contain highlighting (matches will be contained in an html em tag). using snippet means that when a match is found, it will only display upto 100 characters of where the match was present.

If you're using Search UI (as you mentioned config-helper, it sounds like you are), it will use the snippet. Whats happening is the config-helper is requesting for snippets instead, overriding the defaults set in the UI.

You have two options:

- I dont want highlighting: update config-helper to remove the snippet object. I believe it should work if the code was this

```js
const resultFields = (config.resultFields || config.fields || []).reduce(
  (acc, n) => {
    acc = acc || {};
    acc[n] = {
      raw: {}
   }; 
   return acc;
})

```

- update config-helper and Increase snippet size to a higher number

---

<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 11, 2023, 9:25am UTC](https://discuss.elastic.co/t/app-search-ui-display-character-limit/335486/5 "2023-07-11T09:25:39Z")

</div>

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