# Queries in ES

**URL:** https://discuss.elastic.co/t/queries-in-es/8180
**Category:** Elasticsearch
**Created:** [June 21, 2012, 12:10pm UTC](https://discuss.elastic.co/t/queries-in-es/8180 "2012-06-21T12:10:10Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![olechafm](https://avatars.discourse-cdn.com/v4/letter/o/e36b37/32.png) [@olechafm](https://discuss.elastic.co/u/olechafm)
#### Post date: [June 21, 2012, 12:10pm UTC](https://discuss.elastic.co/t/queries-in-es/8180/1 "2012-06-21T12:10:10Z")

</div>

I've got a cluster with such index:

{

```
state: open
settings: {
    index.analysis.analyzer.default.filter: my_filter
    index.number_of_replicas: 1
    index.analysis.filter.my_filter.type_table.-: ALPHANUM
    index.analysis.filter.my_filter.preserve_original: 1
    index.analysis.filter.my_filter.type: word_delimiter
    index.number_of_shards: 4
    index.analysis.analyzer.default.type: custom
    index.analysis.analyzer.default.tokenizer: whitespace
}
mappings: {
    test123: {
        properties: {
            wojewodztwo: {
                type: string
            }
            _pk: {
                type: long
            }
            _insertDateTime: {
                type: long
            }
            nazwa_zam: {
                type: string
            }
            przedmiot_zam: {
                type: string
            }
            IDwykonawcy: {
                type: string
            }
            _insertUsec: {
                type: long
            }
            wartosc: {
                type: float
            }
            nazwa: {
                type: string
            }
            data_publikacji: {
                type: integer
            }
            CPV_nazwa: {
                type: string
            }
        }
    }
}
aliases: []

```

}

and I'm quering elasticsearch in ElasticSearch Head with:

{

```
query: {
    bool: {
        must: [
            {
                fuzzy: {
                    przedmiot_zam: {
                        value: R-A
                        min_similarity: 0.9
                    }
                }
            }
        ]
        must_not: []
        should: []
    }
}
from: 0
size: 50
sort: []
facets: { }

```

}

and than through PHP with:

Array ( [from] =\> 0 [size] =\> 0 [sort] =\> Array ( [0] =\> Array  
( [\_score] =\> desc ) ) [query] =\> Array ( [bool] =\> Array ( [must] =\>  
Array ( [0] =\> Array ( [fuzzy\_like\_this] =\> Array ( [fields] =\> Array  
( [0] =\> przedmiot\_zam ) [like\_text] =\> R-A [min\_similarity] =\>  
0.9 ) ) ) [must\_not] =\> Array ( ) [should] =\> Array ( ) ) ) [facets]  
=\> Array ( ) )

question: why am I getting diferent query results? in elastic head I  
have proper ones in PHP not

I want elasticsearch to ignore the "-" and don't treat it as delimiter  
so when I will search for "e-learning" it will find only it, not all  
"e" "-" and "learning"

---

<div class="post-metadata">

### Author: ![AEvar\_Arnfjord\_Bjarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aevar_arnfjord_bjarm/32/2746_2.png) [@AEvar\_Arnfjord\_Bjarm](https://discuss.elastic.co/u/AEvar_Arnfjord_Bjarm)
#### Post date: [June 22, 2012, 11:31am UTC](https://discuss.elastic.co/t/queries-in-es/8180/2 "2012-06-22T11:31:04Z")

</div>

On Thu, Jun 21, 2012 at 2:10 PM, olechafm [olechafm@gmail.com](mailto:olechafm@gmail.com) wrote:

> question: why am I getting diferent query results? in elastic head I  
> have proper ones in PHP not

When I encounter this kind of problem I use a network sniffer to see  
how the two queries are actually different on the HTTP level.

If it turns out to be a bug in the PHP library maybe you should email  
its author directly.

---

<div class="post-metadata">

### Author: ![Marcin\_Oleszkiewicz](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@Marcin\_Oleszkiewicz](https://discuss.elastic.co/u/Marcin_Oleszkiewicz)
#### Post date: [June 25, 2012, 5:06am UTC](https://discuss.elastic.co/t/queries-in-es/8180/3 "2012-06-25T05:06:17Z")

</div>

It of course was my mistake, as i discovered, fuzzy is not equal to  
fuzzy\_like\_this and mainly it was the reason of different search  
results..

On 22 Cze, 13:31, Ævar Arnfjörð Bjarmason [ava...@gmail.com](mailto:ava...@gmail.com) wrote:

> On Thu, Jun 21, 2012 at 2:10 PM, olechafm [olech...@gmail.com](mailto:olech...@gmail.com) wrote:
> 
> > question: why am I getting diferent query results? in elastic head I  
> > have proper ones in PHP not
> 
> When I encounter this kind of problem I use a network sniffer to see  
> how the two queries are actually different on the HTTP level.
> 
> If it turns out to be a bug in the PHP library maybe you should email  
> its author directly.

---

<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, 3:22am UTC](https://discuss.elastic.co/t/queries-in-es/8180/4 "2017-07-06T03:22:46Z")

</div>


