# Get intersection between two strings

**URL:** https://discuss.elastic.co/t/get-intersection-between-two-strings/23166
**Category:** Elasticsearch
**Created:** [April 9, 2015, 7:01am UTC](https://discuss.elastic.co/t/get-intersection-between-two-strings/23166 "2015-04-09T07:01:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![fanooos](https://avatars.discourse-cdn.com/v4/letter/f/34f0e0/32.png) [@fanooos](https://discuss.elastic.co/u/fanooos)
#### Post date: [April 9, 2015, 7:01am UTC](https://discuss.elastic.co/t/get-intersection-between-two-strings/23166/1 "2015-04-09T07:01:53Z")

</div>

I have some tweets and I need to know if any of these tweets contains any phrase (or part of phrase) from the Quran.

A friend told me this is a full text search job and he advised me to use elasticsearch for that.

I have installed elasticsearch and indexed all the Quran phrases. I think to achieve what I want, I need to get the intersection between the tweet body and the phrases.

Is this the correct approach?

If yes, how can I do that?

If no, what other approaches can I look for ?

---

<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: [July 6, 2017, 12:20am UTC](https://discuss.elastic.co/t/get-intersection-between-two-strings/23166/2 "2017-07-06T00:20:40Z")

</div>


