# Explanation of research method between ES 5.X and 6.X

**URL:** <https://discuss.elastic.co/t/explanation-of-research-method-between-es-5-x-and-6-x/162768>\
**Category:** Elasticsearch\
**Created:** [January 3, 2019, 8:58am UTC](https://discuss.elastic.co/t/explanation-of-research-method-between-es-5-x-and-6-x/162768 "2019-01-03T08:58:53Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![TomasDSD](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@TomasDSD](https://discuss.elastic.co/u/TomasDSD)\
**Post date:** [January 3, 2019, 8:58am UTC](https://discuss.elastic.co/t/explanation-of-research-method-between-es-5-x-and-6-x/162768/1 "2019-01-03T08:58:53Z")

</div>

Hello everyone,

I have updated my ElasticSearch 5.x to 6.x, and the discovery Search have not the same result. In 5.x, i have 500 results when searching in my index, and 9 results in 6.x.

Can someone explain me the new research method of 6.X ES, and the difference between 5.X and 6.X.

I have read many documents, but i can't find the answer.

Thanks you very much.

Tomas.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [January 3, 2019, 9:07am UTC](https://discuss.elastic.co/t/explanation-of-research-method-between-es-5-x-and-6-x/162768/2 "2019-01-03T09:07:10Z")

</div>

What does you search look like? What does your mappings look like?

---

<div class="post-metadata">

**Author:** ![TomasDSD](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@TomasDSD](https://discuss.elastic.co/u/TomasDSD)\
**Post date:** [January 3, 2019, 9:14am UTC](https://discuss.elastic.co/t/explanation-of-research-method-between-es-5-x-and-6-x/162768/3 "2019-01-03T09:14:45Z")

</div>

Hello, thanks for the answer.

I write "Star" for example, but between 5.x and 6.x, i don't have number of results.

I have many fields, which represent's company's information.

This is my mapping :

> Blockquote  
> "mappings": {  
> "doc": {  
> "properties": {  
> "SIREN": { "type": "keyword" },  
> "NIC": { "type": "keyword" },  
> "NOMPRIN": { "type": "keyword" },  
> "NOMCOMP": { "type": "keyword" },  
> "ADRESSE1": { "type": "keyword" },  
> "ADRESSE2": { "type": "keyword" },  
> "ADRESSE3": { "type": "keyword" },  
> "CODPOSTCOMP": { "type": "keyword" },  
> "NUMVOIE": { "type": "keyword" },  
> "TYPVOIE": { "type": "keyword" },  
> "LIBVOIE": { "type": "keyword" },  
> "CODPOS": { "type": "keyword" },  
> "CEDEX": { "type": "keyword" },  
> "CODEREG": { "type": "keyword" },  
> "LIBREG": { "type": "keyword" },  
> "CODEDEP": { "type": "keyword" },  
> "CODECOM": { "type": "keyword" },  
> "LIBCOM": { "type": "keyword" },  
> "NOM": { "type": "keyword" },  
> "PRENOM": { "type": "keyword" },  
> "INSEESIEGE": { "type": "keyword" },  
> "INSEE": { "type": "keyword" },  
> "NATJUR": { "type": "keyword" },  
> "CODENAF": { "type": "keyword" },  
> "LIBNAF": { "type": "keyword" },  
> "TRANCHEEFFE": { "type": "keyword" },  
> "EFFECTIF": { "type": "integer" },  
> "CATEGORIE": { "type": "keyword" },  
> "regionIsoCode": { "type": "keyword" },  
> "ZONEBLANCHE": { "type": "keyword" },  
> "POPULATIONCOM": { "type": "integer" }  
> }  
> }

 ![Capture](https://us1.discourse-cdn.com/elastic/original/3X/b/e/bef31fb964b33124bce4997e52be848d12bc40af.jpeg)

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [January 3, 2019, 9:21am UTC](https://discuss.elastic.co/t/explanation-of-research-method-between-es-5-x-and-6-x/162768/4 "2019-01-03T09:21:04Z")

</div>

Elasticsearch 5.x had an `_all` field that was enabled by default, which allowed case-insensitive free-text search. This could take up a lot of space on disk and was in Elasticsearch 6.x removed and replaced by an [all\_fields option for the query string](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/query-dsl-query-string-query.html), which Kibana falls back on when no fields are specified in the search bar. This instead queries all fields, and since most of your fields are mapped as `keyword`(case sensitive) the search behaviour is now different.

If you want the old behaviour and do not mind indices taking upon more space on disk, you can create your own `_all` field equivalent using the [copy\_to functionality](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/copy-to.html).

---

<div class="post-metadata">

**Author:** ![TomasDSD](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@TomasDSD](https://discuss.elastic.co/u/TomasDSD)\
**Post date:** [January 3, 2019, 9:26am UTC](https://discuss.elastic.co/t/explanation-of-research-method-between-es-5-x-and-6-x/162768/5 "2019-01-03T09:26:20Z")

</div>

Thanks a lot !

I will try to do this.

---

<div class="post-metadata">

**Author:** ![TomasDSD](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@TomasDSD](https://discuss.elastic.co/u/TomasDSD)\
**Post date:** [January 3, 2019, 9:31am UTC](https://discuss.elastic.co/t/explanation-of-research-method-between-es-5-x-and-6-x/162768/6 "2019-01-03T09:31:53Z")

</div>

Do you know the command to specify fields in the search bar ? Thanks

---

<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:** [January 3, 2019, 9:43am UTC](https://discuss.elastic.co/t/explanation-of-research-method-between-es-5-x-and-6-x/162768/7 "2019-01-03T09:43:24Z")

</div>

Something like: `NOMPRIN:sarl`

But as Christian said you need to change the mapping to make that work.

---

<div class="post-metadata">

**Author:** ![TomasDSD](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@TomasDSD](https://discuss.elastic.co/u/TomasDSD)\
**Post date:** [January 3, 2019, 9:50am UTC](https://discuss.elastic.co/t/explanation-of-research-method-between-es-5-x-and-6-x/162768/8 "2019-01-03T09:50:52Z")

</div>

Thanks Dadoonet.

I have another problem.

In 5.x when i write "STAR'S", i have many match.  
In 6.X, i have some match, but not with the '. Maybe is considered as an operator ?

Thanks for help.

---

<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:** [January 3, 2019, 10:26am UTC](https://discuss.elastic.co/t/explanation-of-research-method-between-es-5-x-and-6-x/162768/9 "2019-01-03T10:26:02Z")

</div>

You should look at the `_analyze` API. It will basically help you to understand how your text is processed before getting indexed.

> [@TomasDSD](#):
>
> Maybe is considered as an operator ?

I don't think so.  
If you need help on that, please share what you are exactly doing. I mean a simple example with the real mapping and real document and query would help.

A full recreation script as described in [About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) would help. Please, try to keep the example as simple as possible.

---

<div class="post-metadata">

**Author:** ![TomasDSD](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@TomasDSD](https://discuss.elastic.co/u/TomasDSD)\
**Post date:** [January 3, 2019, 10:45am UTC](https://discuss.elastic.co/t/explanation-of-research-method-between-es-5-x-and-6-x/162768/10 "2019-01-03T10:45:10Z")

</div>

Thanks 😃

---

<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:** [January 31, 2019, 10:45am UTC](https://discuss.elastic.co/t/explanation-of-research-method-between-es-5-x-and-6-x/162768/11 "2019-01-31T10:45:16Z")

</div>

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