# How can match exact string first and then spilt matches ElasticSearch (7.16.2) and Nest (7.16.2)

**URL:** <https://discuss.elastic.co/t/how-can-match-exact-string-first-and-then-spilt-matches-elasticsearch-7-16-2-and-nest-7-16-2/316694>\
**Category:** Elasticsearch\
**Tags:** language-clients, eql-elastic-query-language\
**Created:** [October 15, 2022, 6:35pm UTC](https://discuss.elastic.co/t/how-can-match-exact-string-first-and-then-spilt-matches-elasticsearch-7-16-2-and-nest-7-16-2/316694 "2022-10-15T18:35:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abid\_Hussain1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abid_hussain1/32/111873_2.png) [@Abid\_Hussain1](https://discuss.elastic.co/u/Abid_Hussain1)\
**Post date:** [October 15, 2022, 6:35pm UTC](https://discuss.elastic.co/t/how-can-match-exact-string-first-and-then-spilt-matches-elasticsearch-7-16-2-and-nest-7-16-2/316694/1 "2022-10-15T18:35:20Z")

</div>

For example i want below searching with this string " **we added a large**" string from the (paragraph and subject ) fields, and paragraph contain this string below

1. "We encountered elevated H2S levels today in the trailer, **we added a large** fan from Caleb. We think the lower end of the hose is not adequately sealed to the tank. ."

2. "only when the lid comes off during cleaning/rinsing. Caleb suggested beefing up the fan, **we** can look at this. We are also going to modify our **large** procedures to use clean water from"

first paragaph which have complete match string should be on first and then other matches should be on second priorty

---

<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 12, 2022, 6:35pm UTC](https://discuss.elastic.co/t/how-can-match-exact-string-first-and-then-spilt-matches-elasticsearch-7-16-2-and-nest-7-16-2/316694/2 "2022-11-12T18:35:46Z")

</div>

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