# How to examine the \_all field

**URL:** <https://discuss.elastic.co/t/how-to-examine-the--all-field/5894>\
**Category:** Elasticsearch\
**Created:** [November 16, 2011, 10:50pm UTC](https://discuss.elastic.co/t/how-to-examine-the--all-field/5894 "2011-11-16T22:50:09Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![dvd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dvd/32/3067_2.png) [@dvd](https://discuss.elastic.co/u/dvd)\
**Post date:** [November 16, 2011, 10:50pm UTC](https://discuss.elastic.co/t/how-to-examine-the--all-field/5894/1 "2011-11-16T22:50:09Z")

</div>

There is a way to dump the \_all field associated to an indexed  
document?

I'm trying to debug strange behavior when I query an index; this query  
produces no results

{query: {"query\_string": {"query": "stile"}}}

when this one instead return the expected document

{query: {"query\_string": {"query": "description:stile"}}}

---

<div class="post-metadata">

**Author:** ![Nick\_Hoffman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nick_hoffman/32/1872_2.png) [@Nick\_Hoffman](https://discuss.elastic.co/u/Nick_Hoffman)\
**Post date:** [November 16, 2011, 10:57pm UTC](https://discuss.elastic.co/t/how-to-examine-the--all-field/5894/2 "2011-11-16T22:57:36Z")

</div>

What're your index settings, mapping, and document?

---

<div class="post-metadata">

**Author:** ![dvd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dvd/32/3067_2.png) [@dvd](https://discuss.elastic.co/u/dvd)\
**Post date:** [November 16, 2011, 11:19pm UTC](https://discuss.elastic.co/t/how-to-examine-the--all-field/5894/3 "2011-11-16T23:19:24Z")

</div>

index settings:

{  
"number\_of\_shards" : 5,  
"analysis": {  
"analyzer": {  
"default": {  
"alias": ["italian"],  
"type": "italian"  
}  
}  
}  
}

type mapping

{  
'properties': {  
'ean': {  
'type': 'string',  
'index': 'not\_analyzed',  
},  
'title': {  
'type': 'string',  
'index': 'analyzed',  
'boost': 5.0,  
},  
'authors': {  
'properties': {  
'name': {  
'type': 'string',  
'index': 'not\_analyzed',  
'boost': 2.0,  
},  
},  
},  
'publisher': {  
'type': 'string',  
'index': 'not\_analyzed',  
},  
'description': {  
'type': 'string',  
'index': 'analyzed',  
},  
},  
}

and document structure:

{  
'authors': [{'name': ''}],  
'description': '',  
'ean': '',  
'publisher': {'code': '', 'name': ''},  
'title': ''  
}

---

<div class="post-metadata">

**Author:** ![darkyoung](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/darkyoung/32/2924_2.png) [@darkyoung](https://discuss.elastic.co/u/darkyoung)\
**Post date:** [November 17, 2011, 2:28am UTC](https://discuss.elastic.co/t/how-to-examine-the--all-field/5894/4 "2011-11-17T02:28:05Z")

</div>

I have the same problem with you. At some time the \_all field is  
unsearchable. So I have to build queries to search every fields instead  
\_all field.

在 2011年11月17日星期四UTC+8上午6时50分09秒，dvd写道：

> There is a way to dump the \_all field associated to an indexed  
> document?
> 
> I'm trying to debug strange behavior when I query an index; this query  
> produces no results
> 
> {query: {"query\_string": {"query": "stile"}}}
> 
> when this one instead return the expected document
> 
> {query: {"query\_string": {"query": "description:stile"}}}

---

<div class="post-metadata">

**Author:** ![darkyoung](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/darkyoung/32/2924_2.png) [@darkyoung](https://discuss.elastic.co/u/darkyoung)\
**Post date:** [November 17, 2011, 2:45am UTC](https://discuss.elastic.co/t/how-to-examine-the--all-field/5894/5 "2011-11-17T02:45:22Z")

</div>

I have the same problem with you. At some time the \_all field is  
unsearchable. So I have to build queries to search every fields instead  
\_all field.

On Thursday, November 17, 2011 6:50:09 AM UTC+8, dvd wrote:

> There is a way to dump the \_all field associated to an indexed  
> document?
> 
> I'm trying to debug strange behavior when I query an index; this query  
> produces no results
> 
> {query: {"query\_string": {"query": "stile"}}}
> 
> when this one instead return the expected document
> 
> {query: {"query\_string": {"query": "description:stile"}}}

---

<div class="post-metadata">

**Author:** ![medcl\_net](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@medcl\_net](https://discuss.elastic.co/u/medcl_net)\
**Post date:** [November 17, 2011, 3:17am UTC](https://discuss.elastic.co/t/how-to-examine-the--all-field/5894/6 "2011-11-17T03:17:31Z")

</div>

this is the way how i solved the problem:

first way:  
explicit set the default analyzer in config “elasticsearch.yml”, like:

index.analysis.analyzer.default.type : "your analyzer"

another way:

explicit set the analyzer against “\_all” in your mapping ,like :

{  
"YourType": {  
"\_source": {  
"enabled": false  
},  
"\_all": {  
"indexAnalyzer": "your\_index\_analyzer",  
"searchAnalyzer": "your\_search\_analyzer",  
"term\_vector": "no",  
"store": "false"  
},  
"properties": {  
"yourFiled": {  
"type": "long",  
"store": "yes"  
}  
}  
}  
}

you can try it yourself.

yours sincerely,  
medcl@github  
[http://log.medcl.net](http://log.medcl.net)

From: Ocean Wu  
Sent: Thursday, November 17, 2011 10:45 AM  
To: [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
Subject: Re: how to examine the \_all field

I have the same problem with you. At some time the \_all field is unsearchable. So I have to build queries to search every fields instead \_all field.

On Thursday, November 17, 2011 6:50:09 AM UTC+8, dvd wrote:  
There is a way to dump the \_all field associated to an indexed  
document?

I'm trying to debug strange behavior when I query an index; this query  
produces no results

{query: {"query\_string": {"query": "stile"}}}

when this one instead return the expected document

{query: {"query\_string": {"query": "description:stile"}}}

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [November 17, 2011, 1:23pm UTC](https://discuss.elastic.co/t/how-to-examine-the--all-field/5894/7 "2011-11-17T13:23:16Z")

</div>

Can you try and explicitly set the italian analyzer on the \_all field as  
well, there might be a problem where the \_all field will not use the  
default analyzer configured for an index.

On Thu, Nov 17, 2011 at 1:19 AM, dvd [dvd@gnx.it](mailto:dvd@gnx.it) wrote:

> index settings:
> 
> {  
> "number\_of\_shards" : 5,  
> "analysis": {  
> "analyzer": {  
> "default": {  
> "alias": ["italian"],  
> "type": "italian"  
> }  
> }  
> }  
> }
> 
> type mapping
> 
> {  
> 'properties': {  
> 'ean': {  
> 'type': 'string',  
> 'index': 'not\_analyzed',  
> },  
> 'title': {  
> 'type': 'string',  
> 'index': 'analyzed',  
> 'boost': 5.0,  
> },  
> 'authors': {  
> 'properties': {  
> 'name': {  
> 'type': 'string',  
> 'index': 'not\_analyzed',  
> 'boost': 2.0,  
> },  
> },  
> },  
> 'publisher': {  
> 'type': 'string',  
> 'index': 'not\_analyzed',  
> },  
> 'description': {  
> 'type': 'string',  
> 'index': 'analyzed',  
> },  
> },  
> }
> 
> and document structure:
> 
> {  
> 'authors': [{'name': ''}],  
> 'description': '',  
> 'ean': '',  
> 'publisher': {'code': '', 'name': ''},  
> 'title': ''  
> }

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [November 17, 2011, 1:40pm UTC](https://discuss.elastic.co/t/how-to-examine-the--all-field/5894/8 "2011-11-17T13:40:33Z")

</div>

I double checked on 0.18.3, and I see the \_all field using the correct  
analyzer (the custom default one), though I suspect that another bug fix in  
0.18.3 fixed this one as well indadvertedly. In any case, I pushed a change  
that will make sure this will not happen, regardless of the other fix.

If you still have problems with 0.18.3, gist a simple recreation, with your  
config, some sample curl requests that index data, and then your search  
requests that fail.

-shay.banon

On Thu, Nov 17, 2011 at 3:23 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> Can you try and explicitly set the italian analyzer on the \_all field as  
> well, there might be a problem where the \_all field will not use the  
> default analyzer configured for an index.
> 
> On Thu, Nov 17, 2011 at 1:19 AM, dvd [dvd@gnx.it](mailto:dvd@gnx.it) wrote:
> 
> > index settings:
> > 
> > {  
> > "number\_of\_shards" : 5,  
> > "analysis": {  
> > "analyzer": {  
> > "default": {  
> > "alias": ["italian"],  
> > "type": "italian"  
> > }  
> > }  
> > }  
> > }
> > 
> > type mapping
> > 
> > {  
> > 'properties': {  
> > 'ean': {  
> > 'type': 'string',  
> > 'index': 'not\_analyzed',  
> > },  
> > 'title': {  
> > 'type': 'string',  
> > 'index': 'analyzed',  
> > 'boost': 5.0,  
> > },  
> > 'authors': {  
> > 'properties': {  
> > 'name': {  
> > 'type': 'string',  
> > 'index': 'not\_analyzed',  
> > 'boost': 2.0,  
> > },  
> > },  
> > },  
> > 'publisher': {  
> > 'type': 'string',  
> > 'index': 'not\_analyzed',  
> > },  
> > 'description': {  
> > 'type': 'string',  
> > 'index': 'analyzed',  
> > },  
> > },  
> > }
> > 
> > and document structure:
> > 
> > {  
> > 'authors': [{'name': ''}],  
> > 'description': '',  
> > 'ean': '',  
> > 'publisher': {'code': '', 'name': ''},  
> > 'title': ''  
> > }

---

<div class="post-metadata">

**Author:** ![seanwalbran](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seanwalbran/32/2971_2.png) [@seanwalbran](https://discuss.elastic.co/u/seanwalbran)\
**Post date:** [November 17, 2011, 8:15pm UTC](https://discuss.elastic.co/t/how-to-examine-the--all-field/5894/9 "2011-11-17T20:15:41Z")

</div>

I'd had the same issue with 0.18.2, and am still seeing it in 0.18.4.  
It doesn't appear to be always reproducible, so I don't have a clean/  
simple repro script, but here's a gist with some (partially elided)  
details:

[https://gist.github.com/1374346](https://gist.github.com/1374346)

On Nov 17, 7:40 am, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> I double checked on 0.18.3, and I see the \_all field using the correct  
> analyzer (the custom default one), though I suspect that another bug fix in  
> 0.18.3 fixed this one as well indadvertedly. In any case, I pushed a change  
> that will make sure this will not happen, regardless of the other fix.
> 
> If you still have problems with 0.18.3, gist a simple recreation, with your  
> config, some sample curl requests that index data, and then your search  
> requests that fail.
> 
> -shay.banon
> 
> On Thu, Nov 17, 2011 at 3:23 PM, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> 
> > Can you try and explicitly set the italian analyzer on the \_all field as  
> > well, there might be a problem where the \_all field will not use the  
> > default analyzer configured for an index.
> 
> > On Thu, Nov 17, 2011 at 1:19 AM, dvd [d...@gnx.it](mailto:d...@gnx.it) wrote:
> 
> > > index settings:
> 
> > > {  
> > > "number\_of\_shards" : 5,  
> > > "analysis": {  
> > > "analyzer": {  
> > > "default": {  
> > > "alias": ["italian"],  
> > > "type": "italian"  
> > > }  
> > > }  
> > > }  
> > > }
> 
> > > type mapping
> 
> > > {  
> > > 'properties': {  
> > > 'ean': {  
> > > 'type': 'string',  
> > > 'index': 'not\_analyzed',  
> > > },  
> > > 'title': {  
> > > 'type': 'string',  
> > > 'index': 'analyzed',  
> > > 'boost': 5.0,  
> > > },  
> > > 'authors': {  
> > > 'properties': {  
> > > 'name': {  
> > > 'type': 'string',  
> > > 'index': 'not\_analyzed',  
> > > 'boost': 2.0,  
> > > },  
> > > },  
> > > },  
> > > 'publisher': {  
> > > 'type': 'string',  
> > > 'index': 'not\_analyzed',  
> > > },  
> > > 'description': {  
> > > 'type': 'string',  
> > > 'index': 'analyzed',  
> > > },  
> > > },  
> > > }
> 
> > > and document structure:
> 
> > > {  
> > > 'authors': [{'name': ''}],  
> > > 'description': '',  
> > > 'ean': '',  
> > > 'publisher': {'code': '', 'name': ''},  
> > > 'title': ''  
> > > }

---

<div class="post-metadata">

**Author:** ![dvd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dvd/32/3067_2.png) [@dvd](https://discuss.elastic.co/u/dvd)\
**Post date:** [November 17, 2011, 9:47pm UTC](https://discuss.elastic.co/t/how-to-examine-the--all-field/5894/10 "2011-11-17T21:47:27Z")

</div>

Hi Shay,

thank you for your time!

I've run a test with the new version (0.18.4) and, on a newly created  
index, it seems to work fine!

Unfortunately, querying the old index doesn't work until I indexed  
again the document.

My main index has more than 900k documents, is there a way to rebuild  
this index without submit all documents again?

david

On Nov 17, 2:40 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> I double checked on 0.18.3, and I see the \_all field using the correct  
> analyzer (the custom default one), though I suspect that another bug fix in  
> 0.18.3 fixed this one as well indadvertedly. In any case, I pushed a change  
> that will make sure this will not happen, regardless of the other fix.
> 
> If you still have problems with 0.18.3, gist a simple recreation, with your  
> config, some sample curl requests that index data, and then your search  
> requests that fail.
> 
> -shay.banon
> 
> On Thu, Nov 17, 2011 at 3:23 PM, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> 
> > Can you try and explicitly set the italian analyzer on the \_all field as  
> > well, there might be a problem where the \_all field will not use the  
> > default analyzer configured for an index.
> 
> > On Thu, Nov 17, 2011 at 1:19 AM, dvd [d...@gnx.it](mailto:d...@gnx.it) wrote:
> 
> > > index settings:
> 
> > > {  
> > > "number\_of\_shards" : 5,  
> > > "analysis": {  
> > > "analyzer": {  
> > > "default": {  
> > > "alias": ["italian"],  
> > > "type": "italian"  
> > > }  
> > > }  
> > > }  
> > > }
> 
> > > type mapping
> 
> > > {  
> > > 'properties': {  
> > > 'ean': {  
> > > 'type': 'string',  
> > > 'index': 'not\_analyzed',  
> > > },  
> > > 'title': {  
> > > 'type': 'string',  
> > > 'index': 'analyzed',  
> > > 'boost': 5.0,  
> > > },  
> > > 'authors': {  
> > > 'properties': {  
> > > 'name': {  
> > > 'type': 'string',  
> > > 'index': 'not\_analyzed',  
> > > 'boost': 2.0,  
> > > },  
> > > },  
> > > },  
> > > 'publisher': {  
> > > 'type': 'string',  
> > > 'index': 'not\_analyzed',  
> > > },  
> > > 'description': {  
> > > 'type': 'string',  
> > > 'index': 'analyzed',  
> > > },  
> > > },  
> > > }
> 
> > > and document structure:
> 
> > > {  
> > > 'authors': [{'name': ''}],  
> > > 'description': '',  
> > > 'ean': '',  
> > > 'publisher': {'code': '', 'name': ''},  
> > > 'title': ''  
> > > }

---

<div class="post-metadata">

**Author:** ![dvd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dvd/32/3067_2.png) [@dvd](https://discuss.elastic.co/u/dvd)\
**Post date:** [November 18, 2011, 9:43pm UTC](https://discuss.elastic.co/t/how-to-examine-the--all-field/5894/11 "2011-11-18T21:43:30Z")

</div>

Looks like that I claim victory too soon ☹

After a night spent indexing all my documents I'm stuck with the same  
problem:

curl -XPOST [http://localhost:9200/alessandria/book/\_search](http://localhost:9200/alessandria/book/_search)? -d  
'{ query: { "query\_string": { "query": "cervello" } } }'  
{"took":3,"timed\_out":false,"\_shards":{"total":5,"successful":  
5,"failed":0},"hits":{"total":0,"max\_score":null,"hits":}}

but the document, one of the many with the word "cervello", exists

curl -XGET [http://localhost:9200/alessandria/book/9788862204781](http://localhost:9200/alessandria/book/9788862204781)  
{"\_index":"alessandria","\_type":"book","\_id":"9788862204781","\_version":  
4,"exists":true, "\_source" : {... "title": "Il cervello e l'arte di  
imparare. Apprendimento e memoria nello sviluppo del bambino", ... }}

Following an advice on this thread I added an explicit mapping for the  
\_all field, but with no luck.

After a reindex of the 9788862204781 document and a server restart the  
search finally returns one, and only one, results.

thank you for any advice  
david

On Nov 17, 10:47 pm, dvd [d...@gnx.it](mailto:d...@gnx.it) wrote:

> Hi Shay,
> 
> thank you for your time!
> 
> I've run a test with the new version (0.18.4) and, on a newly created  
> index, it seems to work fine!
> 
> Unfortunately, querying the old index doesn't work until I indexed  
> again the document.
> 
> My main index has more than 900k documents, is there a way to rebuild  
> this index without submit all documents again?
> 
> david
> 
> On Nov 17, 2:40 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> 
> > I double checked on 0.18.3, and I see the \_all field using the correct  
> > analyzer (the custom default one), though I suspect that another bug fix in  
> > 0.18.3 fixed this one as well indadvertedly. In any case, I pushed a change  
> > that will make sure this will not happen, regardless of the other fix.
> 
> > If you still have problems with 0.18.3, gist a simple recreation, with your  
> > config, some sample curl requests that index data, and then your search  
> > requests that fail.
> 
> > -shay.banon
> 
> > On Thu, Nov 17, 2011 at 3:23 PM, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> > 
> > > Can you try and explicitly set the italian analyzer on the \_all field as  
> > > well, there might be a problem where the \_all field will not use the  
> > > default analyzer configured for an index.
> 
> > > On Thu, Nov 17, 2011 at 1:19 AM, dvd [d...@gnx.it](mailto:d...@gnx.it) wrote:
> 
> > > > index settings:
> 
> > > > {  
> > > > "number\_of\_shards" : 5,  
> > > > "analysis": {  
> > > > "analyzer": {  
> > > > "default": {  
> > > > "alias": ["italian"],  
> > > > "type": "italian"  
> > > > }  
> > > > }  
> > > > }  
> > > > }
> 
> > > > type mapping
> 
> > > > {  
> > > > 'properties': {  
> > > > 'ean': {  
> > > > 'type': 'string',  
> > > > 'index': 'not\_analyzed',  
> > > > },  
> > > > 'title': {  
> > > > 'type': 'string',  
> > > > 'index': 'analyzed',  
> > > > 'boost': 5.0,  
> > > > },  
> > > > 'authors': {  
> > > > 'properties': {  
> > > > 'name': {  
> > > > 'type': 'string',  
> > > > 'index': 'not\_analyzed',  
> > > > 'boost': 2.0,  
> > > > },  
> > > > },  
> > > > },  
> > > > 'publisher': {  
> > > > 'type': 'string',  
> > > > 'index': 'not\_analyzed',  
> > > > },  
> > > > 'description': {  
> > > > 'type': 'string',  
> > > > 'index': 'analyzed',  
> > > > },  
> > > > },  
> > > > }
> 
> > > > and document structure:
> 
> > > > {  
> > > > 'authors': [{'name': ''}],  
> > > > 'description': '',  
> > > > 'ean': '',  
> > > > 'publisher': {'code': '', 'name': ''},  
> > > > 'title': ''  
> > > > }

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [November 20, 2011, 8:40am UTC](https://discuss.elastic.co/t/how-to-examine-the--all-field/5894/12 "2011-11-20T08:40:14Z")

</div>

Can you gist a proper recreation? one that has curl requests that create  
the index with the relevant settings, index some sample data, and then  
issue a sample search requests that fail?

On Thu, Nov 17, 2011 at 10:15 PM, seanwalbran [seanwalbran@gmail.com](mailto:seanwalbran@gmail.com) wrote:

> I'd had the same issue with 0.18.2, and am still seeing it in 0.18.4.  
> It doesn't appear to be always reproducible, so I don't have a clean/  
> simple repro script, but here's a gist with some (partially elided)  
> details:
> 
> [https://gist.github.com/1374346](https://gist.github.com/1374346)
> 
> On Nov 17, 7:40 am, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> 
> > I double checked on 0.18.3, and I see the \_all field using the correct  
> > analyzer (the custom default one), though I suspect that another bug fix  
> > in  
> > 0.18.3 fixed this one as well indadvertedly. In any case, I pushed a  
> > change  
> > that will make sure this will not happen, regardless of the other fix.
> > 
> > If you still have problems with 0.18.3, gist a simple recreation, with  
> > your  
> > config, some sample curl requests that index data, and then your search  
> > requests that fail.
> > 
> > -shay.banon
> > 
> > On Thu, Nov 17, 2011 at 3:23 PM, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> > 
> > > Can you try and explicitly set the italian analyzer on the \_all field  
> > > as  
> > > well, there might be a problem where the \_all field will not use the  
> > > default analyzer configured for an index.
> > 
> > > On Thu, Nov 17, 2011 at 1:19 AM, dvd [d...@gnx.it](mailto:d...@gnx.it) wrote:
> > 
> > > > index settings:
> > 
> > > > {  
> > > > "number\_of\_shards" : 5,  
> > > > "analysis": {  
> > > > "analyzer": {  
> > > > "default": {  
> > > > "alias": ["italian"],  
> > > > "type": "italian"  
> > > > }  
> > > > }  
> > > > }  
> > > > }
> > 
> > > > type mapping
> > 
> > > > {  
> > > > 'properties': {  
> > > > 'ean': {  
> > > > 'type': 'string',  
> > > > 'index': 'not\_analyzed',  
> > > > },  
> > > > 'title': {  
> > > > 'type': 'string',  
> > > > 'index': 'analyzed',  
> > > > 'boost': 5.0,  
> > > > },  
> > > > 'authors': {  
> > > > 'properties': {  
> > > > 'name': {  
> > > > 'type': 'string',  
> > > > 'index': 'not\_analyzed',  
> > > > 'boost': 2.0,  
> > > > },  
> > > > },  
> > > > },  
> > > > 'publisher': {  
> > > > 'type': 'string',  
> > > > 'index': 'not\_analyzed',  
> > > > },  
> > > > 'description': {  
> > > > 'type': 'string',  
> > > > 'index': 'analyzed',  
> > > > },  
> > > > },  
> > > > }
> > 
> > > > and document structure:
> > 
> > > > {  
> > > > 'authors': [{'name': ''}],  
> > > > 'description': '',  
> > > > 'ean': '',  
> > > > 'publisher': {'code': '', 'name': ''},  
> > > > 'title': ''  
> > > > }

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [November 20, 2011, 8:41am UTC](https://discuss.elastic.co/t/how-to-examine-the--all-field/5894/13 "2011-11-20T08:41:33Z")

</div>

Gist a curl recreation, with sample indexing and index configuration. More  
info here: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/help).

On Fri, Nov 18, 2011 at 11:43 PM, dvd [dvd@gnx.it](mailto:dvd@gnx.it) wrote:

> Looks like that I claim victory too soon ☹
> 
> After a night spent indexing all my documents I'm stuck with the same  
> problem:
> 
> curl -XPOST [http://localhost:9200/alessandria/book/\_search](http://localhost:9200/alessandria/book/_search)? -d  
> '{ query: { "query\_string": { "query": "cervello" } } }'  
> {"took":3,"timed\_out":false,"\_shards":{"total":5,"successful":  
> 5,"failed":0},"hits":{"total":0,"max\_score":null,"hits":}}
> 
> but the document, one of the many with the word "cervello", exists
> 
> curl -XGET [http://localhost:9200/alessandria/book/9788862204781](http://localhost:9200/alessandria/book/9788862204781)  
> {"\_index":"alessandria","\_type":"book","\_id":"9788862204781","\_version":  
> 4,"exists":true, "\_source" : {... "title": "Il cervello e l'arte di  
> imparare. Apprendimento e memoria nello sviluppo del bambino", ... }}
> 
> Following an advice on this thread I added an explicit mapping for the  
> \_all field, but with no luck.
> 
> After a reindex of the 9788862204781 document and a server restart the  
> search finally returns one, and only one, results.
> 
> thank you for any advice  
> david
> 
> On Nov 17, 10:47 pm, dvd [d...@gnx.it](mailto:d...@gnx.it) wrote:
> 
> > Hi Shay,
> > 
> > thank you for your time!
> > 
> > I've run a test with the new version (0.18.4) and, on a newly created  
> > index, it seems to work fine!
> > 
> > Unfortunately, querying the old index doesn't work until I indexed  
> > again the document.
> > 
> > My main index has more than 900k documents, is there a way to rebuild  
> > this index without submit all documents again?
> > 
> > david
> > 
> > On Nov 17, 2:40 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> > 
> > > I double checked on 0.18.3, and I see the \_all field using the correct  
> > > analyzer (the custom default one), though I suspect that another bug  
> > > fix in  
> > > 0.18.3 fixed this one as well indadvertedly. In any case, I pushed a  
> > > change  
> > > that will make sure this will not happen, regardless of the other fix.
> > 
> > > If you still have problems with 0.18.3, gist a simple recreation, with  
> > > your  
> > > config, some sample curl requests that index data, and then your search  
> > > requests that fail.
> > 
> > > -shay.banon
> > 
> > > On Thu, Nov 17, 2011 at 3:23 PM, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> > > 
> > > > Can you try and explicitly set the italian analyzer on the \_all  
> > > > field as  
> > > > well, there might be a problem where the \_all field will not use the  
> > > > default analyzer configured for an index.
> > 
> > > > On Thu, Nov 17, 2011 at 1:19 AM, dvd [d...@gnx.it](mailto:d...@gnx.it) wrote:
> > 
> > > > > index settings:
> > 
> > > > > {  
> > > > > "number\_of\_shards" : 5,  
> > > > > "analysis": {  
> > > > > "analyzer": {  
> > > > > "default": {  
> > > > > "alias": ["italian"],  
> > > > > "type": "italian"  
> > > > > }  
> > > > > }  
> > > > > }  
> > > > > }
> > 
> > > > > type mapping
> > 
> > > > > {  
> > > > > 'properties': {  
> > > > > 'ean': {  
> > > > > 'type': 'string',  
> > > > > 'index': 'not\_analyzed',  
> > > > > },  
> > > > > 'title': {  
> > > > > 'type': 'string',  
> > > > > 'index': 'analyzed',  
> > > > > 'boost': 5.0,  
> > > > > },  
> > > > > 'authors': {  
> > > > > 'properties': {  
> > > > > 'name': {  
> > > > > 'type': 'string',  
> > > > > 'index': 'not\_analyzed',  
> > > > > 'boost': 2.0,  
> > > > > },  
> > > > > },  
> > > > > },  
> > > > > 'publisher': {  
> > > > > 'type': 'string',  
> > > > > 'index': 'not\_analyzed',  
> > > > > },  
> > > > > 'description': {  
> > > > > 'type': 'string',  
> > > > > 'index': 'analyzed',  
> > > > > },  
> > > > > },  
> > > > > }
> > 
> > > > > and document structure:
> > 
> > > > > {  
> > > > > 'authors': [{'name': ''}],  
> > > > > 'description': '',  
> > > > > 'ean': '',  
> > > > > 'publisher': {'code': '', 'name': ''},  
> > > > > 'title': ''  
> > > > > }

---

<div class="post-metadata">

**Author:** ![dylanhay](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@dylanhay](https://discuss.elastic.co/u/dylanhay)\
**Post date:** [July 15, 2014, 3:42am UTC](https://discuss.elastic.co/t/how-to-examine-the--all-field/5894/14 "2014-07-15T03:42:15Z")

</div>

Searching across every field is going to yield lower performance than a properly structured query against the fields you actually want to check. The only way to achieve this is to use the GroupedOr statement, passing in each field and term you want to search against.

[EAN](http://www.keepdynamic.com/barcoding/csharp-barcode-generator.shtml)

---

<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, 1:15am UTC](https://discuss.elastic.co/t/how-to-examine-the--all-field/5894/15 "2017-07-06T01:15:47Z")

</div>


