# Quick advice for an ES newbie - ES and natural language

**URL:** <https://discuss.elastic.co/t/quick-advice-for-an-es-newbie-es-and-natural-language/164699>\
**Category:** Elasticsearch\
**Created:** [January 17, 2019, 8:40pm UTC](https://discuss.elastic.co/t/quick-advice-for-an-es-newbie-es-and-natural-language/164699 "2019-01-17T20:40:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GenXJason](https://avatars.discourse-cdn.com/v4/letter/g/e95f7d/32.png) [@GenXJason](https://discuss.elastic.co/u/GenXJason)\
**Post date:** [January 17, 2019, 8:40pm UTC](https://discuss.elastic.co/t/quick-advice-for-an-es-newbie-es-and-natural-language/164699/1 "2019-01-17T20:40:54Z")

</div>

Trying to (extremely) simplify my requirements.

Given a document structure similar to this:

```
{ 
   "id": 1.
   " vendor_type": "electrician",
   "location": "new york",
   "price_level": "cheap"
}

{ 
   "id": 2.
   " vendor_type": "plumber",
   "location": "chicago",
   "price_level": "expensive"
}

```

Is there a pattern/tools/techniques I can follow if I want to enable my users to query something like:

```
cheap electricians in new york
plumbers in chicago

```

I would appreciate any insight or pointer

---

<div class="post-metadata">

**Author:** ![shrikantgulia](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@shrikantgulia](https://discuss.elastic.co/u/shrikantgulia)\
**Post date:** [January 18, 2019, 4:49am UTC](https://discuss.elastic.co/t/quick-advice-for-an-es-newbie-es-and-natural-language/164699/2 "2019-01-18T04:49:50Z")

</div>

Hey @GenXJason,

This is something related to recommendation engine.  
GET index\_name/\_search

{

"query": {

```
"term": {

  "price_level": "baker"

}

```

},

"aggs": {

```
  "bestMatch": {

    "terms": {

      "field": "vendor_type.keyword"

    }

  }

```

}

}

---

<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:** [February 15, 2019, 4:49am UTC](https://discuss.elastic.co/t/quick-advice-for-an-es-newbie-es-and-natural-language/164699/3 "2019-02-15T04:49:55Z")

</div>

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