# Return wrong result which not necessary

**URL:** <https://discuss.elastic.co/t/return-wrong-result-which-not-necessary/51547>\
**Category:** Elasticsearch\
**Created:** [June 1, 2016, 10:34am UTC](https://discuss.elastic.co/t/return-wrong-result-which-not-necessary/51547 "2016-06-01T10:34:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sandipmavani](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sandipmavani](https://discuss.elastic.co/u/sandipmavani)\
**Post date:** [June 1, 2016, 10:34am UTC](https://discuss.elastic.co/t/return-wrong-result-which-not-necessary/51547/1 "2016-06-01T10:34:14Z")

</div>

Hi my request is bellow,

```json
{
  "query": {
    "bool": {
      "must": [
        {
          "query_string": {
            "fields": [
              "keywords"
            ],
            "query": "*hi \\&\\& hi*",
            "default_operator": "AND",
            "analyze_wildcard": true
          }
        }
      ]
    }
  },
  "from": 0,
  "size": 5000
}

```

Then I Got result

```json
    {
      "took": 2,
      "timed_out": false,
      "_shards": {
        "total": 5,
        "successful": 5,
        "failed": 0
      },
      "hits": {
        "total": 2,
        "max_score": 4.0767765,
        "hits": [
          {
            "_index": "test",
            "_type": "PersonSearch",
            "_id": "jdhsakdhsjklaaldhsj",
            "_score": 4.0767765,
            "_source": {
              "keywords": [
                "novella",
                "degroot",
                "novella degroot",
                "novella_degroot@degroot.org",
                "808-477-4775",
                "808-746-1865",
                "Possible",
                "evans, c kelly esq",
                "employee",
                "evans, c kelly esq",
                "employee",
                "303 n radcliffe st",
                "hilo",
                "hawaii",
                "hi",
                "96720",
                "hilo",
                "hawaii",
                "hi",
                "303 n radcliffe st",
                "96720",
                "http://www.evansckellyesq.com",
                "green p"
              ]
            }
          },
          {
            "_index": "test",
            "_type": "PersonSearch",
            "_id": "new xyz",
            "_score": 4.0767765,
            "_source": {
              "keywords": [
                "c",
                "kannan",
                "c kannan",
                "Possible",
                "ransar industries, unit-ii(mfg)",
                "employee",
                "imported 26/02/2016 2:06 pm",
                "2011-10-19 05:59:55 - sandip mavani - cimco wireless dnc system for 1 m/c",
                **"hi && hi"**
              ]
            }
          }
        ]
      }
    }

```

but I want actually only second record.

---

<div class="post-metadata">

**Author:** ![cbuescher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbuescher/32/60402_2.png) [@cbuescher](https://discuss.elastic.co/u/cbuescher)\
**Post date:** [June 1, 2016, 11:13am UTC](https://discuss.elastic.co/t/return-wrong-result-which-not-necessary/51547/2 "2016-06-01T11:13:37Z")

</div>

Hi,

two things come to my mind:

- the `&&` you are trying to search is filtered out during the analysis phase when using the default [standard analyzer](https://www.elastic.co/guide/en/elasticsearch/guide/current/standard-analyzer.html) which in turn uses the standard tokenizer. You might want to try the whitespace analyzer, which you can luckily set using the `analyzer` parameter for the `query_string` query
- from your example it looks like you are looking for phrases and not just a simple AND of the three search tokens. However, I don't think wildcards will work in phrases for `query_string` queries

---

<div class="post-metadata">

**Author:** ![sandipmavani](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sandipmavani](https://discuss.elastic.co/u/sandipmavani)\
**Post date:** [June 3, 2016, 6:33am UTC](https://discuss.elastic.co/t/return-wrong-result-which-not-necessary/51547/3 "2016-06-03T06:33:17Z")

</div>

hi @cbuescher  
What Thing i do In my request to Fix this Issue.  
I Only Want Second One Record.

---

<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 5, 2017, 10:46pm UTC](https://discuss.elastic.co/t/return-wrong-result-which-not-necessary/51547/4 "2017-07-05T22:46:33Z")

</div>


