# How can I match multimatch with NEST in elasticsearch?

**URL:** <https://discuss.elastic.co/t/how-can-i-match-multimatch-with-nest-in-elasticsearch/268304>\
**Category:** Elasticsearch\
**Created:** [March 25, 2021, 8:46am UTC](https://discuss.elastic.co/t/how-can-i-match-multimatch-with-nest-in-elasticsearch/268304 "2021-03-25T08:46:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Celal\_Poyraz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/celal_poyraz/32/85886_2.png) [@Celal\_Poyraz](https://discuss.elastic.co/u/Celal_Poyraz)\
**Post date:** [March 25, 2021, 8:46am UTC](https://discuss.elastic.co/t/how-can-i-match-multimatch-with-nest-in-elasticsearch/268304/1 "2021-03-25T08:46:08Z")

</div>

I want to search with RegisterNumber and Title at the same time. But how can I match both at the same time? Also, when I press the space character, I cannot make calls after the space. How can I solve this? Currently searching by title but when I search with registernumber it doesn't see the records. Both are string types.  
I tried to do it with a wildcard but I couldn't.

```auto
var searchResponse = eClient.Search<GlobalCompany>(s => s.Index(INDEX_NAME)
                  .Query(q => q
                  .MultiMatch(m => m
                            .Fields(f => f
                                .Field(u => u.Title)
                                .Field(u => u.RegisterNumber))
                            .Type(TextQueryType.PhrasePrefix)
                          .Query(value))));

```

---

<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:** [March 25, 2021, 8:59am UTC](https://discuss.elastic.co/t/how-can-i-match-multimatch-with-nest-in-elasticsearch/268304/2 "2021-03-25T08:59:37Z")

</div>

Could you provide a full recreation script as described in [About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script is something anyone can copy and paste in **Kibana dev console** , click on the run button to reproduce your use case. It will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

It's better to understand first what is happening without using Nest.

---

<div class="post-metadata">

**Author:** ![Celal\_Poyraz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/celal_poyraz/32/85886_2.png) [@Celal\_Poyraz](https://discuss.elastic.co/u/Celal_Poyraz)\
**Post date:** [March 25, 2021, 11:07am UTC](https://discuss.elastic.co/t/how-can-i-match-multimatch-with-nest-in-elasticsearch/268304/3 "2021-03-25T11:07:29Z")

</div>

I solved my problem, I have a problem with frontend vue.js. But I still have a problem here. I'm doing the search process, but it doesn't verify the fields after the space character. For example, when I search for John, the record comes up.But when I search for "John Steven", it does not find it even though it is recorded.I do the search by typing in an autocomplete text.

---

<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:** [March 25, 2021, 11:23am UTC](https://discuss.elastic.co/t/how-can-i-match-multimatch-with-nest-in-elasticsearch/268304/4 "2021-03-25T11:23:44Z")

</div>

If you need help, please provide a script which describes and reproduces the problem.

---

<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:** [April 22, 2021, 11:24am UTC](https://discuss.elastic.co/t/how-can-i-match-multimatch-with-nest-in-elasticsearch/268304/5 "2021-04-22T11:24:39Z")

</div>

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