# How to implement proximity search in app search

**URL:** https://discuss.elastic.co/t/how-to-implement-proximity-search-in-app-search/203966
**Category:** Elastic Search
**Tags:** elastic-app-search
**Created:** [October 17, 2019, 4:31am UTC](https://discuss.elastic.co/t/how-to-implement-proximity-search-in-app-search/203966 "2019-10-17T04:31:45Z")
**Posts on this page:** 1
**Showing post:** 11

<div class="post-metadata">

### Author: ![JasonStoltz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasonstoltz/32/49893_2.png) [@JasonStoltz](https://discuss.elastic.co/u/JasonStoltz)
#### Post date: [October 28, 2019, 11:12am UTC](https://discuss.elastic.co/t/how-to-implement-proximity-search-in-app-search/203966/11 "2019-10-28T11:12:21Z")

</div>

@ranjeet.tiwari It would be neat to have a better way to support this, but I'd recommend trying something like the following. Keep in mind that this is just pseudo-code to illustrate the concept I have in mind:

```auto
state = {
  engine: 'engine1'
}

const connector = new AppSearchAPIConnector({
  searchKey: "",
  engineName: this.state.engineName,
  hostIdentifier: ""
});

return <SearchProvider
  config={{
    apiConnector: connector
  }}
>
  <div>
    <SearchBox />
    <Tab1 id="tab1" onClick={() => setState({ engine: 'engine1' })}/>
    <Tab2 id="tab1" onClick={() => setState({ engine: 'engine2' })}/>
  </div>
</SearchProvider>

```

---

_[View the full topic](https://discuss.elastic.co/t/how-to-implement-proximity-search-in-app-search/203966)._
