# Curl dictionary key and value search

**URL:** <https://discuss.elastic.co/t/curl-dictionary-key-and-value-search/19049>\
**Category:** Elasticsearch\
**Created:** [August 2, 2014, 10:25pm UTC](https://discuss.elastic.co/t/curl-dictionary-key-and-value-search/19049 "2014-08-02T22:25:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ali\_koyuncu](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@ali\_koyuncu](https://discuss.elastic.co/u/ali_koyuncu)\
**Post date:** [August 2, 2014, 10:25pm UTC](https://discuss.elastic.co/t/curl-dictionary-key-and-value-search/19049/1 "2014-08-02T22:25:22Z")

</div>

My data structere has a key value pair like below:

{"content\_type":0,"semantic":[{"Key":"all","Value":0},{"Key":"tg","Value":1}],"user\_local\_id":1}  
{"content\_type":0,"semantic":[{"Key":"all","Value":1},{"Key":"tg","Value":0}],"user\_local\_id":2}

I want to get datas which has the semantic Key is "all" and its Value is  
"0" using curl query. I tried some search query but I didn't get right  
response ever.

[http://localhost:9200/twitter/\_search?q=semantic.Key:all](http://localhost:9200/twitter/_search?q=semantic.Key:all) AND  
semantic.Value:0

The search query gives me each of above data. I just want to get data which  
has this key value pair ":[{"Key":"all","Value":0}" How can I write search  
query ?

--  
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/051eeb95-1cb6-444c-acd9-3f679ecb2df0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/051eeb95-1cb6-444c-acd9-3f679ecb2df0%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [August 2, 2014, 10:39pm UTC](https://discuss.elastic.co/t/curl-dictionary-key-and-value-search/19049/2 "2014-08-02T22:39:03Z")

</div>

Use nested type

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Jörg

On Sun, Aug 3, 2014 at 12:25 AM, ali koyuncu [cs.alikoyuncu@gmail.com](mailto:cs.alikoyuncu@gmail.com)  
wrote:

> My data structere has a key value pair like below:
> 
> {"content\_type":0,"semantic":[{"Key":"all","Value":0},{"Key":"tg","Value":1}],"user\_local\_id":1}
> 
> {"content\_type":0,"semantic":[{"Key":"all","Value":1},{"Key":"tg","Value":0}],"user\_local\_id":2}
> 
> I want to get datas which has the semantic Key is "all" and its Value is  
> "0" using curl query. I tried some search query but I didn't get right  
> response ever.
> 
> [http://localhost:9200/twitter/\_search?q=semantic.Key:all](http://localhost:9200/twitter/_search?q=semantic.Key:all) AND  
> semantic.Value:0
> 
> The search query gives me each of above data. I just want to get data  
> which has this key value pair ":[{"Key":"all","Value":0}" How can I write  
> search query ?
> 
> --  
> 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/051eeb95-1cb6-444c-acd9-3f679ecb2df0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/051eeb95-1cb6-444c-acd9-3f679ecb2df0%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/051eeb95-1cb6-444c-acd9-3f679ecb2df0%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/051eeb95-1cb6-444c-acd9-3f679ecb2df0%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/CAKdsXoFwx2eTfDGc9a4KmDepyp-ZyHq310ci1Ysj69zQTN10Ng%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFwx2eTfDGc9a4KmDepyp-ZyHq310ci1Ysj69zQTN10Ng%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:11am UTC](https://discuss.elastic.co/t/curl-dictionary-key-and-value-search/19049/3 "2017-07-06T01:11:23Z")

</div>


