# Multi-Match Bool Prefix Query - search query for search-as-you-type and keyword fields

**URL:** https://discuss.elastic.co/t/multi-match-bool-prefix-query-search-query-for-search-as-you-type-and-keyword-fields/209274
**Category:** Elasticsearch
**Created:** [November 25, 2019, 10:07am UTC](https://discuss.elastic.co/t/multi-match-bool-prefix-query-search-query-for-search-as-you-type-and-keyword-fields/209274 "2019-11-25T10:07:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![lwronski](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lwronski/32/58262_2.png) [@lwronski](https://discuss.elastic.co/u/lwronski)
#### Post date: [November 25, 2019, 10:07am UTC](https://discuss.elastic.co/t/multi-match-bool-prefix-query-search-query-for-search-as-you-type-and-keyword-fields/209274/1 "2019-11-25T10:07:19Z")

</div>

Hi,  
I want to find out, how multi match works for search-as-you-type and keyword type fields in one query. If I make multi match query on only search-as-you-type fields, I get expected result.  
If only, I make query which contains two words which match both types (search-as-you-type and keyword), I get unexpected results.

I can't change mapping in elasticsearch, so I have to find appropriate way to execute multi-match search query on both types.

I want to ask, If exists any rule for this query?  
Is there any recommend way to execute multi-match search query for search-as-you-type and keyword fields?

---

<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: [December 23, 2019, 10:07am UTC](https://discuss.elastic.co/t/multi-match-bool-prefix-query-search-query-for-search-as-you-type-and-keyword-fields/209274/2 "2019-12-23T10:07:20Z")

</div>

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