# Need help for search

**URL:** <https://discuss.elastic.co/t/need-help-for-search/21660>\
**Category:** Elasticsearch\
**Created:** [January 15, 2015, 1:58pm UTC](https://discuss.elastic.co/t/need-help-for-search/21660 "2015-01-15T13:58:16Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thibaut\_Owczarz](https://avatars.discourse-cdn.com/v4/letter/t/46a35a/32.png) [@Thibaut\_Owczarz](https://discuss.elastic.co/u/Thibaut_Owczarz)\
**Post date:** [January 15, 2015, 1:58pm UTC](https://discuss.elastic.co/t/need-help-for-search/21660/1 "2015-01-15T13:58:16Z")

</div>

Hello,  
I start learning Elasticsearch, and i have a problem for understand how  
search. anyone could help me?

My gist for all my structure and my data is here

> <https://gist.github.com/thibaut1001/7a3000c3ff371be3a52d>

My problem is just in 4part  
To search in multi field by data like this

## We need to search henry in field selected

curl -XPOST '[http://localhost:9200/test\_fr/user/\_search](http://localhost:9200/test_fr/user/_search)' -d '{  
"query" : {  
"bool": {  
"must": [],  
"must\_not": [],  
"should": [  
{  
"term": {  
"user.sku": "henry"  
}  
},  
{  
"term": {  
"user.internal\_code": "henry"  
}  
},  
{  
"term": {  
"user.firstname": "henry"  
}  
},  
{  
"term": {  
"user.lastname": "henry"  
}  
},  
{  
"term": {  
"user.address": "henry"  
}  
},  
{  
"term": {  
"user.city": "henry"  
}  
},  
{  
"term": {  
"user.localized\_description": "henry"  
}  
},  
{  
"term": {  
"user.localized\_keywords": "henry"  
}  
},  
{  
"term": {  
"user.service.localized\_label": "henry"  
}  
},  
{  
"term": {  
"user.medias.localized\_label": "henry"  
}  
},  
{  
"term": {  
"user.services.localized\_label": "henry"  
}  
}  
]  
}  
}  
}';

## Return no results Why?

I have many question.  
Could you help me please,  
thanks

--  
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/c32551bd-cd04-4227-b783-40ca556928f7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c32551bd-cd04-4227-b783-40ca556928f7%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Thibaut\_Owczarz](https://avatars.discourse-cdn.com/v4/letter/t/46a35a/32.png) [@Thibaut\_Owczarz](https://discuss.elastic.co/u/Thibaut_Owczarz)\
**Post date:** [January 15, 2015, 2:36pm UTC](https://discuss.elastic.co/t/need-help-for-search/21660/2 "2015-01-15T14:36:47Z")

</div>

i found my first error, no need user. because i search already in user.  
but why when i search a defined sku, no found only one ?

curl -XPOST '[http://localhost:9200/test\_fr/user/\_search](http://localhost:9200/test_fr/user/_search)' -d '{  
"query" : {  
"bool": {  
"must": ,  
"must\_not": ,  
"should": [  
{  
"term": {  
"sku": "01b3ae496c0142f993cf131c607fe003"  
}  
},  
{  
"term": {  
"internal\_code": "01b3ae496c0142f993cf131c607fe003"  
}  
},  
{  
"match": {  
"firstname": "01b3ae496c0142f993cf131c607fe003"  
}  
},  
{  
"match": {  
"lastname": "01b3ae496c0142f993cf131c607fe003"  
}  
},  
{  
"match": {  
"address": "01b3ae496c0142f993cf131c607fe003"  
}  
},  
{  
"match": {  
"city": "01b3ae496c0142f993cf131c607fe003"  
}  
},  
{  
"match": {  
"localized\_description":  
"01b3ae496c0142f993cf131c607fe003"  
}  
},  
{  
"match": {  
"localized\_keywords":  
"01b3ae496c0142f993cf131c607fe003"  
}  
},  
{  
"match": {  
"service.localized\_label":  
"01b3ae496c0142f993cf131c607fe003"  
}  
},  
{  
"match": {  
"medias.localized\_label":  
"01b3ae496c0142f993cf131c607fe003"  
}  
},  
{  
"match": {  
"services.localized\_label":  
"01b3ae496c0142f993cf131c607fe003"  
}  
}  
]  
}  
}  
}';

they return all my users.

Thanks

Le jeudi 15 janvier 2015 14:58:16 UTC+1, Thibaut Owczarz a écrit :

> Hello,  
> I start learning Elasticsearch, and i have a problem for understand how  
> search. anyone could help me?
> 
> My gist for all my structure and my data is here  
> [Help for Elasticsearch · GitHub](https://gist.github.com/thibaut1001/7a3000c3ff371be3a52d)
> 
> My problem is just in 4part  
> To search in multi field by data like this
> 
> ## We need to search henry in field selected
> 
> curl -XPOST '[http://localhost:9200/test\_fr/user/\_search](http://localhost:9200/test_fr/user/_search)' -d '{  
> "query" : {  
> "bool": {  
> "must": ,  
> "must\_not": ,  
> "should": [  
> {  
> "term": {  
> "user.sku": "henry"  
> }  
> },  
> {  
> "term": {  
> "user.internal\_code": "henry"  
> }  
> },  
> {  
> "term": {  
> "user.firstname": "henry"  
> }  
> },  
> {  
> "term": {  
> "user.lastname": "henry"  
> }  
> },  
> {  
> "term": {  
> "user.address": "henry"  
> }  
> },  
> {  
> "term": {  
> "user.city": "henry"  
> }  
> },  
> {  
> "term": {  
> "user.localized\_description": "henry"  
> }  
> },  
> {  
> "term": {  
> "user.localized\_keywords": "henry"  
> }  
> },  
> {  
> "term": {  
> "user.service.localized\_label": "henry"  
> }  
> },  
> {  
> "term": {  
> "user.medias.localized\_label": "henry"  
> }  
> },  
> {  
> "term": {  
> "user.services.localized\_label": "henry"  
> }  
> }  
> ]  
> }  
> }  
> }';
> 
> ## Return no results Why?
> 
> I have many question.  
> Could you help me please,  
> thanks

--  
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/2ced6dc5-fa42-43bd-81bf-99ce4f7bedb5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2ced6dc5-fa42-43bd-81bf-99ce4f7bedb5%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [January 15, 2015, 2:49pm UTC](https://discuss.elastic.co/t/need-help-for-search/21660/3 "2015-01-15T14:49:34Z")

</div>

I guess it's most likely because you added all your filters in should clause instead of must?

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

> Le 15 janv. 2015 à 15:36, Thibaut Owczarz [thibaut@1001pharmacies.com](mailto:thibaut@1001pharmacies.com) a écrit :
> 
> i found my first error, no need user. because i search already in user.  
> but why when i search a defined sku, no found only one ?
> 
> curl -XPOST '[http://localhost:9200/test\_fr/user/\_search](http://localhost:9200/test_fr/user/_search)' -d '{  
> "query" : {  
> "bool": {  
> "must": ,  
> "must\_not": ,  
> "should": [  
> {  
> "term": {  
> "sku": "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "term": {  
> "internal\_code": "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "firstname": "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "lastname": "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "address": "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "city": "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "localized\_description": "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "localized\_keywords": "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "service.localized\_label": "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "medias.localized\_label": "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "services.localized\_label": "01b3ae496c0142f993cf131c607fe003"  
> }  
> }  
> ]  
> }  
> }  
> }';
> 
> they return all my users.
> 
> Thanks
> 
> Le jeudi 15 janvier 2015 14:58:16 UTC+1, Thibaut Owczarz a écrit :
> 
> > Hello,  
> > I start learning Elasticsearch, and i have a problem for understand how search. anyone could help me?
> > 
> > My gist for all my structure and my data is here  
> > [Help for Elasticsearch · GitHub](https://gist.github.com/thibaut1001/7a3000c3ff371be3a52d)
> > 
> > My problem is just in 4part  
> > To search in multi field by data like this
> > 
> > ## We need to search henry in field selected
> > 
> > curl -XPOST '[http://localhost:9200/test\_fr/user/\_search](http://localhost:9200/test_fr/user/_search)' -d '{  
> > "query" : {  
> > "bool": {  
> > "must": ,  
> > "must\_not": ,  
> > "should": [  
> > {  
> > "term": {  
> > "user.sku": "henry"  
> > }  
> > },  
> > {  
> > "term": {  
> > "user.internal\_code": "henry"  
> > }  
> > },  
> > {  
> > "term": {  
> > "user.firstname": "henry"  
> > }  
> > },  
> > {  
> > "term": {  
> > "user.lastname": "henry"  
> > }  
> > },  
> > {  
> > "term": {  
> > "user.address": "henry"  
> > }  
> > },  
> > {  
> > "term": {  
> > "user.city": "henry"  
> > }  
> > },  
> > {  
> > "term": {  
> > "user.localized\_description": "henry"  
> > }  
> > },  
> > {  
> > "term": {  
> > "user.localized\_keywords": "henry"  
> > }  
> > },  
> > {  
> > "term": {  
> > "user.service.localized\_label": "henry"  
> > }  
> > },  
> > {  
> > "term": {  
> > "user.medias.localized\_label": "henry"  
> > }  
> > },  
> > {  
> > "term": {  
> > "user.services.localized\_label": "henry"  
> > }  
> > }  
> > ]  
> > }  
> > }  
> > }';
> > 
> > ## Return no results Why?
> > 
> > I have many question.  
> > Could you help me please,  
> > thanks
> 
> --  
> 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/2ced6dc5-fa42-43bd-81bf-99ce4f7bedb5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2ced6dc5-fa42-43bd-81bf-99ce4f7bedb5%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/D2E34C22-B69E-43AD-A1FD-4773B9C6F35C%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/D2E34C22-B69E-43AD-A1FD-4773B9C6F35C%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Thibaut\_Owczarz](https://avatars.discourse-cdn.com/v4/letter/t/46a35a/32.png) [@Thibaut\_Owczarz](https://discuss.elastic.co/u/Thibaut_Owczarz)\
**Post date:** [January 15, 2015, 3:01pm UTC](https://discuss.elastic.co/t/need-help-for-search/21660/4 "2015-01-15T15:01:08Z")

</div>

i'm ok, but my data search no say if is sku or code\_internal or other field.

if i do that, it's ok  
{  
"query": {  
"bool": {  
"must": [  
{  
"term": {  
"sku": "01b3ae496c0142f993cf131c607fe003"  
}  
}  
],  
"must\_not": ,  
"should": [  
{

```
                "term": {
                   "internal_code": "01b3ae496c0142f993cf131c607fe003"
                }
 },

    {
      "match": {
        "firstname": "01b3ae496c0142f993cf131c607fe003"
      }
    },
    {
      "match": {
        "lastname": "01b3ae496c0142f993cf131c607fe003"
      }
    },
    {
      "match": {
        "address": "01b3ae496c0142f993cf131c607fe003"
      }
    },
    {
      "match": {
        "city": "01b3ae496c0142f993cf131c607fe003"
      }
    },
    {
      "match": {
        "localized_description": "01b3ae496c0142f993cf131c607fe003"
      }
    },
    {
      "match": {
        "localized_keywords": "01b3ae496c0142f993cf131c607fe003"
      }
    },
    {
      "match": {
        "service.localized_label": "01b3ae496c0142f993cf131c607fe003"
      }
    },
    {
      "match": {
        "medias.localized_label": "01b3ae496c0142f993cf131c607fe003"
      }
    },
    {
      "match": {
        "services.localized_label": "01b3ae496c0142f993cf131c607fe003"
      }
    }
  ]
}

```

}  
}

but if now i search with internal\_code  
{  
"query": {  
"bool": {  
"must": [  
{  
"term": {  
"sku": "3401598272746"  
}  
}  
],  
"must\_not": ,  
"should": [  
{

```
                "term": {
                   "internal_code": "3401598272746"

                }
 },

    {
      "match": {
        "firstname": "3401598272746"
      }
    },
    {
      "match": {
        "lastname": "3401598272746"
      }
    },
    {
      "match": {
        "address": "3401598272746"
      }
    },
    {
      "match": {
        "city": "3401598272746"
      }
    },
    {
      "match": {
        "localized_description": "3401598272746"
      }
    },
    {
      "match": {
        "localized_keywords": "3401598272746"
      }
    },
    {
      "match": {
        "service.localized_label": "3401598272746"
      }
    },
    {
      "match": {
        "medias.localized_label": "3401598272746"
      }
    },
    {
      "match": {
        "services.localized_label": "3401598272746"
      }
    }
  ]
}

```

}  
}  
my request is bad

Le jeudi 15 janvier 2015 15:49:56 UTC+1, David Pilato a écrit :

> I guess it's most likely because you added all your filters in should  
> clause instead of must?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 15 janv. 2015 à 15:36, Thibaut Owczarz \<[thi...@1001pharmacies.com](mailto:thi...@1001pharmacies.com)  
> \<javascript:\>\> a écrit :
> 
> i found my first error, no need user. because i search already in user.  
> but why when i search a defined sku, no found only one ?
> 
> curl -XPOST '[http://localhost:9200/test\_fr/user/\_search](http://localhost:9200/test_fr/user/_search)' -d '{  
> "query" : {  
> "bool": {  
> "must": ,  
> "must\_not": ,  
> "should": [  
> {  
> "term": {  
> "sku": "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "term": {  
> "internal\_code": "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "firstname": "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "lastname": "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "address": "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "city": "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "localized\_description":  
> "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "localized\_keywords":  
> "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "service.localized\_label":  
> "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "medias.localized\_label":  
> "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "services.localized\_label":  
> "01b3ae496c0142f993cf131c607fe003"  
> }  
> }  
> ]  
> }  
> }  
> }';
> 
> they return all my users.
> 
> Thanks
> 
> Le jeudi 15 janvier 2015 14:58:16 UTC+1, Thibaut Owczarz a écrit :
> 
> > Hello,  
> > I start learning Elasticsearch, and i have a problem for understand how  
> > search. anyone could help me?
> > 
> > My gist for all my structure and my data is here  
> > [Help for Elasticsearch · GitHub](https://gist.github.com/thibaut1001/7a3000c3ff371be3a52d)
> > 
> > My problem is just in 4part  
> > To search in multi field by data like this
> > 
> > ## We need to search henry in field selected
> > 
> > curl -XPOST '[http://localhost:9200/test\_fr/user/\_search](http://localhost:9200/test_fr/user/_search)' -d '{  
> > "query" : {  
> > "bool": {  
> > "must": ,  
> > "must\_not": ,  
> > "should": [  
> > {  
> > "term": {  
> > "user.sku": "henry"  
> > }  
> > },  
> > {  
> > "term": {  
> > "user.internal\_code": "henry"  
> > }  
> > },  
> > {  
> > "term": {  
> > "user.firstname": "henry"  
> > }  
> > },  
> > {  
> > "term": {  
> > "user.lastname": "henry"  
> > }  
> > },  
> > {  
> > "term": {  
> > "user.address": "henry"  
> > }  
> > },  
> > {  
> > "term": {  
> > "user.city": "henry"  
> > }  
> > },  
> > {  
> > "term": {  
> > "user.localized\_description": "henry"  
> > }  
> > },  
> > {  
> > "term": {  
> > "user.localized\_keywords": "henry"  
> > }  
> > },  
> > {  
> > "term": {  
> > "user.service.localized\_label": "henry"  
> > }  
> > },  
> > {  
> > "term": {  
> > "user.medias.localized\_label": "henry"  
> > }  
> > },  
> > {  
> > "term": {  
> > "user.services.localized\_label": "henry"  
> > }  
> > }  
> > ]  
> > }  
> > }  
> > }';
> > 
> > ## Return no results Why?
> > 
> > I have many question.  
> > Could you help me please,  
> > thanks
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/2ced6dc5-fa42-43bd-81bf-99ce4f7bedb5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2ced6dc5-fa42-43bd-81bf-99ce4f7bedb5%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/2ced6dc5-fa42-43bd-81bf-99ce4f7bedb5%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/2ced6dc5-fa42-43bd-81bf-99ce4f7bedb5%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/ada83459-b492-4cff-b0e6-b574b7a47359%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ada83459-b492-4cff-b0e6-b574b7a47359%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [January 15, 2015, 3:16pm UTC](https://discuss.elastic.co/t/need-help-for-search/21660/5 "2015-01-15T15:16:25Z")

</div>

Could you reproduce this with a full test case so we understand exactly What you are doing?  
May be simplify your test.

See [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://elasticsearch.org/help)

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

> Le 15 janv. 2015 à 16:01, Thibaut Owczarz [thibaut@1001pharmacies.com](mailto:thibaut@1001pharmacies.com) a écrit :
> 
> i'm ok, but my data search no say if is sku or code\_internal or other field.
> 
> if i do that, it's ok  
> {  
> "query": {  
> "bool": {  
> "must": [  
> {  
> "term": {  
> "sku": "01b3ae496c0142f993cf131c607fe003"  
> }  
> }  
> ],  
> "must\_not": ,  
> "should": [  
> {
> 
> > ```
> > "term": {
> > "internal_code": "01b3ae496c0142f993cf131c607fe003"
> > }
> > },
> > 
> > ```
> 
> ```
> {
> "match": {
> "firstname": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> {
> "match": {
> "lastname": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> {
> "match": {
> "address": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> {
> "match": {
> "city": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> {
> "match": {
> "localized_description": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> {
> "match": {
> "localized_keywords": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> {
> "match": {
> "service.localized_label": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> {
> "match": {
> "medias.localized_label": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> {
> "match": {
> "services.localized_label": "01b3ae496c0142f993cf131c607fe003"
> }
> }
> ]
> }
> 
> ```
> 
> }  
> }
> 
> but if now i search with internal\_code  
> {  
> "query": {  
> "bool": {  
> "must": [  
> {  
> "term": {  
> "sku": "3401598272746"  
> }  
> }  
> ],  
> "must\_not": ,  
> "should": [  
> {
> 
> > ```
> > "term": {
> > "internal_code": "3401598272746"
> > }
> > },
> > 
> > ```
> 
> ```
> {
> "match": {
> "firstname": "3401598272746"
> }
> },
> {
> "match": {
> "lastname": "3401598272746"
> }
> },
> {
> "match": {
> "address": "3401598272746"
> }
> },
> {
> "match": {
> "city": "3401598272746"
> }
> },
> {
> "match": {
> "localized_description": "3401598272746"
> }
> },
> {
> "match": {
> "localized_keywords": "3401598272746"
> }
> },
> {
> "match": {
> "service.localized_label": "3401598272746"
> }
> },
> {
> "match": {
> "medias.localized_label": "3401598272746"
> }
> },
> {
> "match": {
> "services.localized_label": "3401598272746"
> }
> }
> ]
> }
> 
> ```
> 
> }  
> }  
> my request is bad
> 
> Le jeudi 15 janvier 2015 15:49:56 UTC+1, David Pilato a écrit :
> 
> > I guess it's most likely because you added all your filters in should clause instead of must?
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > > Le 15 janv. 2015 à 15:36, Thibaut Owczarz [thi...@1001pharmacies.com](mailto:thi...@1001pharmacies.com) a écrit :
> > > 
> > > i found my first error, no need user. because i search already in user.  
> > > but why when i search a defined sku, no found only one ?
> > > 
> > > curl -XPOST '[http://localhost:9200/test\_fr/user/\_search](http://localhost:9200/test_fr/user/_search)' -d '{  
> > > "query" : {  
> > > "bool": {  
> > > "must": ,  
> > > "must\_not": ,  
> > > "should": [  
> > > {  
> > > "term": {  
> > > "sku": "01b3ae496c0142f993cf131c607fe003"  
> > > }  
> > > },  
> > > {  
> > > "term": {  
> > > "internal\_code": "01b3ae496c0142f993cf131c607fe003"  
> > > }  
> > > },  
> > > {  
> > > "match": {  
> > > "firstname": "01b3ae496c0142f993cf131c607fe003"  
> > > }  
> > > },  
> > > {  
> > > "match": {  
> > > "lastname": "01b3ae496c0142f993cf131c607fe003"  
> > > }  
> > > },  
> > > {  
> > > "match": {  
> > > "address": "01b3ae496c0142f993cf131c607fe003"  
> > > }  
> > > },  
> > > {  
> > > "match": {  
> > > "city": "01b3ae496c0142f993cf131c607fe003"  
> > > }  
> > > },  
> > > {  
> > > "match": {  
> > > "localized\_description": "01b3ae496c0142f993cf131c607fe003"  
> > > }  
> > > },  
> > > {  
> > > "match": {  
> > > "localized\_keywords": "01b3ae496c0142f993cf131c607fe003"  
> > > }  
> > > },  
> > > {  
> > > "match": {  
> > > "service.localized\_label": "01b3ae496c0142f993cf131c607fe003"  
> > > }  
> > > },  
> > > {  
> > > "match": {  
> > > "medias.localized\_label": "01b3ae496c0142f993cf131c607fe003"  
> > > }  
> > > },  
> > > {  
> > > "match": {  
> > > "services.localized\_label": "01b3ae496c0142f993cf131c607fe003"  
> > > }  
> > > }  
> > > ]  
> > > }  
> > > }  
> > > }';
> > > 
> > > they return all my users.
> > > 
> > > Thanks
> > > 
> > > Le jeudi 15 janvier 2015 14:58:16 UTC+1, Thibaut Owczarz a écrit :
> > > 
> > > > Hello,  
> > > > I start learning Elasticsearch, and i have a problem for understand how search. anyone could help me?
> > > > 
> > > > My gist for all my structure and my data is here  
> > > > [Help for Elasticsearch · GitHub](https://gist.github.com/thibaut1001/7a3000c3ff371be3a52d)
> > > > 
> > > > My problem is just in 4part  
> > > > To search in multi field by data like this
> > > > 
> > > > ## We need to search henry in field selected
> > > > 
> > > > curl -XPOST '[http://localhost:9200/test\_fr/user/\_search](http://localhost:9200/test_fr/user/_search)' -d '{  
> > > > "query" : {  
> > > > "bool": {  
> > > > "must": ,  
> > > > "must\_not": ,  
> > > > "should": [  
> > > > {  
> > > > "term": {  
> > > > "user.sku": "henry"  
> > > > }  
> > > > },  
> > > > {  
> > > > "term": {  
> > > > "user.internal\_code": "henry"  
> > > > }  
> > > > },  
> > > > {  
> > > > "term": {  
> > > > "user.firstname": "henry"  
> > > > }  
> > > > },  
> > > > {  
> > > > "term": {  
> > > > "user.lastname": "henry"  
> > > > }  
> > > > },  
> > > > {  
> > > > "term": {  
> > > > "user.address": "henry"  
> > > > }  
> > > > },  
> > > > {  
> > > > "term": {  
> > > > "user.city": "henry"  
> > > > }  
> > > > },  
> > > > {  
> > > > "term": {  
> > > > "user.localized\_description": "henry"  
> > > > }  
> > > > },  
> > > > {  
> > > > "term": {  
> > > > "user.localized\_keywords": "henry"  
> > > > }  
> > > > },  
> > > > {  
> > > > "term": {  
> > > > "user.service.localized\_label": "henry"  
> > > > }  
> > > > },  
> > > > {  
> > > > "term": {  
> > > > "user.medias.localized\_label": "henry"  
> > > > }  
> > > > },  
> > > > {  
> > > > "term": {  
> > > > "user.services.localized\_label": "henry"  
> > > > }  
> > > > }  
> > > > ]  
> > > > }  
> > > > }  
> > > > }';
> > > > 
> > > > ## Return no results Why?
> > > > 
> > > > I have many question.  
> > > > Could you help me please,  
> > > > thanks
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/2ced6dc5-fa42-43bd-81bf-99ce4f7bedb5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2ced6dc5-fa42-43bd-81bf-99ce4f7bedb5%40googlegroups.com).  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> 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/ada83459-b492-4cff-b0e6-b574b7a47359%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ada83459-b492-4cff-b0e6-b574b7a47359%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/2AD2CE04-D53C-4275-A039-D9275507B418%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/2AD2CE04-D53C-4275-A039-D9275507B418%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Thibaut\_Owczarz](https://avatars.discourse-cdn.com/v4/letter/t/46a35a/32.png) [@Thibaut\_Owczarz](https://discuss.elastic.co/u/Thibaut_Owczarz)\
**Post date:** [January 15, 2015, 4:13pm UTC](https://discuss.elastic.co/t/need-help-for-search/21660/6 "2015-01-15T16:13:12Z")

</div>

hi,

in my structure send in my gist,  
my question is just that:

i have a search field. no say what i type in this field.  
but i need 1 request like this.  
{  
"query" : {  
"bool": {  
"must": ,  
"must\_not": ,  
"should": [  
{  
"term": {  
"sku": $datasearch  
}  
},  
{  
"term": {  
"internal\_code": $datasearch  
}  
},  
{  
"match": {  
"firstname": $datasearch  
}  
},  
{  
"match": {  
"lastname": $datasearch  
}  
},  
{  
"match": {  
"address": $datasearch  
}  
},  
{  
"match": {  
"city": $datasearch  
}  
},  
{  
"match": {  
"localized\_description": $datasearch  
}  
},  
{  
"match": {  
"localized\_keywords": $datasearch  
}  
},  
{  
"match": {  
"service.localized\_label": $datasearch  
}  
},  
{  
"match": {  
"medias.localized\_label": $datasearch  
}  
},  
{  
"match": {  
"services.localized\_label": $datasearch  
}  
}  
]  
}  
}  
}';

## Exemple :

- if $datasearch=sku, i have directly 1 user with this sku

- if $datasearch=firstname, i have directly a list of user who have this  
firstname

- if $datasearch=keyword, i have list of user who have this keyword

- i take term for sku or internal\_code because i can't search whith partial  
of this. (if my sku = 1234, no could found result if i type 123)

- And for finish, in my data i have user :  
[1 - charles martin who have localized\_keywords="moto, licorne, cheval,  
course" ]  
[2 - henry martin who have localized\_keywords="pétanque, chevaux, basket,  
parieur"]  
i want with my request have this 2 user if $datasearch = cheval.

I hope to be me understand , I can have a bad English

thanks

Le jeudi 15 janvier 2015 16:17:08 UTC+1, David Pilato a écrit :

> Could you reproduce this with a full test case so we understand exactly  
> What you are doing?  
> May be simplify your test.
> 
> See [Elastic — The Search AI Company | Elastic](http://elasticsearch.org/help)
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 15 janv. 2015 à 16:01, Thibaut Owczarz \<[thi...@1001pharmacies.com](mailto:thi...@1001pharmacies.com)  
> \<javascript:\>\> a écrit :
> 
> i'm ok, but my data search no say if is sku or code\_internal or other  
> field.
> 
> if i do that, it's ok  
> {  
> "query": {  
> "bool": {  
> "must": [  
> {  
> "term": {  
> "sku": "01b3ae496c0142f993cf131c607fe003"  
> }  
> }  
> ],  
> "must\_not": ,  
> "should": [  
> {
> 
> ```
> "term": {
> "internal_code": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> 
> {
> "match": {
> "firstname": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> {
> "match": {
> "lastname": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> {
> "match": {
> "address": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> {
> "match": {
> "city": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> {
> "match": {
> "localized_description": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> {
> "match": {
> "localized_keywords": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> {
> "match": {
> "service.localized_label": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> {
> "match": {
> "medias.localized_label": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> {
> "match": {
> "services.localized_label": "01b3ae496c0142f993cf131c607fe003"
> }
> }
> ]
> }
> 
> ```
> 
> }  
> }
> 
> but if now i search with internal\_code  
> {  
> "query": {  
> "bool": {  
> "must": [  
> {  
> "term": {  
> "sku": "3401598272746"  
> }  
> }  
> ],  
> "must\_not": ,  
> "should": [  
> {
> 
> ```
> "term": {
> "internal_code": "3401598272746"
> 
> }
> },
> 
> {
> "match": {
> "firstname": "3401598272746"
> }
> },
> {
> "match": {
> "lastname": "3401598272746"
> }
> },
> {
> "match": {
> "address": "3401598272746"
> }
> },
> {
> "match": {
> "city": "3401598272746"
> }
> },
> {
> "match": {
> "localized_description": "3401598272746"
> }
> },
> {
> "match": {
> "localized_keywords": "3401598272746"
> }
> },
> {
> "match": {
> "service.localized_label": "3401598272746"
> }
> },
> {
> "match": {
> "medias.localized_label": "3401598272746"
> }
> },
> {
> "match": {
> "services.localized_label": "3401598272746"
> }
> }
> ]
> }
> 
> ```
> 
> }  
> }  
> my request is bad
> 
> Le jeudi 15 janvier 2015 15:49:56 UTC+1, David Pilato a écrit :
> 
> > I guess it's most likely because you added all your filters in should  
> > clause instead of must?
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 15 janv. 2015 à 15:36, Thibaut Owczarz [thi...@1001pharmacies.com](mailto:thi...@1001pharmacies.com) a  
> > écrit :
> > 
> > i found my first error, no need user. because i search already in user.  
> > but why when i search a defined sku, no found only one ?
> > 
> > curl -XPOST '[http://localhost:9200/test\_fr/user/\_search](http://localhost:9200/test_fr/user/_search)' -d '{  
> > "query" : {  
> > "bool": {  
> > "must": ,  
> > "must\_not": ,  
> > "should": [  
> > {  
> > "term": {  
> > "sku": "01b3ae496c0142f993cf131c607fe003"  
> > }  
> > },  
> > {  
> > "term": {  
> > "internal\_code": "01b3ae496c0142f993cf131c607fe003"  
> > }  
> > },  
> > {  
> > "match": {  
> > "firstname": "01b3ae496c0142f993cf131c607fe003"  
> > }  
> > },  
> > {  
> > "match": {  
> > "lastname": "01b3ae496c0142f993cf131c607fe003"  
> > }  
> > },  
> > {  
> > "match": {  
> > "address": "01b3ae496c0142f993cf131c607fe003"  
> > }  
> > },  
> > {  
> > "match": {  
> > "city": "01b3ae496c0142f993cf131c607fe003"  
> > }  
> > },  
> > {  
> > "match": {  
> > "localized\_description":  
> > "01b3ae496c0142f993cf131c607fe003"  
> > }  
> > },  
> > {  
> > "match": {  
> > "localized\_keywords":  
> > "01b3ae496c0142f993cf131c607fe003"  
> > }  
> > },  
> > {  
> > "match": {  
> > "service.localized\_label":  
> > "01b3ae496c0142f993cf131c607fe003"  
> > }  
> > },  
> > {  
> > "match": {  
> > "medias.localized\_label":  
> > "01b3ae496c0142f993cf131c607fe003"  
> > }  
> > },  
> > {  
> > "match": {  
> > "services.localized\_label":  
> > "01b3ae496c0142f993cf131c607fe003"  
> > }  
> > }  
> > ]  
> > }  
> > }  
> > }';
> > 
> > they return all my users.
> > 
> > Thanks
> > 
> > Le jeudi 15 janvier 2015 14:58:16 UTC+1, Thibaut Owczarz a écrit :
> > 
> > > Hello,  
> > > I start learning Elasticsearch, and i have a problem for understand how  
> > > search. anyone could help me?
> > > 
> > > My gist for all my structure and my data is here  
> > > [Help for Elasticsearch · GitHub](https://gist.github.com/thibaut1001/7a3000c3ff371be3a52d)
> > > 
> > > My problem is just in 4part  
> > > To search in multi field by data like this
> > > 
> > > ## We need to search henry in field selected
> > > 
> > > curl -XPOST '[http://localhost:9200/test\_fr/user/\_search](http://localhost:9200/test_fr/user/_search)' -d '{  
> > > "query" : {  
> > > "bool": {  
> > > "must": ,  
> > > "must\_not": ,  
> > > "should": [  
> > > {  
> > > "term": {  
> > > "user.sku": "henry"  
> > > }  
> > > },  
> > > {  
> > > "term": {  
> > > "user.internal\_code": "henry"  
> > > }  
> > > },  
> > > {  
> > > "term": {  
> > > "user.firstname": "henry"  
> > > }  
> > > },  
> > > {  
> > > "term": {  
> > > "user.lastname": "henry"  
> > > }  
> > > },  
> > > {  
> > > "term": {  
> > > "user.address": "henry"  
> > > }  
> > > },  
> > > {  
> > > "term": {  
> > > "user.city": "henry"  
> > > }  
> > > },  
> > > {  
> > > "term": {  
> > > "user.localized\_description": "henry"  
> > > }  
> > > },  
> > > {  
> > > "term": {  
> > > "user.localized\_keywords": "henry"  
> > > }  
> > > },  
> > > {  
> > > "term": {  
> > > "user.service.localized\_label": "henry"  
> > > }  
> > > },  
> > > {  
> > > "term": {  
> > > "user.medias.localized\_label": "henry"  
> > > }  
> > > },  
> > > {  
> > > "term": {  
> > > "user.services.localized\_label": "henry"  
> > > }  
> > > }  
> > > ]  
> > > }  
> > > }  
> > > }';
> > > 
> > > ## Return no results Why?
> > > 
> > > I have many question.  
> > > Could you help me please,  
> > > thanks
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/2ced6dc5-fa42-43bd-81bf-99ce4f7bedb5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2ced6dc5-fa42-43bd-81bf-99ce4f7bedb5%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/2ced6dc5-fa42-43bd-81bf-99ce4f7bedb5%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/2ced6dc5-fa42-43bd-81bf-99ce4f7bedb5%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/ada83459-b492-4cff-b0e6-b574b7a47359%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ada83459-b492-4cff-b0e6-b574b7a47359%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/ada83459-b492-4cff-b0e6-b574b7a47359%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/ada83459-b492-4cff-b0e6-b574b7a47359%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/13445ad0-a7fd-4c2b-b154-7863a61a469a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/13445ad0-a7fd-4c2b-b154-7863a61a469a%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [January 15, 2015, 4:31pm UTC](https://discuss.elastic.co/t/need-help-for-search/21660/7 "2015-01-15T16:31:18Z")

</div>

No worries for your english.  
Sorry. I missed your gist.

Based on your examples, it sounds like you are french. Are you aware of the french mailing list? [Rediriger vers Google&nbsp;Groupes](https://groups.google.com/forum/?hl=fr&fromgroups#!forum/elasticsearch-fr) [https://groups.google.com/forum/?hl=fr&fromgroups#!forum/elasticsearch-fr](https://groups.google.com/forum/?hl=fr&fromgroups#!forum/elasticsearch-fr)

It would help a lot if you can simplify with some sample data and small queries what you are trying to do what does not work.  
So suppress all analyzers as I guess here it’s not really your concern at this stage.  
Try with only two or 3 fields.

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)

> Le 15 janv. 2015 à 17:13, Thibaut Owczarz [thibaut@1001pharmacies.com](mailto:thibaut@1001pharmacies.com) a écrit :
> 
> hi,
> 
> in my structure send in my gist,  
> my question is just that:
> 
> i have a search field. no say what i type in this field.  
> but i need 1 request like this.  
> {  
> "query" : {  
> "bool": {  
> "must": ,  
> "must\_not": ,  
> "should": [  
> {  
> "term": {  
> "sku": $datasearch  
> }  
> },  
> {  
> "term": {  
> "internal\_code": $datasearch  
> }  
> },  
> {  
> "match": {  
> "firstname": $datasearch  
> }  
> },  
> {  
> "match": {  
> "lastname": $datasearch  
> }  
> },  
> {  
> "match": {  
> "address": $datasearch  
> }  
> },  
> {  
> "match": {  
> "city": $datasearch  
> }  
> },  
> {  
> "match": {  
> "localized\_description": $datasearch  
> }  
> },  
> {  
> "match": {  
> "localized\_keywords": $datasearch  
> }  
> },  
> {  
> "match": {  
> "service.localized\_label": $datasearch  
> }  
> },  
> {  
> "match": {  
> "medias.localized\_label": $datasearch  
> }  
> },  
> {  
> "match": {  
> "services.localized\_label": $datasearch  
> }  
> }  
> ]  
> }  
> }  
> }';
> 
> ## Exemple :
> 
> - if $datasearch=sku, i have directly 1 user with this sku
> 
> - if $datasearch=firstname, i have directly a list of user who have this firstname
> 
> - if $datasearch=keyword, i have list of user who have this keyword
> 
> - i take term for sku or internal\_code because i can't search whith partial of this. (if my sku = 1234, no could found result if i type 123)
> 
> - And for finish, in my data i have user :  
> [1 - charles martin who have localized\_keywords="moto, licorne, cheval, course"]  
> [2 - henry martin who have localized\_keywords="pétanque, chevaux, basket, parieur"]  
> i want with my request have this 2 user if $datasearch = cheval.
> 
> I hope to be me understand , I can have a bad English
> 
> thanks
> 
> Le jeudi 15 janvier 2015 16:17:08 UTC+1, David Pilato a écrit :  
> Could you reproduce this with a full test case so we understand exactly What you are doing?  
> May be simplify your test.
> 
> See [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://elasticsearch.org/help) [http://elasticsearch.org/help](http://elasticsearch.org/help)
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 15 janv. 2015 à 16:01, Thibaut Owczarz \<[thi...@1001pharmacies.com](mailto:thi...@1001pharmacies.com) \<javascript:\>\> a écrit :
> 
> > i'm ok, but my data search no say if is sku or code\_internal or other field.
> > 
> > if i do that, it's ok  
> > {  
> > "query": {  
> > "bool": {  
> > "must": [  
> > {  
> > "term": {  
> > "sku": "01b3ae496c0142f993cf131c607fe003"  
> > }  
> > }  
> > ],  
> > "must\_not": ,  
> > "should": [  
> > {
> > 
> > > ```
> > > "term": {
> > > "internal_code": "01b3ae496c0142f993cf131c607fe003"
> > > }
> > > },
> > > 
> > > ```
> > 
> > ```
> > {
> > "match": {
> > "firstname": "01b3ae496c0142f993cf131c607fe003"
> > }
> > },
> > {
> > "match": {
> > "lastname": "01b3ae496c0142f993cf131c607fe003"
> > }
> > },
> > {
> > "match": {
> > "address": "01b3ae496c0142f993cf131c607fe003"
> > }
> > },
> > {
> > "match": {
> > "city": "01b3ae496c0142f993cf131c607fe003"
> > }
> > },
> > {
> > "match": {
> > "localized_description": "01b3ae496c0142f993cf131c607fe003"
> > }
> > },
> > {
> > "match": {
> > "localized_keywords": "01b3ae496c0142f993cf131c607fe003"
> > }
> > },
> > {
> > "match": {
> > "service.localized_label": "01b3ae496c0142f993cf131c607fe003"
> > }
> > },
> > {
> > "match": {
> > "medias.localized_label": "01b3ae496c0142f993cf131c607fe003"
> > }
> > },
> > {
> > "match": {
> > "services.localized_label": "01b3ae496c0142f993cf131c607fe003"
> > }
> > }
> > ]
> > }
> > 
> > ```
> > 
> > }  
> > }
> > 
> > but if now i search with internal\_code  
> > {  
> > "query": {  
> > "bool": {  
> > "must": [  
> > {  
> > "term": {  
> > "sku": "3401598272746"  
> > }  
> > }  
> > ],  
> > "must\_not": ,  
> > "should": [  
> > {
> > 
> > > ```
> > > "term": {
> > > "internal_code": "3401598272746"
> > > }
> > > },
> > > 
> > > ```
> > 
> > ```
> > {
> > "match": {
> > "firstname": "3401598272746"
> > }
> > },
> > {
> > "match": {
> > "lastname": "3401598272746"
> > }
> > },
> > {
> > "match": {
> > "address": "3401598272746"
> > }
> > },
> > {
> > "match": {
> > "city": "3401598272746"
> > }
> > },
> > {
> > "match": {
> > "localized_description": "3401598272746"
> > }
> > },
> > {
> > "match": {
> > "localized_keywords": "3401598272746"
> > }
> > },
> > {
> > "match": {
> > "service.localized_label": "3401598272746"
> > }
> > },
> > {
> > "match": {
> > "medias.localized_label": "3401598272746"
> > }
> > },
> > {
> > "match": {
> > "services.localized_label": "3401598272746"
> > }
> > }
> > ]
> > }
> > 
> > ```
> > 
> > }  
> > }  
> > my request is bad
> > 
> > Le jeudi 15 janvier 2015 15:49:56 UTC+1, David Pilato a écrit :  
> > I guess it's most likely because you added all your filters in should clause instead of must?
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 15 janv. 2015 à 15:36, Thibaut Owczarz \<[thi...@1001pharmacies.com](mailto:thi...@1001pharmacies.com) \<\>\> a écrit :
> > 
> > > i found my first error, no need user. because i search already in user.  
> > > but why when i search a defined sku, no found only one ?
> > > 
> > > curl -XPOST '[http://localhost:9200/test\_fr/user/\_search](http://localhost:9200/test_fr/user/_search)' [http://localhost:9200/test\_fr/user/\_search'](http://localhost:9200/test_fr/user/_search') -d '{  
> > > "query" : {  
> > > "bool": {  
> > > "must": ,  
> > > "must\_not": ,  
> > > "should": [  
> > > {  
> > > "term": {  
> > > "sku": "01b3ae496c0142f993cf131c607fe003"  
> > > }  
> > > },  
> > > {  
> > > "term": {  
> > > "internal\_code": "01b3ae496c0142f993cf131c607fe003"  
> > > }  
> > > },  
> > > {  
> > > "match": {  
> > > "firstname": "01b3ae496c0142f993cf131c607fe003"  
> > > }  
> > > },  
> > > {  
> > > "match": {  
> > > "lastname": "01b3ae496c0142f993cf131c607fe003"  
> > > }  
> > > },  
> > > {  
> > > "match": {  
> > > "address": "01b3ae496c0142f993cf131c607fe003"  
> > > }  
> > > },  
> > > {  
> > > "match": {  
> > > "city": "01b3ae496c0142f993cf131c607fe003"  
> > > }  
> > > },  
> > > {  
> > > "match": {  
> > > "localized\_description": "01b3ae496c0142f993cf131c607fe003"  
> > > }  
> > > },  
> > > {  
> > > "match": {  
> > > "localized\_keywords": "01b3ae496c0142f993cf131c607fe003"  
> > > }  
> > > },  
> > > {  
> > > "match": {  
> > > "service.localized\_label": "01b3ae496c0142f993cf131c607fe003"  
> > > }  
> > > },  
> > > {  
> > > "match": {  
> > > "medias.localized\_label": "01b3ae496c0142f993cf131c607fe003"  
> > > }  
> > > },  
> > > {  
> > > "match": {  
> > > "services.localized\_label": "01b3ae496c0142f993cf131c607fe003"  
> > > }  
> > > }  
> > > ]  
> > > }  
> > > }  
> > > }';
> > > 
> > > they return all my users.
> > > 
> > > Thanks
> > > 
> > > Le jeudi 15 janvier 2015 14:58:16 UTC+1, Thibaut Owczarz a écrit :  
> > > Hello,  
> > > I start learning Elasticsearch, and i have a problem for understand how search. anyone could help me?
> > > 
> > > My gist for all my structure and my data is here  
> > > [Help for Elasticsearch · GitHub](https://gist.github.com/thibaut1001/7a3000c3ff371be3a52d) [https://gist.github.com/thibaut1001/7a3000c3ff371be3a52d](https://gist.github.com/thibaut1001/7a3000c3ff371be3a52d)
> > > 
> > > My problem is just in 4part  
> > > To search in multi field by data like this
> > > 
> > > ## We need to search henry in field selected
> > > 
> > > curl -XPOST '[http://localhost:9200/test\_fr/user/\_search](http://localhost:9200/test_fr/user/_search) [http://localhost:9200/test\_fr/user/\_search](http://localhost:9200/test_fr/user/_search)' -d '{  
> > > "query" : {  
> > > "bool": {  
> > > "must": ,  
> > > "must\_not": ,  
> > > "should": [  
> > > {  
> > > "term": {  
> > > "user.sku": "henry"  
> > > }  
> > > },  
> > > {  
> > > "term": {  
> > > "user.internal\_code": "henry"  
> > > }  
> > > },  
> > > {  
> > > "term": {  
> > > "user.firstname": "henry"  
> > > }  
> > > },  
> > > {  
> > > "term": {  
> > > "user.lastname": "henry"  
> > > }  
> > > },  
> > > {  
> > > "term": {  
> > > "user.address": "henry"  
> > > }  
> > > },  
> > > {  
> > > "term": {  
> > > "user.city": "henry"  
> > > }  
> > > },  
> > > {  
> > > "term": {  
> > > "user.localized\_description": "henry"  
> > > }  
> > > },  
> > > {  
> > > "term": {  
> > > "user.localized\_keywords": "henry"  
> > > }  
> > > },  
> > > {  
> > > "term": {  
> > > "user.service.localized\_label": "henry"  
> > > }  
> > > },  
> > > {  
> > > "term": {  
> > > "user.medias.localized\_label": "henry"  
> > > }  
> > > },  
> > > {  
> > > "term": {  
> > > "user.services.localized\_label": "henry"  
> > > }  
> > > }  
> > > ]  
> > > }  
> > > }  
> > > }';
> > > 
> > > ## Return no results Why?
> > > 
> > > I have many question.  
> > > Could you help me please,  
> > > thanks
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<\>.  
> > > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/2ced6dc5-fa42-43bd-81bf-99ce4f7bedb5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2ced6dc5-fa42-43bd-81bf-99ce4f7bedb5%40googlegroups.com) [https://groups.google.com/d/msgid/elasticsearch/2ced6dc5-fa42-43bd-81bf-99ce4f7bedb5%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/2ced6dc5-fa42-43bd-81bf-99ce4f7bedb5%40googlegroups.com?utm_medium=email&utm_source=footer).  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/ada83459-b492-4cff-b0e6-b574b7a47359%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ada83459-b492-4cff-b0e6-b574b7a47359%40googlegroups.com) [https://groups.google.com/d/msgid/elasticsearch/ada83459-b492-4cff-b0e6-b574b7a47359%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/ada83459-b492-4cff-b0e6-b574b7a47359%40googlegroups.com?utm_medium=email&utm_source=footer).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> 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) [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/13445ad0-a7fd-4c2b-b154-7863a61a469a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/13445ad0-a7fd-4c2b-b154-7863a61a469a%40googlegroups.com) [https://groups.google.com/d/msgid/elasticsearch/13445ad0-a7fd-4c2b-b154-7863a61a469a%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/13445ad0-a7fd-4c2b-b154-7863a61a469a%40googlegroups.com?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/8D8BA117-372C-4073-9CDA-568ABB92C279%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/8D8BA117-372C-4073-9CDA-568ABB92C279%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Thibaut\_Owczarz](https://avatars.discourse-cdn.com/v4/letter/t/46a35a/32.png) [@Thibaut\_Owczarz](https://discuss.elastic.co/u/Thibaut_Owczarz)\
**Post date:** [January 15, 2015, 4:36pm UTC](https://discuss.elastic.co/t/need-help-for-search/21660/8 "2015-01-15T16:36:27Z")

</div>

Thanks for elastisearch-fr mailing list

tomorrow I do a little game simple data  
and I give the request that I want to do and the result i need

Thanks

Le jeudi 15 janvier 2015 17:31:28 UTC+1, David Pilato a écrit :

> No worries for your english.  
> Sorry. I missed your gist.
> 
> Based on your examples, it sounds like you are french. Are you aware of  
> the french mailing list?  
> [Rediriger vers Google&nbsp;Groupes](https://groups.google.com/forum/?hl=fr&fromgroups#!forum/elasticsearch-fr)
> 
> It would help a lot if you can simplify with some sample data and small  
> queries what you are trying to do what does not work.  
> So suppress all analyzers as I guess here it’s not really your concern at  
> this stage.  
> Try with only two or 3 fields.
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)  
> [http://Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr  
> [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs  
> [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)
> 
> Le 15 janv. 2015 à 17:13, Thibaut Owczarz \<[thi...@1001pharmacies.com](mailto:thi...@1001pharmacies.com)  
> \<javascript:\>\> a écrit :
> 
> hi,
> 
> in my structure send in my gist,  
> my question is just that:
> 
> i have a search field. no say what i type in this field.  
> but i need 1 request like this.  
> {  
> "query" : {  
> "bool": {  
> "must": ,  
> "must\_not": ,  
> "should": [  
> {  
> "term": {  
> "sku": $datasearch  
> }  
> },  
> {  
> "term": {  
> "internal\_code": $datasearch  
> }  
> },  
> {  
> "match": {  
> "firstname": $datasearch  
> }  
> },  
> {  
> "match": {  
> "lastname": $datasearch  
> }  
> },  
> {  
> "match": {  
> "address": $datasearch  
> }  
> },  
> {  
> "match": {  
> "city": $datasearch  
> }  
> },  
> {  
> "match": {  
> "localized\_description": $datasearch  
> }  
> },  
> {  
> "match": {  
> "localized\_keywords": $datasearch  
> }  
> },  
> {  
> "match": {  
> "service.localized\_label": $datasearch  
> }  
> },  
> {  
> "match": {  
> "medias.localized\_label": $datasearch  
> }  
> },  
> {  
> "match": {  
> "services.localized\_label": $datasearch  
> }  
> }  
> ]  
> }  
> }  
> }';
> 
> ## Exemple :
> 
> - if $datasearch=sku, i have directly 1 user with this sku
> 
> - if $datasearch=firstname, i have directly a list of user who have this  
> firstname
> 
> - if $datasearch=keyword, i have list of user who have this keyword
> 
> - i take term for sku or internal\_code because i can't search whith  
> partial of this. (if my sku = 1234, no could found result if i type 123)
> 
> - And for finish, in my data i have user :  
> [1 - charles martin who have localized\_keywords="moto, licorne, cheval,  
> course" ]  
> [2 - henry martin who have localized\_keywords="pétanque, chevaux, basket,  
> parieur"]  
> i want with my request have this 2 user if $datasearch = cheval.
> 
> I hope to be me understand , I can have a bad English
> 
> thanks
> 
> Le jeudi 15 janvier 2015 16:17:08 UTC+1, David Pilato a écrit :
> 
> Could you reproduce this with a full test case so we understand exactly  
> What you are doing?  
> May be simplify your test.
> 
> See [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://elasticsearch.org/help)
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 15 janv. 2015 à 16:01, Thibaut Owczarz [thi...@1001pharmacies.com](mailto:thi...@1001pharmacies.com) a  
> écrit :
> 
> i'm ok, but my data search no say if is sku or code\_internal or other  
> field.
> 
> if i do that, it's ok  
> {  
> "query": {  
> "bool": {  
> "must": [  
> {  
> "term": {  
> "sku": "01b3ae496c0142f993cf131c607fe003"  
> }  
> }  
> ],  
> "must\_not": ,  
> "should": [  
> {
> 
> ```
> "term": {
> "internal_code": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> 
> {
> "match": {
> "firstname": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> {
> "match": {
> "lastname": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> {
> "match": {
> "address": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> {
> "match": {
> "city": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> {
> "match": {
> "localized_description": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> {
> "match": {
> "localized_keywords": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> {
> "match": {
> "service.localized_label": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> {
> "match": {
> "medias.localized_label": "01b3ae496c0142f993cf131c607fe003"
> }
> },
> {
> "match": {
> "services.localized_label": "01b3ae496c0142f993cf131c607fe003"
> }
> }
> ]
> }
> 
> ```
> 
> }  
> }
> 
> but if now i search with internal\_code  
> {  
> "query": {  
> "bool": {  
> "must": [  
> {  
> "term": {  
> "sku": "3401598272746"  
> }  
> }  
> ],  
> "must\_not": ,  
> "should": [  
> {
> 
> ```
> "term": {
> "internal_code": "3401598272746"
> 
> }
> },
> 
> {
> "match": {
> "firstname": "3401598272746"
> }
> },
> {
> "match": {
> "lastname": "3401598272746"
> }
> },
> {
> "match": {
> "address": "3401598272746"
> }
> },
> {
> "match": {
> "city": "3401598272746"
> }
> },
> {
> "match": {
> "localized_description": "3401598272746"
> }
> },
> {
> "match": {
> "localized_keywords": "3401598272746"
> }
> },
> {
> "match": {
> "service.localized_label": "3401598272746"
> }
> },
> {
> "match": {
> "medias.localized_label": "3401598272746"
> }
> },
> {
> "match": {
> "services.localized_label": "3401598272746"
> }
> }
> ]
> }
> 
> ```
> 
> }  
> }  
> my request is bad
> 
> Le jeudi 15 janvier 2015 15:49:56 UTC+1, David Pilato a écrit :
> 
> I guess it's most likely because you added all your filters in should  
> clause instead of must?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 15 janv. 2015 à 15:36, Thibaut Owczarz [thi...@1001pharmacies.com](mailto:thi...@1001pharmacies.com) a  
> écrit :
> 
> i found my first error, no need user. because i search already in user.  
> but why when i search a defined sku, no found only one ?
> 
> curl -XPOST '[http://localhost:9200/test\_fr/user/\_search](http://localhost:9200/test_fr/user/_search)' -d '{  
> "query" : {  
> "bool": {  
> "must": ,  
> "must\_not": ,  
> "should": [  
> {  
> "term": {  
> "sku": "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "term": {  
> "internal\_code": "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "firstname": "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "lastname": "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "address": "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "city": "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "localized\_description":  
> "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "localized\_keywords":  
> "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "service.localized\_label":  
> "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "medias.localized\_label":  
> "01b3ae496c0142f993cf131c607fe003"  
> }  
> },  
> {  
> "match": {  
> "services.localized\_label":  
> "01b3ae496c0142f993cf131c607fe003"  
> }  
> }  
> ]  
> }  
> }  
> }';
> 
> they return all my users.
> 
> Thanks
> 
> Le jeudi 15 janvier 2015 14:58:16 UTC+1, Thibaut Owczarz a écrit :
> 
> Hello,  
> I start learning Elasticsearch, and i have a problem for understand how  
> search. anyone could help me?
> 
> My gist for all my structure and my data is here  
> [Help for Elasticsearch · GitHub](https://gist.github.com/thibaut1001/7a3000c3ff371be3a52d)
> 
> My problem is just in 4part  
> To search in multi field by data like this
> 
> ## We need to search henry in field selected
> 
> curl -XPOST '[http://localhost:9200/test\_fr/user/\_search](http://localhost:9200/test_fr/user/_search)' -d '{  
> "query" : {  
> "bool": {  
> "must": ,  
> "must\_not": ,  
> "should": [  
> {  
> "term": {  
> "user.sku": "henry"  
> }  
> },  
> {  
> "term": {  
> "user.internal\_code": "henry"  
> }  
> },  
> {  
> "term": {  
> "user.firstname": "henry"  
> }  
> },  
> {  
> "term": {  
> "user.lastname": "henry"  
> }  
> },  
> {  
> "term": {  
> "user.address": "henry"  
> }  
> },  
> {  
> "term": {  
> "user.city": "henry"  
> }  
> },  
> {  
> "term": {  
> "user.localized\_description": "henry"  
> }  
> },  
> {  
> "term": {  
> "user.localized\_keywords": "henry"  
> }  
> },  
> {  
> "term": {  
> "user.service.localized\_label": "henry"  
> }  
> },  
> {  
> "term": {  
> "user.medias.localized\_label": "henry"  
> }  
> },  
> {  
> "term": {  
> "user.services.localized\_label": "henry"  
> }  
> }  
> ]  
> }  
> }  
> }';
> 
> ## Return no results Why?
> 
> I have many question.  
> Could you help me please,  
> thanks
> 
> --  
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/2ced6dc5-fa42-43bd-81bf-99ce4f7bedb5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2ced6dc5-fa42-43bd-81bf-99ce4f7bedb5%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/2ced6dc5-fa42-43bd-81bf-99ce4f7bedb5%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/2ced6dc5-fa42-43bd-81bf-99ce4f7bedb5%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> ...

--  
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/dc2101a2-b171-4ac7-b89f-bdb50865265a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/dc2101a2-b171-4ac7-b89f-bdb50865265a%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:38am UTC](https://discuss.elastic.co/t/need-help-for-search/21660/9 "2017-07-06T00:38:39Z")

</div>


