# Query using url with quotes

**URL:** <https://discuss.elastic.co/t/query-using-url-with-quotes/85102>\
**Category:** Elasticsearch\
**Created:** [May 9, 2017, 1:37pm UTC](https://discuss.elastic.co/t/query-using-url-with-quotes/85102 "2017-05-09T13:37:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Uira\_Kulesza](https://avatars.discourse-cdn.com/v4/letter/u/94ad74/32.png) [@Uira\_Kulesza](https://discuss.elastic.co/u/Uira_Kulesza)\
**Post date:** [May 9, 2017, 1:37pm UTC](https://discuss.elastic.co/t/query-using-url-with-quotes/85102/1 "2017-05-09T13:37:04Z")

</div>

Dear all,

I am trying to submit a Elasticsearch query using the Java API. I have adapted a query originally submitted via Kibana (that works).

The problem seems to be the usage of quotes in one of the filters.

I have printed the query submitted at the end of this message.

Has anybody faced the same problem? Any tip on that.

Many thanks and best regards,

Uirá

{  
"size": 0,  
"query": {  
"filtered": {  
"query": {  
"query\_string": {  
"analyze\_wildcard": true,  
"query": "\*"  
}  
},  
"filter": {  
"bool": {  
"must": [  
{  
"query": {  
"query\_string": {  
"analyze\_wildcard": true,  
"query": "id\_sistema:2"  
}  
},  
"$state": {  
"store": "appState"  
}  
},  
{  
"query": {  
"match": {  
"url.raw": {  
"query": "[https://www.mysystem.com/module/javascript/page1.jsp](https://www.mysystem.com/module/javascript/page1.jsp)",  
"type": "phrase"  
}  
}  
},  
"$state": {  
"store": "appState"  
}  
},  
{  
"range": {  
"@timestamp": {  
"gte": 1493736110958,  
"lte": 1493995310958,  
"format": "epoch\_millis"  
}  
}  
}  
],  
"must\_not": []  
}  
}  
}  
},  
"aggs": {  
"3": {  
"filters": {  
"filters": {  
"id\_sistema:2": {  
"query": {  
"query\_string": {  
"analyze\_wildcard": true,  
"query": "id\_sistema:2"  
}  
}  
},  
"url.raw:"[https://www.mysystem.com/module/javascript/page1.jsp](https://www.mysystem.com/module/javascript/page1.jsp)"": {  
"query": {  
"query\_string": {  
"query": "url.raw:"[https://www.mysystem.com/module/javascript/page1.jsp](https://www.mysystem.com/module/javascript/page1.jsp)"",  
"analyze\_wildcard": true  
}  
}  
}  
}  
},  
"aggs": {  
"4": {  
"terms": {  
"field": "url.raw",  
"size": 1000,  
"order": {  
"\_count": "desc"  
}  
},  
"aggs": {  
"2": {  
"percentiles": {  
"field": "tempo",  
"percents": [  
50  
]  
}  
}  
}  
}  
}  
}  
}  
}

---

<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:** [June 6, 2017, 1:46pm UTC](https://discuss.elastic.co/t/query-using-url-with-quotes/85102/2 "2017-06-06T13:46:22Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
