# Escape = in query

**URL:** https://discuss.elastic.co/t/escape-in-query/12417
**Category:** Elasticsearch
**Created:** [June 14, 2013, 12:59pm UTC](https://discuss.elastic.co/t/escape-in-query/12417 "2013-06-14T12:59:55Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Ankit\_Jain](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@Ankit\_Jain](https://discuss.elastic.co/u/Ankit_Jain)
#### Post date: [June 14, 2013, 12:59pm UTC](https://discuss.elastic.co/t/escape-in-query/12417/1 "2013-06-14T12:59:55Z")

</div>

Hi All,

My field has value  
"[http://www.ebay.com/fashion/outlet/srp/?\_sacat=93427&\_aspects=Brand~Gola](http://www.ebay.com/fashion/outlet/srp/?_sacat=93427&_aspects=Brand~Gola)".

If I am using the "=" in value , then query is not returning any result.

QueryBuilders.wildcardQuery("c0","[http://www.ebay.com/fashion/outlet/srp/?\_sacat=93427&\_aspects=Brand~Gola](http://www.ebay.com/fashion/outlet/srp/?_sacat=93427&_aspects=Brand~Gola)");

But, if i replace "=" with "?", then query is returning result.

QueryBuilders.wildcardQuery("c0","[http://www.ebay.com/fashion/outlet/srp/?\_sacat?93427&\_aspects?Brand~Gola](http://www.ebay.com/fashion/outlet/srp/?_sacat?93427&_aspects?Brand~Gola)");

Please let me know, if i am missing something.

Thanks,  
Ankit

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [June 14, 2013, 2:21pm UTC](https://discuss.elastic.co/t/escape-in-query/12417/2 "2013-06-14T14:21:25Z")

</div>

You are probably using default analyzer, aren't you?  
You should not analyze your field.

What is exactly your use case? What does your data look like?

A side note: don't use Wildcard queries unless you really really need it.

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 14 juin 2013 à 14:59, Ankit Jain [ankitjaincs06@gmail.com](mailto:ankitjaincs06@gmail.com) a écrit :

> Hi All,
> 
> My field has value "[http://www.ebay.com/fashion/outlet/srp/?\_sacat=93427&\_aspects=Brand~Gola](http://www.ebay.com/fashion/outlet/srp/?_sacat=93427&_aspects=Brand~Gola)".
> 
> If I am using the "=" in value , then query is not returning any result.
> 
> QueryBuilders.wildcardQuery("c0","[http://www.ebay.com/fashion/outlet/srp/?\_sacat=93427&\_aspects=Brand~Gola](http://www.ebay.com/fashion/outlet/srp/?_sacat=93427&_aspects=Brand~Gola)");
> 
> But, if i replace "=" with "?", then query is returning result.
> 
> QueryBuilders.wildcardQuery("c0","[http://www.ebay.com/fashion/outlet/srp/?\_sacat?93427&\_aspects?Brand~Gola](http://www.ebay.com/fashion/outlet/srp/?_sacat?93427&_aspects?Brand~Gola)");
> 
> Please let me know, if i am missing something.
> 
> Thanks,  
> Ankit
> 
> --  
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:31am UTC](https://discuss.elastic.co/t/escape-in-query/12417/3 "2017-07-06T02:31:14Z")

</div>


