# Simple query string search

**URL:** <https://discuss.elastic.co/t/simple-query-string-search/16532>\
**Category:** Elasticsearch\
**Created:** [March 21, 2014, 8:29pm UTC](https://discuss.elastic.co/t/simple-query-string-search/16532 "2014-03-21T20:29:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohit\_Anchlia](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@Mohit\_Anchlia](https://discuss.elastic.co/u/Mohit_Anchlia)\
**Post date:** [March 21, 2014, 8:29pm UTC](https://discuss.elastic.co/t/simple-query-string-search/16532/1 "2014-03-21T20:29:06Z")

</div>

I am trying to run a simple search and for some reason it's not working. I  
might just be making a simple mistake here. I indexed 2 documents:

[ec2-user@ip-10-80-140-13 ~]$ curl -XPUT '  
[http://localhost:9200/users/payments/2](http://localhost:9200/users/payments/2)' -d '{

> "namespace": "ns1",  
> "id": "1",  
> "fastId": "f1",  
> "version": 1393443298027,  
> "lang": "en",  
> "opType": "create",  
> "fields": {  
> "field2": "value2",  
> "field1": "value11"  
> },  
> "arrayFields": {}  
> }'  
> {"\_index":"users","\_type":"payments","\_id":"2","\_version":1,"created":true}[

[ec2-user@ip-10-80-140-13 ~]$ curl -XPUT '  
[http://localhost:9200/users/payments/1](http://localhost:9200/users/payments/1)' -d '{

> "namespace": "ns1",  
> "id": "2",  
> "fastId": "f1",  
> "version": 1393443298027,  
> "lang": "en",  
> "opType": "create",  
> "fields": {  
> "field2": "value2",  
> "field1": "value1"  
> },  
> "arrayFields": {}  
> }'  
> {"\_index":"users","\_type":"payments","\_id":"1","\_version":1,"created":true}

And now I am trying to run a simple search and it doesn't seem to return  
any docs. I expected 2 docs to match:

[ec2-user@ip-10-80-140-13 ~]$ curl -XGET '  
[http://localhost:9200/users/payments/\_search?q=field.field1:value1](http://localhost:9200/users/payments/_search?q=field.field1:value1)'  
{"took":1,"timed\_out":false,"\_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max\_score":null,"hits":}}

[ec2-user@ip-10-80-140-13 ~]$ curl -XGET '  
[http://localhost:9200/users/payments/\_search?q=value1](http://localhost:9200/users/payments/_search?q=value1)'  
{"took":1,"timed\_out":false,"\_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max\_score":null,"hits":}}

--  
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/CAOT3TWoLRfwPr7tPtv9LuN%2B3jcbTuWKp8ioBY-YsZnYgcXoHZA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWoLRfwPr7tPtv9LuN%2B3jcbTuWKp8ioBY-YsZnYgcXoHZA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Mohit\_Anchlia](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@Mohit\_Anchlia](https://discuss.elastic.co/u/Mohit_Anchlia)\
**Post date:** [March 21, 2014, 9:01pm UTC](https://discuss.elastic.co/t/simple-query-string-search/16532/2 "2014-03-21T21:01:16Z")

</div>

Please ignore I inadvertently updated one of the documents.

On Fri, Mar 21, 2014 at 1:29 PM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)wrote:

> I am trying to run a simple search and for some reason it's not working. I  
> might just be making a simple mistake here. I indexed 2 documents:
> 
> [ec2-user@ip-10-80-140-13 ~]$ curl -XPUT '  
> [http://localhost:9200/users/payments/2](http://localhost:9200/users/payments/2)' -d '{
> 
> > "namespace": "ns1",  
> > "id": "1",  
> > "fastId": "f1",  
> > "version": 1393443298027,  
> > "lang": "en",  
> > "opType": "create",  
> > "fields": {  
> > "field2": "value2",  
> > "field1": "value11"  
> > },  
> > "arrayFields": {}  
> > }'
> 
> {"\_index":"users","\_type":"payments","\_id":"2","\_version":1,"created":true}[
> 
> [ec2-user@ip-10-80-140-13 ~]$ curl -XPUT '  
> [http://localhost:9200/users/payments/1](http://localhost:9200/users/payments/1)' -d '{
> 
> > "namespace": "ns1",  
> > "id": "2",  
> > "fastId": "f1",  
> > "version": 1393443298027,  
> > "lang": "en",  
> > "opType": "create",  
> > "fields": {  
> > "field2": "value2",  
> > "field1": "value1"  
> > },  
> > "arrayFields": {}  
> > }'  
> > {"\_index":"users","\_type":"payments","\_id":"1","\_version":1,"created":true}
> 
> And now I am trying to run a simple search and it doesn't seem to return  
> any docs. I expected 2 docs to match:
> 
> [ec2-user@ip-10-80-140-13 ~]$ curl -XGET '  
> [http://localhost:9200/users/payments/\_search?q=field.field1:value1](http://localhost:9200/users/payments/_search?q=field.field1:value1)'
> 
> {"took":1,"timed\_out":false,"\_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max\_score":null,"hits":}}
> 
> [ec2-user@ip-10-80-140-13 ~]$ curl -XGET '  
> [http://localhost:9200/users/payments/\_search?q=value1](http://localhost:9200/users/payments/_search?q=value1)'
> 
> {"took":1,"timed\_out":false,"\_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max\_score":null,"hits":}}

--  
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/CAOT3TWr%3DfW5-w0W%3DRMNjjgE%3DpmuCrxBV8XAQiWXQ8r-APspkbw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWr%3DfW5-w0W%3DRMNjjgE%3DpmuCrxBV8XAQiWXQ8r-APspkbw%40mail.gmail.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, 1:41am UTC](https://discuss.elastic.co/t/simple-query-string-search/16532/3 "2017-07-06T01:41:29Z")

</div>


