# Elastic search Query issue with case sensitive

**URL:** https://discuss.elastic.co/t/elastic-search-query-issue-with-case-sensitive/198800
**Category:** Elasticsearch
**Created:** [September 9, 2019, 10:37pm UTC](https://discuss.elastic.co/t/elastic-search-query-issue-with-case-sensitive/198800 "2019-09-09T22:37:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Sudharsankotti](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sudharsankotti/32/49926_2.png) [@Sudharsankotti](https://discuss.elastic.co/u/Sudharsankotti)
#### Post date: [September 9, 2019, 10:37pm UTC](https://discuss.elastic.co/t/elastic-search-query-issue-with-case-sensitive/198800/1 "2019-09-09T22:37:43Z")

</div>

Elastic search show result opposite to case requested

Below i have requested for lowercaset "test\*" but it give output as upper case

Example :  
{"query":{"bool":{"must":{"wildcard":{"partnerLocationCode":{"value":"test\*"}}}}}}

output: hits": {

- "total": 10,
- "max\_score": 1,
- "hits": [
  - {
    - "\_index": "partner\_location",
    - "\_type": "com.customer.model.customer.PartnerLocationEntity",
    - "\_id": "1102241",
    - "\_score": 1,
    - "\_source": {
      - "id": "1102241",
      - "legalName": "TESTFGM Internal testing account 456",  
\*\*\*\* "partnerLocationCode": "TESTFGM",\*\*\*
      - "lastUpdatedDate": "2019-07-16T07:00:00Z",
      - "partnerLocation": {
        - "partner\_account": {
          - "PartnerAccountCode": "TESTFGM-A",
          - "PartnerAccountName": "TESTFGM Internal testing account test",
          - "PartnerAccount": {
            - "address": {
              - "city": "Honk",
              - "country": "MISC-COUNTRY-CA",
              - "address": "1234 Fake Fake",
              - "postalCode": "V7C1A1"},

            - "contact": {
              - "firstName": "ContactJoe",
              - "lastName": "ContactJoe",
              - "refId": "TU-ACCOUNTCONTACT-2444851"}

---

<div class="post-metadata">

### Author: ![wangqinghuan](https://avatars.discourse-cdn.com/v4/letter/w/d26b3c/32.png) [@wangqinghuan](https://discuss.elastic.co/u/wangqinghuan)
#### Post date: [September 10, 2019, 7:49am UTC](https://discuss.elastic.co/t/elastic-search-query-issue-with-case-sensitive/198800/2 "2019-09-10T07:49:41Z")

</div>

This is answer: [https://stackoverflow.com/a/52752846/8312657](https://stackoverflow.com/a/52752846/8312657)

---

<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: [October 8, 2019, 7:52am UTC](https://discuss.elastic.co/t/elastic-search-query-issue-with-case-sensitive/198800/3 "2019-10-08T07:52:44Z")

</div>

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