# ES as a simple keyword search engine

**URL:** <https://discuss.elastic.co/t/es-as-a-simple-keyword-search-engine/103919>\
**Category:** Elasticsearch\
**Created:** [October 13, 2017, 2:59pm UTC](https://discuss.elastic.co/t/es-as-a-simple-keyword-search-engine/103919 "2017-10-13T14:59:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![shin1](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@shin1](https://discuss.elastic.co/u/shin1)\
**Post date:** [October 13, 2017, 2:59pm UTC](https://discuss.elastic.co/t/es-as-a-simple-keyword-search-engine/103919/1 "2017-10-13T14:59:40Z")

</div>

Hi All,

A quick question.  
Can I just query keywords (eg. "AI" "Intelligence") and get result list?  
It looks like ES kindly returns results based on matching score by default.  
I want to use ES just as keywords search engine. (I don't need "guessing".)

Maybe,,,, is this just a sorting issue?

Many thanks in advance for your help,  
Sato

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 14, 2017, 2:56pm UTC](https://discuss.elastic.co/t/es-as-a-simple-keyword-search-engine/103919/2 "2017-10-14T14:56:51Z")

</div>

Elasticsearch doesn't guess, it provides relative results.

It's not clear what you are looking for here, are you able to elaborate?

---

<div class="post-metadata">

**Author:** ![shin1](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@shin1](https://discuss.elastic.co/u/shin1)\
**Post date:** [October 14, 2017, 11:41pm UTC](https://discuss.elastic.co/t/es-as-a-simple-keyword-search-engine/103919/3 "2017-10-14T23:41:23Z")

</div>

Thank you very much for an update.

When I perform a query with multiple keywords such as "AI Artificial Intelligence", the response contains documents which don't contain the searching words.  
I'd like to understand why and know if I can control this behavior.

My guess is that ES sorts the response based on score with similarities to the searching words and, in some cases, it results in returning documents containing no searching words because of higher score calculated by lucene(?).  
My goal in this case is just to search documents containing my searching keywords. In other words, I don't need documents if they don't contain my searching keywords.. 🙂

Regards,

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 15, 2017, 1:27am UTC](https://discuss.elastic.co/t/es-as-a-simple-keyword-search-engine/103919/4 "2017-10-15T01:27:08Z")

</div>

Can you give an example of a matching document which should not match?

What exact query do you run?  
What is the full json response?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 15, 2017, 5:00am UTC](https://discuss.elastic.co/t/es-as-a-simple-keyword-search-engine/103919/5 "2017-10-15T05:00:15Z")

</div>

Also, have a read of [https://www.elastic.co/guide/en/elasticsearch/guide/2.x/search.html](https://www.elastic.co/guide/en/elasticsearch/guide/2.x/search.html)

---

<div class="post-metadata">

**Author:** ![shin1](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@shin1](https://discuss.elastic.co/u/shin1)\
**Post date:** [October 26, 2017, 1:05pm UTC](https://discuss.elastic.co/t/es-as-a-simple-keyword-search-engine/103919/6 "2017-10-26T13:05:06Z")

</div>

I figured out the cause!  
I'm using ES python client and passing "keyword" between double quotation(") but the double quotation requires "escaped". I added backslash(¥) before " and everything works fine!!

Thank you very much for your help!!

---

<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:** [November 23, 2017, 1:05pm UTC](https://discuss.elastic.co/t/es-as-a-simple-keyword-search-engine/103919/7 "2017-11-23T13:05:15Z")

</div>

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