# How to match a mean word

**URL:** <https://discuss.elastic.co/t/how-to-match-a-mean-word/11458>\
**Category:** Elasticsearch\
**Created:** [April 4, 2013, 10:54pm UTC](https://discuss.elastic.co/t/how-to-match-a-mean-word/11458 "2013-04-04T22:54:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![NILE\_NGUY\_N](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@NILE\_NGUY\_N](https://discuss.elastic.co/u/NILE_NGUY_N)\
**Post date:** [April 4, 2013, 10:54pm UTC](https://discuss.elastic.co/t/how-to-match-a-mean-word/11458/1 "2013-04-04T22:54:33Z")

</div>

im new from elasticsearch .. and i want to know to get a mean word from  
elasticsearch

for ex :

i have 4 docs "elasticsearch", "is the best", "good" and "is my choice"

i had done a search with keyword "elasticsearch is good". i get a result  
matching all docs ... that is something i would not expect .. i want to get  
only 2 docs : "elasticsearch" and "good"

anybody can suggest me ???

SORRY FOR MY BAD ENGLISH ☹

--  
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:** ![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:** [April 5, 2013, 1:44am UTC](https://discuss.elastic.co/t/how-to-match-a-mean-word/11458/2 "2013-04-05T01:44:32Z")

</div>

Welcome!

Please read this: [http://www.elasticsearch.org/help/](http://www.elasticsearch.org/help/)  
And provide a Gist of what you have tried so far.

We will be happy to help as soon as we know exactly what you have done.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 5 avr. 2013 à 00:54, NILE NGUYỄN [ducati1801@gmail.com](mailto:ducati1801@gmail.com) a écrit :

im new from elasticsearch .. and i want to know to get a mean word from elasticsearch

for ex :

i have 4 docs "elasticsearch", "is the best", "good" and "is my choice"

i had done a search with keyword "elasticsearch is good". i get a result matching all docs ... that is something i would not expect .. i want to get only 2 docs : "elasticsearch" and "good"

anybody can suggest me ???

## SORRY FOR MY BAD ENGLISH ☹

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).

--  
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:** ![sslhj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sslhj/32/119856_2.png) [@sslhj](https://discuss.elastic.co/u/sslhj)\
**Post date:** [April 5, 2013, 2:55am UTC](https://discuss.elastic.co/t/how-to-match-a-mean-word/11458/3 "2013-04-05T02:55:21Z")

</div>

it is about analyzers, query analzer when searching , and index analyzer when indexing, both can be set through the mapping api against a field. most analyzers would discard the "is" after analying, as "is" is a useless word. so, you need to implement your own analyzer to keep your "is" when analying.

---

<div class="post-metadata">

**Author:** ![NILE\_NGUY\_N](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@NILE\_NGUY\_N](https://discuss.elastic.co/u/NILE_NGUY_N)\
**Post date:** [April 5, 2013, 9:14pm UTC](https://discuss.elastic.co/t/how-to-match-a-mean-word/11458/4 "2013-04-05T21:14:31Z")

</div>

Thanks for reply me David

i mean how can i parse a search keyword sentences from my keyword list

ex :

keyword list : "elasticsearch", "is", "my", "best choice"

if my search string is "elasticsearch is my bestchoice" ... how can i  
config elasticsearch to parse sentences like this

query: {

bool: {

```
  must: [ 

    { "bool" : { 

      "should": [

          {term: { "testarea_name":"elasticsearch"}, 
          {term: { "testarea_name":"is"}, 
          {term: { "testarea_name":"my"} 
          {term: { "testarea_name":"best choice"} 
      ] 
    } 
  ] 
} 

```

}

On Friday, April 5, 2013 5:54:33 AM UTC+7, NILE NGUYỄN wrote:

> im new from elasticsearch .. and i want to know to get a mean word from  
> elasticsearch
> 
> for ex :
> 
> i have 4 docs "elasticsearch", "is the best", "good" and "is my choice"
> 
> i had done a search with keyword "elasticsearch is good". i get a result  
> matching all docs ... that is something i would not expect .. i want to get  
> only 2 docs : "elasticsearch" and "good"
> 
> anybody can suggest me ???
> 
> SORRY FOR MY BAD ENGLISH ☹

--  
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:** ![simonw\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simonw_2/32/1130_2.png) [@simonw\_2](https://discuss.elastic.co/u/simonw_2)\
**Post date:** [April 6, 2013, 7:19pm UTC](https://discuss.elastic.co/t/how-to-match-a-mean-word/11458/5 "2013-04-06T19:19:32Z")

</div>

ok so what does make "good" make a "better" word than "is"? If you want to  
drop stopwords, just use 'stopword' filter or select mandatory terms first  
and build dedicated boolean queries.

aside from this I don't really get why this query should pick 2 docs, sorry!

simon  
On Friday, April 5, 2013 12:54:33 AM UTC+2, NILE NGUYỄN wrote:

> im new from elasticsearch .. and i want to know to get a mean word from  
> elasticsearch
> 
> for ex :
> 
> i have 4 docs "elasticsearch", "is the best", "good" and "is my choice"
> 
> i had done a search with keyword "elasticsearch is good". i get a result  
> matching all docs ... that is something i would not expect .. i want to get  
> only 2 docs : "elasticsearch" and "good"
> 
> anybody can suggest me ???
> 
> SORRY FOR MY BAD ENGLISH ☹

--  
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:42am UTC](https://discuss.elastic.co/t/how-to-match-a-mean-word/11458/6 "2017-07-06T02:42:27Z")

</div>


