# Sign "+" was treated as wildcard in Elasticsearch API GET Search

**URL:** https://discuss.elastic.co/t/sign-was-treated-as-wildcard-in-elasticsearch-api-get-search/323074
**Category:** Elasticsearch
**Created:** [January 13, 2023, 12:51am UTC](https://discuss.elastic.co/t/sign-was-treated-as-wildcard-in-elasticsearch-api-get-search/323074 "2023-01-13T00:51:31Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![SooperTee](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@SooperTee](https://discuss.elastic.co/u/SooperTee)
#### Post date: [January 13, 2023, 12:51am UTC](https://discuss.elastic.co/t/sign-was-treated-as-wildcard-in-elasticsearch-api-get-search/323074/1 "2023-01-13T00:51:31Z")

</div>

I was trying to access my Elasticsearch topic with API GET. please see below sample query.  
[https://localhost:9200/my\_topic/\_search?pretty&q=trade.tradeType:](https://localhost:9200/my_topic/_search?pretty&q=trade.tradeType:)"Delta +1"  
The problem with this search is that the result returned is not only trade type of "Delta +1", but also "Delta -1" and some others. Due to this output I receive, I suspect that "+" is actually treated as an wildcard in this search.  
I would really appreciate if someone can let me know what I should modify in order to receive the correct search result.  
Please note, below two attempts got zero results back for me, tradeType field is mapped as TEXT as primary type and Keyword as secondary type.

[https://localhost:9200/my\_topic/\_search?pretty&q=trade.tradeType.keyword:](https://localhost:9200/my_topic/_search?pretty&q=trade.tradeType.keyword:)"Delta +1"  
[https://localhost:9200/my\_topic/\_search?pretty&q=trade.tradeType.keyword:Delta](https://localhost:9200/my_topic/_search?pretty&q=trade.tradeType.keyword:Delta) +1

---

<div class="post-metadata">

### Author: ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)
#### Post date: [January 13, 2023, 1:50pm UTC](https://discuss.elastic.co/t/sign-was-treated-as-wildcard-in-elasticsearch-api-get-search/323074/2 "2023-01-13T13:50:00Z")

</div>

I suspect you are using the default analyzer. When you index "delta +1" you have the tokens "delta" and "1", the "+" character is ignored. If you need to index that character you need another analyzer.

---

<div class="post-metadata">

### Author: ![SooperTee](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@SooperTee](https://discuss.elastic.co/u/SooperTee)
#### Post date: [January 13, 2023, 6:20pm UTC](https://discuss.elastic.co/t/sign-was-treated-as-wildcard-in-elasticsearch-api-get-search/323074/3 "2023-01-13T18:20:07Z")

</div>

I can query and receive correct result if I use Elasticsearch DSL with POST payload as below. ".keyword" will resolve all my problem.

```auto
{
	"term": {
		"trade.tradeType.keyword": "Delta +1"
	}
}

```

My issue is that I cannot reproduce the same with Elasticsearch API using GET command.

---

<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: [February 10, 2023, 6:21pm UTC](https://discuss.elastic.co/t/sign-was-treated-as-wildcard-in-elasticsearch-api-get-search/323074/4 "2023-02-10T18:21:04Z")

</div>

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