---
updatedAt: 2025-05-14T07:59:45.000Z
agentTools:
  projectIndex: https://learn.vtex.com/llms.txt
---

# Search Improvements

<HTMLBlock>{`
<style>
      section#hub-content header h1, section#hub-content header h2 {
        color: #f71963
      }
    
      p {
        line-height: 1.5rem;
      }
    </style>
`}</HTMLBlock>

# Search improvements

One of the heaviest and least performing operations in a store's navigation is its search. To improve the experience, we can also optimize the search for data and make it more efficient, in this sense two points must be observed: the SKUs and the price

## Activity

1. To optimize the search context, add the `context` property to the search *template* in the `store/blocks/search.jsonc` file:

   ```diff
   // store / blocks / search.jsonc
   {
     "store.search": {
   + "props": {
   + "context": {}
   +},
       "blocks": ["search-result-layout # search"]
     },
     ...
   }
   ```

2. To guarantee reduction of loaded results and, therefore, reduce the volume of results. It is possible to control that only the first available SKU is returned, for this, add `skusFilter` to `context` as `FIRST_AVAILABLE`:

   ```diff
   {
     "store.search": {
       "props": {
         "context": {
   + "skusFilter": "FIRST_AVAILABLE"
         }
       },
       "blocks": ["search-result-layout # search"]
     },
   }
   ```

3. To make prices more *cacheable* and avoid simulating them for each search result obtained, we can also choose `skip` as`simulationBehavior`:

   ```diff
   {
     "store.search": {
       "props": {
         "context": {
           "skusFilter": "FIRST_AVAILABLE"
   + "simulationBehavior": "skip"
         }
       },
       "blocks": ["search-result-layout # search"]
     },
   }
   ```

### Any questions?

See the [answersheet for this step](https://learn.vtex.com/docs/course-store-performance-step05searching-answersheet-lang-en) or check our \[office hours] on the VTEX Developers channel(<https://www.youtube.com/c/VTEXDevelopers>)

<hr/>
<div id="contribute-container">
  <p id="contribute-title"> 
    Help us make this content better!
  </p>
  <p id="contribute-description">
    VTEX IO courses are open source. If you see something wrong, you can open a pull request!
  </p>

  <a id="contribute-button" href="https://github.com/vtex/vtex-courses/edit/master/courses/store-performance/steps/05_searching/en.md">
    Make a contribution
  </a>

  <p id="contribute-issue">
    or <a href="https://github.com/vtex/vtex-courses/issues/new/choose">open an issue</a>
  </p>

</div>