# How to make a query could match Possessive Case?

**URL:** <https://discuss.elastic.co/t/how-to-make-a-query-could-match-possessive-case/11668>\
**Category:** Elasticsearch\
**Created:** [April 23, 2013, 12:44pm UTC](https://discuss.elastic.co/t/how-to-make-a-query-could-match-possessive-case/11668 "2013-04-23T12:44:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jingang\_Wang](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@Jingang\_Wang](https://discuss.elastic.co/u/Jingang_Wang)\
**Post date:** [April 23, 2013, 12:44pm UTC](https://discuss.elastic.co/t/how-to-make-a-query-could-match-possessive-case/11668/1 "2013-04-23T12:44:22Z")

</div>

Hi there,

I used default settings to create the indices on my data,while I found that  
queries could not match Possessive Case.  
For example, when I make a matchPhrasequery("Aharon Barak"), the documents  
including strings such as "Aharon Barak's wife".  
I have known that I need to set the word delimiter tokenfilter：  
[http://www.elasticsearch.org/guide/reference/index-modules/analysis/word-delimiter-tokenfilter/](http://www.elasticsearch.org/guide/reference/index-modules/analysis/word-delimiter-tokenfilter/)

From my understanding, I need to create the indices again after I change  
the settings.  
Is there any convenient means to handle this problem?

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Jingang\_Wang](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@Jingang\_Wang](https://discuss.elastic.co/u/Jingang_Wang)\
**Post date:** [April 23, 2013, 12:53pm UTC](https://discuss.elastic.co/t/how-to-make-a-query-could-match-possessive-case/11668/2 "2013-04-23T12:53:06Z")

</div>

Also, I'm using ES 0.90.Beta

On Tuesday, April 23, 2013 8:44:22 PM UTC+8, Jingang Wang wrote:

> Hi there,
> 
> I used default settings to create the indices on my data,while I found  
> that queries could not match Possessive Case.  
> For example, when I make a matchPhrasequery("Aharon Barak"), the  
> documents including strings such as "Aharon Barak's wife".  
> I have known that I need to set the word delimiter tokenfilter：  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/index-modules/analysis/word-delimiter-tokenfilter/)
> 
> From my understanding, I need to create the indices again after I change  
> the settings.  
> Is there any convenient means to handle this problem?

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![taras](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/taras/32/507_2.png) [@taras](https://discuss.elastic.co/u/taras)\
**Post date:** [April 24, 2013, 3:52am UTC](https://discuss.elastic.co/t/how-to-make-a-query-could-match-possessive-case/11668/3 "2013-04-24T03:52:29Z")

</div>

You do have to rebuild the index. There are currently no schema migrations  
for Elasticsearch.  
If it isn't convenient to re-generate the data, you could do a scan of the  
old index and insert each document into new index (server).

On Tuesday, April 23, 2013 5:53:06 AM UTC-7, Jingang Wang wrote:

> Also, I'm using ES 0.90.Beta
> 
> On Tuesday, April 23, 2013 8:44:22 PM UTC+8, Jingang Wang wrote:
> 
> > Hi there,
> > 
> > I used default settings to create the indices on my data,while I found  
> > that queries could not match Possessive Case.  
> > For example, when I make a matchPhrasequery("Aharon Barak"), the  
> > documents including strings such as "Aharon Barak's wife".  
> > I have known that I need to set the word delimiter tokenfilter：  
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/index-modules/analysis/word-delimiter-tokenfilter/)
> > 
> > From my understanding, I need to create the indices again after I change  
> > the settings.  
> > Is there any convenient means to handle this problem?

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Jingang\_Wang](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@Jingang\_Wang](https://discuss.elastic.co/u/Jingang_Wang)\
**Post date:** [April 24, 2013, 5:58am UTC](https://discuss.elastic.co/t/how-to-make-a-query-could-match-possessive-case/11668/4 "2013-04-24T05:58:20Z")

</div>

Thank you, Taras.  
I have checked the word delimiter tokenfilter description.  
Should I explicitly set it when put mapping? Would ES set it as default  
settings?

On Wednesday, April 24, 2013 11:52:29 AM UTC+8, Taras Shkvarchuk wrote:

> You do have to rebuild the index. There are currently no schema migrations  
> for Elasticsearch.  
> If it isn't convenient to re-generate the data, you could do a scan of the  
> old index and insert each document into new index (server).
> 
> On Tuesday, April 23, 2013 5:53:06 AM UTC-7, Jingang Wang wrote:
> 
> > Also, I'm using ES 0.90.Beta
> > 
> > On Tuesday, April 23, 2013 8:44:22 PM UTC+8, Jingang Wang wrote:
> > 
> > > Hi there,
> > > 
> > > I used default settings to create the indices on my data,while I found  
> > > that queries could not match Possessive Case.  
> > > For example, when I make a matchPhrasequery("Aharon Barak"), the  
> > > documents including strings such as "Aharon Barak's wife".  
> > > I have known that I need to set the word delimiter tokenfilter：  
> > > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/index-modules/analysis/word-delimiter-tokenfilter/)
> > > 
> > > From my understanding, I need to create the indices again after I change  
> > > the settings.  
> > > Is there any convenient means to handle this problem?

--  
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).  
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, 2:39am UTC](https://discuss.elastic.co/t/how-to-make-a-query-could-match-possessive-case/11668/5 "2017-07-06T02:39:51Z")

</div>


