# Elasticsearch - php client - term match string \*

**URL:** <https://discuss.elastic.co/t/elasticsearch-php-client-term-match-string/84054>\
**Category:** Elasticsearch\
**Created:** [April 28, 2017, 8:10pm UTC](https://discuss.elastic.co/t/elasticsearch-php-client-term-match-string/84054 "2017-04-28T20:10:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mt.michael](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@mt.michael](https://discuss.elastic.co/u/mt.michael)\
**Post date:** [April 28, 2017, 8:10pm UTC](https://discuss.elastic.co/t/elasticsearch-php-client-term-match-string/84054/1 "2017-04-28T20:10:50Z")

</div>

I want to search the index with value like '4.1\*' in a device os version field which is string field.

This is what I've in the query parameters. I used the term but it didn't return any and I know there're data in the index.

Did I do anything wrong in the query or I should use something else? Thanks.

```
        [query] => Array
            (
                [bool] => Array
                    (
                        [must] => Array
                            (
                                [0] => Array
                                    (
                                        [range] => Array
                                            (
                                                [@timestamp] => Array
                                                    (
                                                        [gte] => 1491004800000
                                                        [lt] => 1493337600000
                                                        [format] => epoch_millis
                                                    )

                                            )

                                    )

                                [1] => Array
                                    (
                                        [term] => Array
                                            (
                                                [device_os] => Android
                                            )

                                    )

                                [2] => Array
                                    (
                                        [term] => Array
                                            (
                                                [device_os_version] => 4.1*
                                            )

                                    )

                            )

                    )

            )

        [from] => 0
        [size] => 25
    )
```

---

<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:** [May 26, 2017, 8:10pm UTC](https://discuss.elastic.co/t/elasticsearch-php-client-term-match-string/84054/2 "2017-05-26T20:10:56Z")

</div>

Closed on May 26, 2017, 8:10pm UTC

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