# Query string question

**URL:** <https://discuss.elastic.co/t/query-string-question/155181>\
**Category:** Elasticsearch\
**Created:** [November 2, 2018, 2:15pm UTC](https://discuss.elastic.co/t/query-string-question/155181 "2018-11-02T14:15:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rso249](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rso249/32/41992_2.png) [@rso249](https://discuss.elastic.co/u/rso249)\
**Post date:** [November 2, 2018, 2:15pm UTC](https://discuss.elastic.co/t/query-string-question/155181/1 "2018-11-02T14:15:10Z")

</div>

Dear all,  
the users of our application are me asking about the placeholders at the beginning.

For example I have the following terms in elastic search:

0.922  
0.9  
0.3330.9

they are confused that my search returns all the 3 terms when search with the term 0.9\*  
They expected that only the following search term should retuns all the 3 terms. _0.9_  
Is there a way that elastic search behaves that way? Like in sql for example:  
select \*  
ftom table  
where field\_name like '0.9\*';

Thank you in advance !

---

<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:** [November 2, 2018, 2:29pm UTC](https://discuss.elastic.co/t/query-string-question/155181/2 "2018-11-02T14:29:30Z")

</div>

Yes there are ways to do that. But some of them are bad IMO like using a wildcard and some others are good like in your case may be use numbers if those are numbers.

It depends on the use case though.

To answer your question, I guess that if your field is defined as a `keyword` type, then running a wildcard query with `0.9*` should behave as you expect. But I'd not use wildcards as it can be super slow.

---

<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:** [November 30, 2018, 2:29pm UTC](https://discuss.elastic.co/t/query-string-question/155181/3 "2018-11-30T14:29:31Z")

</div>

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