# Full search on a multiple fields request

**URL:** <https://discuss.elastic.co/t/full-search-on-a-multiple-fields-request/22315>\
**Category:** Elasticsearch\
**Created:** [February 22, 2015, 4:44pm UTC](https://discuss.elastic.co/t/full-search-on-a-multiple-fields-request/22315 "2015-02-22T16:44:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mahyar\_SEPEHR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mahyar_sepehr/32/886_2.png) [@Mahyar\_SEPEHR](https://discuss.elastic.co/u/Mahyar_SEPEHR)\
**Post date:** [February 22, 2015, 4:44pm UTC](https://discuss.elastic.co/t/full-search-on-a-multiple-fields-request/22315/1 "2015-02-22T16:44:10Z")

</div>

Hi,

I have a problem with a fullsearch using several columns in a index.  
I've tested it in few versions 1.1.x \< EL \< 1.3.x

Preparation:  
(curl -XDELETE '[http://localhost:9200/index1](http://localhost:9200/index1)'😉

curl -XPUT '[http://localhost:9200/index1](http://localhost:9200/index1)' -d '  
{  
"mappings": {  
"af": {  
"dynamic": "false",  
"properties": {  
"Attributes": {  
"type": "string",  
"index": "analyzed",  
"null\_value": "na"  
},  
"Desc": {  
"type": "string",  
"index": "analyzed",  
"null\_value": "na"  
},  
"Name": {  
"type": "string",  
"index": "analyzed",  
"null\_value": "na"  
},  
"Type": {  
"type": "string",  
"index": "analyzed",  
"null\_value": "na"  
},  
"Groups": {  
"type": "string",  
"index": "analyzed",  
"null\_value": "na"  
}  
}  
}  
}  
}'

curl -XPOST '[http://localhost:9200/index1/type1](http://localhost:9200/index1/type1)' -d '{  
"Attributes" : "Att1",  
"Name" : "Name1",  
"Type" : "Type1",  
"Groups" : "Group1",  
"Desc" : "Description1"  
}'

curl -XGET '[http://localhost:9200/index1/\_search](http://localhost:9200/index1/_search)' -d '  
{  
"from": 0,  
"size": 15,  
"query": {  
"bool": {  
"must": [  
{  
"query\_string": {  
"query": "Name1",  
"fields": [  
"Name",  
"Desc",  
"Groups",  
"Attributes"  
],  
"default\_operator": "or"  
}  
}  
]  
}  
},  
"filter": {  
"terms": {  
"Type": [  
"Type1",  
"Type2"  
]  
}  
}  
}'

The Search (tried with GET and POST) request returns 200 without any hit.  
{"took":6,"timed\_out":false,"\_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max\_score":null,"hits":[]}}

Any idea?

--  
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/CACKXsk%2Bni%2BRf\_1qDu1a%3Do31ofxrt6MRrp7NmtXJXG5Tn4rLW1g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CACKXsk%2Bni%2BRf_1qDu1a%3Do31ofxrt6MRrp7NmtXJXG5Tn4rLW1g%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Mahyar\_SEPEHR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mahyar_sepehr/32/886_2.png) [@Mahyar\_SEPEHR](https://discuss.elastic.co/u/Mahyar_SEPEHR)\
**Post date:** [February 22, 2015, 9:09pm UTC](https://discuss.elastic.co/t/full-search-on-a-multiple-fields-request/22315/2 "2015-02-22T21:09:15Z")

</div>

I still get zero hits if i write "or" or "and" : "default\_operator": "and"

Le dimanche 22 février 2015 17:44:31 UTC+1, Mahyar SEPEHR a écrit :

> Hi,
> 
> I have a problem with a fullsearch using several columns in a index.  
> I've tested it in few versions 1.1.x \< EL \< 1.3.x
> 
> Preparation:  
> (curl -XDELETE '[http://localhost:9200/index1](http://localhost:9200/index1)'😉
> 
> curl -XPUT '[http://localhost:9200/index1](http://localhost:9200/index1)' -d '  
> {  
> "mappings": {  
> "af": {  
> "dynamic": "false",  
> "properties": {  
> "Attributes": {  
> "type": "string",  
> "index": "analyzed",  
> "null\_value": "na"  
> },  
> "Desc": {  
> "type": "string",  
> "index": "analyzed",  
> "null\_value": "na"  
> },  
> "Name": {  
> "type": "string",  
> "index": "analyzed",  
> "null\_value": "na"  
> },  
> "Type": {  
> "type": "string",  
> "index": "analyzed",  
> "null\_value": "na"  
> },  
> "Groups": {  
> "type": "string",  
> "index": "analyzed",  
> "null\_value": "na"  
> }  
> }  
> }  
> }  
> }'
> 
> curl -XPOST '[http://localhost:9200/index1/type1](http://localhost:9200/index1/type1)' -d '{  
> "Attributes" : "Att1",  
> "Name" : "Name1",  
> "Type" : "Type1",  
> "Groups" : "Group1",  
> "Desc" : "Description1"  
> }'
> 
> curl -XGET '[http://localhost:9200/index1/\_search](http://localhost:9200/index1/_search)' -d '  
> {  
> "from": 0,  
> "size": 15,  
> "query": {  
> "bool": {  
> "must": [  
> {  
> "query\_string": {  
> "query": "Name1",  
> "fields": [  
> "Name",  
> "Desc",  
> "Groups",  
> "Attributes"  
> ],  
> "default\_operator": "or"  
> }  
> }  
> ]  
> }  
> },  
> "filter": {  
> "terms": {  
> "Type": [  
> "Type1",  
> "Type2"  
> ]  
> }  
> }  
> }'
> 
> The Search (tried with GET and POST) request returns 200 without any hit.
> 
> {"took":6,"timed\_out":false,"\_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max\_score":null,"hits":}}
> 
> Any idea?

--  
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/b73e7f94-40c7-428d-9d89-90cffa059a28%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b73e7f94-40c7-428d-9d89-90cffa059a28%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:30am UTC](https://discuss.elastic.co/t/full-search-on-a-multiple-fields-request/22315/3 "2017-07-06T00:30:55Z")

</div>


