# Quoted text search

**URL:** <https://discuss.elastic.co/t/quoted-text-search/15302>\
**Category:** Elasticsearch\
**Created:** [January 17, 2014, 9:22pm UTC](https://discuss.elastic.co/t/quoted-text-search/15302 "2014-01-17T21:22:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ahmed\_Sabaa](https://avatars.discourse-cdn.com/v4/letter/a/e19adc/32.png) [@Ahmed\_Sabaa](https://discuss.elastic.co/u/Ahmed_Sabaa)\
**Post date:** [January 17, 2014, 9:22pm UTC](https://discuss.elastic.co/t/quoted-text-search/15302/1 "2014-01-17T21:22:01Z")

</div>

I am trying to search for a text (for example mcdonald) in my index and my  
biggest issue is that if the word Terry is present in the selected field  
but followed by an apostrophe (or a single quote, like McDonald's) the  
search yields no result. I have a feeling that it's a problem with the  
standard tokenizer so I wanted to use the letter tokenizer (as far as I  
understood it would work?). So I create the index with the following :

"analysis": {  
"analyzer": {  
"standard": {  
"tokenizer": "letter"  
}  
}  
}

And it didn't change anything. Also I cannot find the actual analyzer used  
by the index at creation. I also tried:  
"analysis": {  
"analyzer": {  
"my\_analyzer": {  
"type": "snowball",  
"language": "English"  
}  
}  
}

At index creation. As I said the biggest issue is that I cannot find the  
actual analyzer used by the index nor find out what's wrong with my search  
query.

P.S I am using :  
"bool": {  
"must": ['query\_string': {  
"fields": ["name.en"],  
"query": 'mcdonald'  
}]  
}

For the actual searching. The documentation is kind of vague in this  
prospect and I cannot find any solution to it anywhere.

Regards,

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/5475a029-537c-4229-ad58-b99abfc19fdf%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5475a029-537c-4229-ad58-b99abfc19fdf%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [January 20, 2014, 9:36am UTC](https://discuss.elastic.co/t/quoted-text-search/15302/2 "2014-01-20T09:36:47Z")

</div>

Hey,

please checkout the analyze API, which shows how a field gets broken down  
into terms using a certain analyzer. This should help you to pick the right  
one. Also, you might want to install the inquisitor plugin for a nice GUI  
on top of the Analyze API

If you do not configure anything the analyzer is the standard analyzer.  
However you can see the analyzer used per field in the mapping API.

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

> **[GitHub - polyfractal/elasticsearch-inquisitor: Site plugin for Elasticsearch...](https://github.com/polyfractal/elasticsearch-inquisitor)**
>
> Site plugin for Elasticsearch to help understand and debug queries. - GitHub - polyfractal/elasticsearch-inquisitor: Site plugin for Elasticsearch to help understand and debug queries.

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

--Alex

On Fri, Jan 17, 2014 at 10:22 PM, Ahmed Sabaa [ahmedsabaa89@gmail.com](mailto:ahmedsabaa89@gmail.com)wrote:

> I am trying to search for a text (for example mcdonald) in my index and my  
> biggest issue is that if the word Terry is present in the selected field  
> but followed by an apostrophe (or a single quote, like McDonald's) the  
> search yields no result. I have a feeling that it's a problem with the  
> standard tokenizer so I wanted to use the letter tokenizer (as far as I  
> understood it would work?). So I create the index with the following :
> 
> "analysis": {  
> "analyzer": {  
> "standard": {  
> "tokenizer": "letter"  
> }  
> }  
> }
> 
> And it didn't change anything. Also I cannot find the actual analyzer used  
> by the index at creation. I also tried:  
> "analysis": {  
> "analyzer": {  
> "my\_analyzer": {  
> "type": "snowball",  
> "language": "English"  
> }  
> }  
> }
> 
> At index creation. As I said the biggest issue is that I cannot find the  
> actual analyzer used by the index nor find out what's wrong with my search  
> query.
> 
> P.S I am using :  
> "bool": {  
> "must": ['query\_string': {  
> "fields": ["name.en"],  
> "query": 'mcdonald'  
> }]  
> }
> 
> For the actual searching. The documentation is kind of vague in this  
> prospect and I cannot find any solution to it anywhere.
> 
> Regards,
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/5475a029-537c-4229-ad58-b99abfc19fdf%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5475a029-537c-4229-ad58-b99abfc19fdf%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-CaFoaDQpz4Jp8CqAfRxRn-GN0FNLAOoac8zZCxKEewQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-CaFoaDQpz4Jp8CqAfRxRn-GN0FNLAOoac8zZCxKEewQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 1:55am UTC](https://discuss.elastic.co/t/quoted-text-search/15302/3 "2017-07-06T01:55:54Z")

</div>


