# Http rest calls doesn't store Index

**URL:** <https://discuss.elastic.co/t/http-rest-calls-doesnt-store-index/4014>\
**Category:** Elasticsearch\
**Created:** [March 2, 2011, 2:51pm UTC](https://discuss.elastic.co/t/http-rest-calls-doesnt-store-index/4014 "2011-03-02T14:51:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bpatra119](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@bpatra119](https://discuss.elastic.co/u/bpatra119)\
**Post date:** [March 2, 2011, 2:51pm UTC](https://discuss.elastic.co/t/http-rest-calls-doesnt-store-index/4014/1 "2011-03-02T14:51:11Z")

</div>

```
val json = "\"mappings\" : {\"search1\" : {\"_source\" : { \"enabled\" : true },\"properties\" : {\"field1\" : { \"type\" : \"string\", \"index\" : \"analyzed\" }}}}"
var nvp: List[NameValuePair] = Nil
nvp :+= new BasicNameValuePair("d", json)
val encodedStr = URLEncodedUtils.format(asJavaList(nvp), "UTF-8")
val address = props.get("host.address")
val client = new DefaultHttpClient()
val port = props.get("host.port")
val putMeth = new HttpPut(address+ ":"+port+"/test1?"+encodedStr)
val resp = client.execute(putMeth)
println(resp.getStatusLine())

```

Can any one tell me whts wrong with this,  
the response status line says 200 Ok , but when I do

curl -XGET '[http://localhost:9200/jyoti/\_search?pretty=true](http://localhost:9200/jyoti/_search?pretty=true)' -d '  
{  
"query" : {  
"matchAll" : {}  
}  
}'

Its not returning any results. pls help , its urgent.

---

<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, 4:10am UTC](https://discuss.elastic.co/t/http-rest-calls-doesnt-store-index/4014/2 "2017-07-06T04:10:59Z")

</div>

Closed on July 6, 2017, 4:10am UTC


