# Search query gives no result if i have space character in it

**URL:** <https://discuss.elastic.co/t/search-query-gives-no-result-if-i-have-space-character-in-it/13592>\
**Category:** Elasticsearch\
**Created:** [September 13, 2013, 11:48am UTC](https://discuss.elastic.co/t/search-query-gives-no-result-if-i-have-space-character-in-it/13592 "2013-09-13T11:48:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pansarivipuljain](https://avatars.discourse-cdn.com/v4/letter/p/4da419/32.png) [@pansarivipuljain](https://discuss.elastic.co/u/pansarivipuljain)\
**Post date:** [September 13, 2013, 11:48am UTC](https://discuss.elastic.co/t/search-query-gives-no-result-if-i-have-space-character-in-it/13592/1 "2013-09-13T11:48:53Z")

</div>

when i search a string like "3d sy" it gives me the result from elastic  
search index document and works fine, but if i search the string like "3d  
s" it gives me no result.  
same thing happened with "Microsoft co", but it works fine for "Microsoft  
cor"

i am using the "match" query for fetching the result.

My Query is :

{"from":0,"size":10, "query":{  
"custom\_score" : {  
"query" : {  
"match" : {"COMPANY" : {"query" : "_3d s_", "type" :  
"phrase\_prefix", "boost":2}}  
},  
"script" : "\_score/\_score \* doc['COUNT'].value"

```
        }
    }

```

}

In the above query i have customized my score, because it's required for me.

can anyone help how to resolve this issue.

--  
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:16am UTC](https://discuss.elastic.co/t/search-query-gives-no-result-if-i-have-space-character-in-it/13592/2 "2017-07-06T02:16:37Z")

</div>


